op-chain-ops: implement withdrawal hashing#3469
Conversation
|
|
This PR changes implementation code, but doesn't include a changeset. Did you forget to add one? |
1e0fb2d to
5b61f78
Compare
|
Can get test vectors from here: https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000000#internaltx |
e322f43 to
fe114c0
Compare
trianglesphere
left a comment
There was a problem hiding this comment.
LGTM - one Q about some test setup. I really like how it compares the computed slot vs what get set in the trace.
|
Recusing myself from review here; others will have more insightful feedback. |
f6f570c to
9729d90
Compare
Good call on catching that error, I have updated it to panic on error of abi deserialization |
9729d90 to
8d0c4b1
Compare
Fuzzes the L2ToL1MessagePasser for state changes to its storage. This specifically tests that the storage slot that the proofs are generated against is computed correctly. This is important to test as any changes that break the proof would also break this test. The fuzz runs were used to generate test cases in #3469 for off chain computation of the storage slots for withdrawals.
|
I've added some additional functionality to this PR:
|
Fuzzes the L2ToL1MessagePasser for state changes to its storage. This specifically tests that the storage slot that the proofs are generated against is computed correctly. This is important to test as any changes that break the proof would also break this test. The fuzz runs were used to generate test cases in #3469 for off chain computation of the storage slots for withdrawals.
trianglesphere
left a comment
There was a problem hiding this comment.
A couple small code things, but the rest is looking really good.
|
i have addressed the issues, thanks for the review |
trianglesphere
left a comment
There was a problem hiding this comment.
There's a small bug in the length check code. Fix that and it's good to go.
6641624 to
dd27400
Compare
|
This PR has been added to the merge queue, and will be merged soon. |
|
Not sure why this is failing in CI but not locally for me |
|
It fails for me locally as well. |
|
@tynes is there an issue with the files checked in / something around the path where it's not able to load in the test cases? |
Implement both the new hashing scheme and the legacy hashing for withdrawals so that the withdrawals can be migrated. Also implement encoding and decoding of the withdrawals
a14b2fd to
57dd3f9
Compare
Now that the old message passer is being kept in the L2 state, be sure to the use legacy address. The new message passer is at a different address.
Found the source of the bug, it was due to the way that the L2ToL1MessagePasser is now being handled. Instead of migrating the state at |
Fuzzes the L2ToL1MessagePasser for state changes to its storage. This specifically tests that the storage slot that the proofs are generated against is computed correctly. This is important to test as any changes that break the proof would also break this test. The fuzz runs were used to generate test cases in #3469 for off chain computation of the storage slots for withdrawals.
|
This PR has been added to the merge queue, and will be merged soon. |
|
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Fuzzes the L2ToL1MessagePasser for state changes to its storage. This specifically tests that the storage slot that the proofs are generated against is computed correctly. This is important to test as any changes that break the proof would also break this test. The fuzz runs were used to generate test cases in #3469 for off chain computation of the storage slots for withdrawals.
Fuzzes the L2ToL1MessagePasser for state changes to its storage. This specifically tests that the storage slot that the proofs are generated against is computed correctly. This is important to test as any changes that break the proof would also break this test. The fuzz runs were used to generate test cases in #3469 for off chain computation of the storage slots for withdrawals.
* contracts-bedrock: fuzz L2ToL1MessagePasser Fuzzes the L2ToL1MessagePasser for state changes to its storage. This specifically tests that the storage slot that the proofs are generated against is computed correctly. This is important to test as any changes that break the proof would also break this test. The fuzz runs were used to generate test cases in #3469 for off chain computation of the storage slots for withdrawals. * contracts-bedrock: regenerate snapshot * bindings: regenerate Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Matthew Slipper <me@matthewslipper.com>
Description
Implement both the new hashing scheme and the legacy hashing for withdrawals so that the withdrawals can be migrated.
This only includes tests for legacy style hashing, will follow up with an additional PR to add tests for bedrock style withdrawal hashing to prevent this PR from growing too large.
Closes ENG-2718