-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: Updates for L2 withdrawals root in header #12848
Conversation
📚
|
fc6b673
to
79609ed
Compare
bb28ebc
to
2449a55
Compare
2449a55
to
a011f49
Compare
e0cfbf2
to
0aaf2c1
Compare
7848fb3
to
e7e29f3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #12848 +/- ##
===========================================
- Coverage 47.48% 47.33% -0.15%
===========================================
Files 945 947 +2
Lines 79017 79136 +119
Branches 760 760
===========================================
- Hits 37519 37458 -61
- Misses 38656 38831 +175
- Partials 2842 2847 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
e7e29f3
to
8d11a2e
Compare
349081f
to
bb148a3
Compare
8d11a2e
to
b85c52a
Compare
bb148a3
to
6054bed
Compare
d55e52e
to
144e2e1
Compare
144e2e1
to
d07938e
Compare
* test all combinations - with/without withdrawal transaction before, at and after isthmus
raise a separate PR for it.
Also fix a test in rollup, with the correct expectation for sepolia holocene time
also include a missing error when p2p validation fails
- do not set withdrawalsRoot if pre-isthmus - op-e2e: create a allocs file for isthmus
* SSZ inferVersion is updated to infer V4 only when withdrawalsRoot is non-nil and it is not equal to the EmptyWithdrawalsHash * Payload/Attribute validation is similarly updated to allow pre-isthmus blocks to contain either a nil WithdrawalsRoot or EmptyWithdrawalsHash value
11620de
to
3419f1f
Compare
@@ -292,7 +301,7 @@ func (envelope *ExecutionPayloadEnvelope) CheckBlockHash() (actual common.Hash, | |||
return blockHash, blockHash == payload.BlockHash | |||
} | |||
|
|||
func BlockAsPayload(bl *types.Block, shanghaiTime *uint64) (*ExecutionPayload, error) { | |||
func BlockAsPayload(bl *types.Block, config *params.ChainConfig) (*ExecutionPayload, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now need to check for IsthmusTime
as well before setting WithdrawalsRoot
in the payload, so we pass in ChainConfig
.
return payload, nil | ||
} | ||
|
||
func BlockAsPayloadEnv(bl *types.Block, shanghaiTime *uint64) (*ExecutionPayloadEnvelope, error) { | ||
payload, err := BlockAsPayload(bl, shanghaiTime) | ||
func BlockAsPayloadEnv(bl *types.Block, config *params.ChainConfig) (*ExecutionPayloadEnvelope, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now need to check for IsthmusTime as well before setting WithdrawalsRoot in the payload, so we pass in ChainConfig.
respChecker RPCRespCheck | ||
} | ||
|
||
type RPCRespCheck interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface is added so we can enforce any checks on the RPC responses. Since the EthClient
wraps both a L1
and L2
client, the interface methods can be implemented (or not) appropriately based on the client type.
@protolambda When testing, I was seeing in the e2e tests that even without isthmus active, the
So I've tweaked the rule in Pre-Isthmus (& Post Shanghai), ensure that withdrawals list is empty and withdrawalsRoot is either nil or an empty list hash |
Closing in favor of #13962 |
Description
This PR proposes changes to add:
L2ToL1MessagePasser
contract to theExecutionPayload
.v4
) for Isthmus blocks.Tests
Action tests are in a separate PR
Additional context
Addresses changes to Consensus Layer to support L2 withdrawals root in the block header, as outlined in #12044
Spec changes: ethereum-optimism/specs#394
EL changes:
Metadata
None.