-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isthmus: L2 withdrawals-root in block header [TRACKER] #12044
Comments
I would strongly prefer to avoid using feature branches and instead make inclusion in Holocene optional by using a feature toggle specific to this functionality. ie instead of Using a feature branch breaks continuous integration so we wind up having to deal with merge conflicts and aren't testing the the combined code until close to release which significantly increases the risk of bugs going undetected. |
I disagree that we should be changing up the What do you think about just keeping the withdrawals list non-nil + empty, like we do post-Shanghai? LMK if I'm missing something, but it doesn't seem like we need the bridge storage root in the payload, nor change up the payload's understanding of beacon-withdrawals being empty. |
We do need it in We can keep the list around as always-empty list for compatibility, but the new attribute will break the gossip payload regardless. |
Ok, feature-flags, not feature-branch, it is. But please do document the changes / PRs, so the shared diff can be reviewed easily, especially if this work is picked up by a newer contributor. It's important that the changes are all consistent with each other and the specs. |
@vdamle as agreed with @tynes and @protolambda on discord, I assigned this issue to you, so we can start looking at it, as part of the holocene hardfork work. |
@protolambda Makes sense. I prefer the idea of extending the type rather than removing the old field on top of that. |
@vdamle I created a new milestone for this feature, please add all related issues and PRs to it going forward. |
As I conclude the work in op-geth, I observe that there's a change required in superchain-registry to:
PR in superchain-registry to add |
Plan
We are going to use a
feature-branchfeature-config-flag approach,to keep this withdrawals work optional to Isthumus.
If not complete by Isthumus devnet stage, we do not merge the feature-branches,
and thus do not include it in the hardfork.
TODOs, in sequence:
You may use a feature-branch, but a single specs PR is fine too.
Previous basic Isthumus spec work can be found in
specs#374
.with
go.mod
update to point to the latest commit of the op-geth with the right changes.dev
release candidates of the above, verify that it stays in sync.we enable the feature-config-flag and include it in the Isthumus devnet/testnet phase.
Spec TODOs
General notes: keep the specs categorized in the
isthumus
directory, and file names consistent across upgrades:e.g. Execution layer changes go
exec-engine.md
.the block is sealed at the end of a block.
if Isthumus is active, is always the empty withdrawals root, regardless of L2 state.
is set to an empty withdrawals list, this equals the same root as an empty storage root.
The withdrawals are there in L2 state, just not elevated into the withdrawals-root.
Pre-Isthumus output-root construction should be careful not to use the header withdrawals-root.
the withdrawals-root should not be available to the EVM / application layer.
ExecutableData
gets awithdrawalsRoot
attribute.the block state has to be committed first, before the withdrawals storage root can be set accurately.
This attribute should thus be set right after setting the state-root attribute of the header.
we compute the body-withdrawal-hashes from the received withdrawals list in the block body.
Then, when we compare the body-withdrawal-hashes to the header withdrawal-hashes,
and if optimism Isthumus is active for the given header, we check if the body-withdrawal-hash matches the empty list root,
while allowing the header-withdrawal-hash to be any non-null value.
By verifying at this later stage, we have the header timestamp, and can apply the fork logic conditionally.
ExecutionPayload
SSZ encoding with new withdrawals-root included.[ ] We remove thewithdrawals
list from the encoding, diverging from the L1 beacon-chainExecutionPayload
encoding.engine_newPayloadV3
engine-API,but now with the additional
ExecutionPayload
attribute, that is omitted pre-Isthumus.ExecutionPayload
SSZ encoding,and a gossip-validation rule that checks if the withdrawals root is non-nil, and withdrawals list is empty.
This spec change goes into the main
rollup-node-p2p.md
, to be consistent with the other gossip topics.and link to the Isthumus specs change of the block header.
Created ethereum-optimism/specs#394 to track work for spec updates
CL / op-node TODOs
ExecutionPayload
type to have the optional withdrawals rootTo conditionally either encode the empty-list (pre-Isthumus) (simply just an offset constant) or an empty list and a 32 fixed-size value.
op-node/p2p
update to activate new gossip topic forIsthumus
.op-node/rollup/attributes/engine_consolidate.go
:All 3 cases with and without withdrawal-storage change (by inserting a withdrawal tx in L2).
op-node/api.go
node.OutputAtBlock
that theOutputV0AtBlock
function handles the Isthumus change.op-service/sources/l2_client.go
L2Client.OutputV0AtBlock
tocheck if Isthumus is active based on the timestamp of the retrieved block-header.
If it is, then don't fetch the storage or storage-proof,
but use the Withdrawals-hash from the block-header to construct the output-root.
op-service/sources/eth_client.go
functionality of block/header verification does not break. In particular, update the withdrawals-list verification of the block-body, to enforce an empty non-nil list. And the header must have a non-nil withdrawals-root after genesis.While technically compatible without this change, there are other op-program changes,
and we want to prevent the arbitrary storage-lookup preimage needs that come with the state-access.
op-geth TODOs
ExecutableData
json encode/decode testfork.yaml
): t8ntool was not updated,it doesn't support some OP-Stack features already, so it is not worth it to handle the withdrawals root case.
It is also just unfortunate code-duplication in this tool that it does not use the same sealer as Geth consensus does.
Describe the feature-branch changes in-- no feature branch will be used per discussion belowfork.yaml
.The text was updated successfully, but these errors were encountered: