Module massa_execution_worker::speculative_ledger

source ·
Expand description

The speculative ledger represents, in a compressed way, the state of the ledger at an arbitrary execution slot. It never actually writes to the consensus state but keeps track of the changes that were applied to it since its creation.

Structs§

  • The SpeculativeLedger contains an thread-safe shared reference to the final ledger (read-only), a list of existing changes that happened o the ledger since its finality, as well as an extra list of “added” changes. The SpeculativeLedger makes it possible to transparently manipulate a virtual ledger that takes into account all those ledger changes and allows adding more while keeping track of all the newly added changes, and never writing in the final ledger.