IntersectMBO / IntersectMBO/ouroboros-consensus

The Big Decontamination Plan

Open
#386 15 comments 0 reactions 0 assignees View on GitHub
technical debt
Dominant language
Haskell
Stars
67
Forks
43
Avg merge
5d 13h
Merged PRs (30d)
43

Description

This would be quite a large refactoring, but it would simplify a large part of the codebase, and means that going forward we can forget about EBBs entirely.

If we didn't care about preserving history, we could have rewritten the existing chain, rewriting nothing but the prev-hashes of every block, skipping any EBBs. We _do_ want to preserve history, and so we cannot do this, but we can do the next best thing: we can introduce a hashmap mapping the hash of every EBB to its predecessor. This way we can do a local translation (in the `HasHeader` instance for `ByronBlock`) so that if we have blocks `A - EBB - B`, we rewrite the prev-hash of `B` on the fly to be `A` rather than the EBB. Now we can pretend EBBs don't exist, we don't store them, we don't send them, we have no `SlotNo` clashes, we have no `BlockNo` clashes, soooo many things in the consensus layer and storage layer could be made simpler, at the cost of one static value and `HasHeader` instance for a block type that is _anyway_ no longer going to be used.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.