Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinod Damle committed Oct 1, 2024
1 parent eab4f18 commit fa7d47b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions specs/protocol/holocene/exec-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
After the Holocene hardfork's activation, the L2 block header's `withdrawalsRoot` field will consist of the 32-byte
[`L2ToL1MessagePasser`][l2-to-l1-mp] account storage root _after_ the block has been executed, and _after_ the
insertions and deletions have been applied to the trie. In other words, the storage root should be the same root
that is returned by `eth_getProof` at the given block number.
that is returned by `eth_getProof` at the given block number -- it is the storage root of the post state,
similar to how the state root of the post state is stored in the block header.

For an accurate storage root to be determined, the block state has to be committed first and only then, the
`withdrawalsRoot` can be set accurately. Hence the `withdrawalsRoot` attribute should be set right after setting
Expand Down Expand Up @@ -73,7 +74,7 @@ for users and protocol participants alike, allowing them to propose and verify o

#### Genesis Block

If Holocene is active at genesis block, the withdrawals root is the empty withdrawals root, regardless of L2 state.
If Holocene is active at the genesis block, the withdrawals root is the empty withdrawals root, regardless of L2 state.

#### State Processing

Expand All @@ -84,15 +85,18 @@ available to the EVM/application layer.

During sync, the block body withdrawal hash is computed from the withdrawals list in the block body. If Holocene is active
at such a block's header, we expect that the computed withdrawal hash must match the hash of an empty list of withdrawals.
The header `withdrawalsRoot` hash can be any non-null value in this case. Verification is performed after a header is available
so that the header's timestamp can be checked to see if Holocene is active.
The header `withdrawalsRoot` MPT hash can be any non-null value in this case. Verification is performed after a header is available so that the header's timestamp can be checked to see if Holocene is active.

#### Backwards Compatibility Considerations

Beginning at Shanghai and prior to Holocene activation, the `withdrawalsRoot` field is set to an empty withdrawals list.
This is the same root as an empty storage root. The withdrawals are captured in the L2 state, however they are not
reflected in the `withdrawalsRoot`. Any implementation that caclulates output root should be careful not to use the
header `withdrawalsRoot`.
Beginning at Shanghai and prior to Holocene activation, the `withdrawalsRoot` field is set to the MPT root
of an empty withdrawals list. This is the same root as an empty storage root. The withdrawals are captured
in the L2 state, however they are not reflected in the `withdrawalsRoot`. Hence, prior to Holocene activation,
even if a `withdrawalsRoot` is present and a MPT root is present in the header, it should not be used.
Any implementation that calculates output root should be careful not to use the header `withdrawalsRoot`.

After Holocene activation, if there was never any withdrawal contract storage, a MPT root of an empty list
can be set as the `withdrawalsRoot`

#### Forwards Compatibility Considerations

Expand Down

0 comments on commit fa7d47b

Please sign in to comment.