Skip to content
thomas-quadratic edited this page Jan 29, 2024 · 3 revisions

This document is a proposal for a 3rd Milestone for the project.

Goals

  • Optimisations : Integrate the list of identified optimisations, and identify possibly more if needed/valuable.
  • Gas Fees : Integrate the new gas fees computation for Verkle Trie.
  • Block Generation : Integrate proofs and verification to enable block proposal.

At the end of this milestone, we should have a product with full feature set and have actively joined the testnet, producing and proposing new blocks.

Context

The 2nd Milestone has achieve its objectives of testing Verkle Tries integration to both Besu and to the testnet. We can today follow the testnet up to the 12th block, which fails due to the restructuration of gas fees. We have also started to measure performances at least grossly in order to identify bottlenecks. Currently, state root generation is known to be suboptimal and is slower than for other implementations.

Tasks

  • Refactor commitments caching : currently, the commitment is stored in Java and the DB as hashed value (groupToScalar). This cannot recover the commitment group element however, which will now be needed with the integration of new crypto primitives. Following geth, we want to store uncompressed serialised form of the commitment.
  • Integrate new rust-verkle API : crypto primitives are provided by the rust crate rust-verkle, which has very recently undergone active development. This has generated changes to the API and for us, while also facilitating its integration on primitives whose integration is still pending.
  • Integrate updates : currently, every modified commitment is recomputed entirely on its 256-values. We would like to integrate homomorphic updates so that far fewer computations will be needed, leading to better performances.
  • Develop batched groupToScalar : rolling-up commitments requires to hash (groupToScalar) children commitments, in turn requiring a division. Currently, we hash elements individually. An optimisation used in geth is to use Montgomery's BatchInversion trick to hash all commitments at a given level at once using a single division. We expect significant performance improvements from this trick as geth did. It requires an important new implementation of a HashVisitor however on top of the integration of the crypto primitive.
  • Finalise integration of proofs : rust-verkle being more stable now, we can finalise the already started implementation of proof generation and verification.
  • Gas-fees restructuration : implement the EIP's new gas fees implementation.

Sizing

We estimate the development effort including structuration, issue-board maintenance, code reviews, development, testings and meetings to be of the order of 50 days.

Planning

The 2nd milestone is closing, so we plan on working on this milestone from February to May 2024.

Clone this wiki locally