From fa7d47bda04f9708696a29c4078ee486d88becda Mon Sep 17 00:00:00 2001 From: Vinod Damle Date: Tue, 1 Oct 2024 17:23:02 +0530 Subject: [PATCH] Address review comments --- specs/protocol/holocene/exec-engine.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/specs/protocol/holocene/exec-engine.md b/specs/protocol/holocene/exec-engine.md index 3d711a515..8aee7eecb 100644 --- a/specs/protocol/holocene/exec-engine.md +++ b/specs/protocol/holocene/exec-engine.md @@ -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 @@ -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 @@ -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