Skip to main content

Consensus Team Update

ยท 3 min read
Damian Nadales

High level summaryโ€‹

During the past two weeks, the consensus team finished the testing activities around the UTxO-HD prototype. This is a very important milestone which will enable us to run system-level tests and benchmarks, as well as start refactoring and cleaning the prototype. Regarding our Genesis workstream, we elaborated a roadmap that gives an indication of the remaining work. We also continued our work on benchmarking chain-sync-jumping. We also continued working on improving the way we handle blocks from the future, and advancing the integration of the new VRF and KES crypto.

Workstreamsโ€‹

UTxO HD Prototypeโ€‹

As the prototype is nearing its completion, it was important to have enough confidence that we will be able to move additional parts of the ledger state onto disk. We worked together with the Ledger team to elaborate a sketch on how the UTxO-HD design would accommodate the migration of additional data from memory to disk. This gave us enough confidence that the current architecture will be extensible in the future.

On the testing front, we added property-based tests for the UTxO-HD type classes.

We also enabled disabled components, and addressed several technical debt issues:

  • Implement splitSized anti-diff split (#4269), and integrate it into consensus (#4273).
  • Renaming of peekVal to peekMDBVal (#7).

We ran ad-hoc benchmarks for syncing a chain from scratch and replaying. We found a race condition in the LMDB backing store, which we fixed. After the fix we were able to successfully run these benchmarks. The results were published by this pull request.

We used our db-analyser tool to benchmark the cost of reading keys and flushing values to disk. The following plot shows the duration of these disk operation in relation to the main ledger operations, where we can see that the cost of the former are comparatively low. The spike at the beginning of the graph is when, at the start of the Shelley era, the entire UTxO set is flushed to disk.

UTxO-HD read and flush benchmarks

After months of hard work adding tests for the prototype, we are ready to run end-to-end tests on the node, and system level benchmarks. This signals a very important milestone for the UTxO-HD workstream ๐ŸŽ‰.

Genesisโ€‹

We elaborated a high-level decomposition of the remaining work for Genesis. We also continued benchmarking the chain-sync-jumping happy-path.

Technical debtโ€‹

We continued working on improving the way we handle blocks from the future.

Supportโ€‹

We completed the mapping of Crypto to HeaderCrypto and body Crypto. HeaderCrypto is moved to cardano-protocol-tpraos. We created a draft pull request to facilitate compiling consensus.