IntersectMBO / IntersectMBO/ouroboros-consensus
Avoid deserialization of blocks in BlockFetchClient
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
At the moment, the `BlockFetchClient` is deserializing blocks, but it doesn't really have a good reason to do so. It verifies that a block matches its header, but there's not really a good reason that I can see for doing this in the block fetch client (as opposed to just in the general block validation). Delaying the deserialiation until we actually validate the block has (at least?) two advantages:
* When we write the block to disk, we avoid an unnecessary re-serialization step.
* When we cache multiple blocks (which we will start doing from https://github.com/input-output-hk/ouroboros-network/pull/1709), then queueing serialized blocks is a much more compact representation than the deserialized blocks.
Contributor guide
Assessment
This issue has not been assessed yet.