Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invent a mechanism to defer parsing of the block body #1400

Open
nfrisby opened this issue Feb 19, 2025 · 1 comment
Open

Invent a mechanism to defer parsing of the block body #1400

nfrisby opened this issue Feb 19, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@nfrisby
Copy link
Contributor

nfrisby commented Feb 19, 2025

In this Slack thread https://input-output-rnd.slack.com/archives/CCRB7BU8Y/p1739989744747839?thread_ts=1739982090.309869&cid=CCRB7BU8Y, Alexey and I discussed that some changes might be much more plausible as intra-era hard forks instead of requiring an era transition if Consensus could provide the correct protocol version to some of the Ledger codecs.

[...] if we had access to actual protocol version in our decoders, we could for example add a field to an existing transaction and disable its decoding until the next intra-era hard fork
Or we could disable a field in a transaction, without its removal
I am not sure how useful this would be, but because we never had this ability I never considered this as a possibility

The first trade-off that comes to mind is whether we need to assess syntactic well-formedness of the block body before trying to apply it. (Recall that the Consensus Layer does not necessarily try to apply ever block it receives.) Maybe it'd be sufficient to deserialize just the the block header (without knowing the exact protocol version) as long as the hash checks etc. And then we'd only need to deserialize the block body just before trying to apply the block, at which point we would already have the ledger state and could pass the exact protocol version to the Ledger's codecs for the body.

I'm classifying this as Support work, since the main goal is to enable the Ledger team to make more changes as intra-era hard forks, since those are so much lighter weight than new eras.

@nfrisby nfrisby added the enhancement New feature or request label Feb 19, 2025
@nfrisby nfrisby moved this to 🔖 Ready in Consensus Team Backlog Feb 19, 2025
@nfrisby
Copy link
Contributor Author

nfrisby commented Feb 19, 2025

Alexey replied: I don't think we need to put a whole lot of effort in order to try and solve it.

So we should time-box this accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant