IntersectMBO / IntersectMBO/ouroboros-consensus
Invent a mechanism to defer parsing of the block body
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.