op-supervisor: local-safe reorg support#13645
Conversation
e96901b to
f6fe8e3
Compare
0e1d391 to
8bd1dad
Compare
|
Discussed synchronously, the API updates will be split out so we can land these separately |
8bd1dad to
af475e4
Compare
af475e4 to
5dd6fdc
Compare
0d02172 to
75e26ac
Compare
…acement work, and add action-test for block replacement
axelKingsley
left a comment
There was a problem hiding this comment.
This PR is more impactful than the title suggests, as it also contains things like AttributesToReplaceInvalidBlock, which is the implementation of block replacement to spec.
The Action testing makes this easy to approve, I can see that the supervisor and node both react correctly when a local-safe block is invalid in the cross-safe context.
I have a handful of comment, but none are blocking, so I've approved and will let you address as many of them as you like.
|
Another thing I'm thinking about is: What I think this means is that, looking the local safe database, a given L2 block I think that's okay because it accurately describes the derivation information which is available at each L1 step, but I'm wondering out loud if any of our APIs might find a Local-Safe block |
Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com>
| if tx.Type() != types.DepositTxType { | ||
| return nil, fmt.Errorf("expected deposit tx type, but got %d", tx.Type()) | ||
| } | ||
| signer := types.LatestSignerForChainID(tx.ChainId()) |
There was a problem hiding this comment.
Is it necessary to validate tx.ChainId() matches the actual chainid here?
There was a problem hiding this comment.
It's implicitly checked below when recovering the sender from the tx.
* interop: local-safe invalidation handling v3 * op-node,op-supervisor: build local-safe invalidation replacement block * op-service,op-e2e,op-supervisor: fix lint * op-supervisor: add new cross-safe-update unit tests * op-supervisor: fromda IsDerived test checks * op-node: test InvalidatedBlockSource * op-node: fix and test replace-block attributes * op-node,op-supervisor: fixes to make invalidate-local-safe block-replacement work, and add action-test for block replacement * op-e2e: fix interop tests * Update op-supervisor/supervisor/backend/syncnode/node.go Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com> --------- Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com>
* interop: local-safe invalidation handling v3 * op-node,op-supervisor: build local-safe invalidation replacement block * op-service,op-e2e,op-supervisor: fix lint * op-supervisor: add new cross-safe-update unit tests * op-supervisor: fromda IsDerived test checks * op-node: test InvalidatedBlockSource * op-node: fix and test replace-block attributes * op-node,op-supervisor: fixes to make invalidate-local-safe block-replacement work, and add action-test for block replacement * op-e2e: fix interop tests * Update op-supervisor/supervisor/backend/syncnode/node.go Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com> --------- Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com>
* interop: local-safe invalidation handling v3 * op-node,op-supervisor: build local-safe invalidation replacement block * op-service,op-e2e,op-supervisor: fix lint * op-supervisor: add new cross-safe-update unit tests * op-supervisor: fromda IsDerived test checks * op-node: test InvalidatedBlockSource * op-node: fix and test replace-block attributes * op-node,op-supervisor: fixes to make invalidate-local-safe block-replacement work, and add action-test for block replacement * op-e2e: fix interop tests * Update op-supervisor/supervisor/backend/syncnode/node.go Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com> --------- Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com>
Description
Start of reorg support. This handles the reorg case where a local-safe block is not actually cross-safe.
When a local-safe block is detected to conflict:
Tests
Additional context
Metadata
After this we still have two types of reorgs: