nimbus-eth2 icon indicating copy to clipboard operation
nimbus-eth2 copied to clipboard

verkle trees: add 2 fields to ExecutionPayload

Open gballet opened this issue 2 years ago • 4 comments

Description

With the verge, proofs and witness of the pre-state of an (EL) block execution are included in the blocks. In order to build a PoS testnet that provides proofs in blocks, it would be great if it were possible to create a branch with the required fields to be added to the ExecutionPayload.

The ExecutionPayload needs to have two more, optional fields:

  • VerkleProof, a byte array of variable length
  • VerkleKeyVals, an array of (key, value) pairs, in which the key is a 32-byte vector, and value is a byte vector of length either 0 (missing value) or 32.

At the moment, there is no need to support forking as for this testnet, verkle trees are used since the genesis.

If present, these two fields should be propagated over the network with the rest of the ExecutionPayload so that other clients can inject these fields in their verkle-enabled EL.

gballet avatar Jan 25 '23 09:01 gballet

For which hardforks (Capella, EIP4844, all of them, etc)? There are different ExecutionPayloads for each Bellatrix-and-later hardfork.

And I'm not sure what you mean by "if present" -- the they be optional fields, or?

tersec avatar Jan 25 '23 10:01 tersec

yes the keys could be optional, and I'm only interested in post-merge phases

gballet avatar Jan 25 '23 10:01 gballet

can you point to a more formal description? "value is a byte vector of length either 0 (missing value) or 32." a vector is typically fixed-length. is this an optional-vector? a list of either 0 or 32 bytes?

tersec avatar Jan 25 '23 10:01 tersec

Note that this will push the number of total members in ExecutionPayload over the next power of 2, so all SSZ GeneralizedIndex within ExecutionPayload will double.

etan-status avatar Jan 25 '23 13:01 etan-status

Part of https://github.com/status-im/nimbus-eth2/tree/verkle-kaustinen/capella

tersec avatar Jul 04 '24 06:07 tersec