IntersectMBO / IntersectMBO/ouroboros-consensus

Ledger state is translated repeatedly across hard fork point

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

Description

Suppose we have seen the last Byron block, and are about to transition to Shelley. At every slot (i.e., every second) every node will determine if they are a leader. In order to do that check, they will tick the ledger state. Since we are precisely at the transition point, this tick will mean translation the entire ledger state. The result of this ticked ledger state is thrown away, whether or not a block was produced, and _if_ a block was produced, then the ledger state is ticked once more when that block is added to the chain DB and validated. This means that every node will translate the ledger state time and again until it receives or produces the first block after the transition. Fortunately, the overlay schedule means that this block will be produced immediately in the first slot after the transition, so this shouldn't cause much hassle.

We could improve the situation by only ticking the ledger _view_ (aka, forecasting). This is significantly cheaper.

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.