-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add interop migration support for opcmv2 in op-deployer #783
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
base: sc-feat/opcm2-interop-migrate-deployer
Are you sure you want to change the base?
feat: add interop migration support for opcmv2 in op-deployer #783
Conversation
…reum-optimism#18386) * op-service: new bgpo module * op-batcher, op-service: integrate bgpo * op-service, op-batcher: wait for cache prepopulation; DefaultPriorityFee; various comments addressed * better comments * downgrade INFO log level to DEBUG * better test
…l - already has comprehensive coverage (ethereum-optimism#18644) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…-optimism#18593) * WIP: opcmv2 upgrade op chain (#752) * feat: upgrade op chain wip * feat: add deployv2 wip * fix: deployerv2 wip * refactor: remove additional V2 version of scripts * refactor: adds OPCM v2 support for UpgradeOPChain.s.sol * refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol * fix: uses correct json key for upgradeInput * fix: uses correct feature flag for OPCM v2 in devfeatures.go * chore: add json tag to ExtraInstruction --------- Co-authored-by: Flux <[email protected]> * feat: adds intermediary struct for op-deployer upgrade (#759) * feat: adds intermediary struct for op-deployer upgrade * chore: moved upgrade scripts to v6_0_0 * chore: remove v2 go scripts * refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2 * feat: add support for both OPCM v1 and v2 on embedded upgrade * refactor: make v6_0_0 fall back to v2_0_0 * refactor: add extra instructions for upgrade superchain input * test: fix op-deployer tests * chore: remove deploy OP chain test step * test: use systemconfig proxy address * fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer * refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2 * feat: add v6_0_0 upgrade * fix: check for 0 len OPChainConfigs * chore: pre-pr ready * Merge pull request #764 from defi-wonderland/fix/opcm2-upgradeopchain-comments fix: opcm2 upgradeopchain comments * refactor: remove enshrined v7_0_0 upgrade in op-deployer (#766) * test: use correct game type and pass correct extra instruction to UpgradeOPChain (#768) * test: add missing extra instructions for OPCM v2 input * fix: add correct game type for cannon kona * fix: opcm2 opd test and sc checks (#777) * chore: set test timeout to 30s (#778) --------- Co-authored-by: niha <[email protected]> Co-authored-by: 0xOneTony <[email protected]>
…optimism#18652) * op-supernode: Don't treat all errors as not found. * op-service: Define JSON marshalling for SuperV1 * op-supernode: Update superroot_atTimestamp response format * Move the response type to the eth package so it can be reused. * Remove unnecessary detail * Not found responses still return the CurrentL1 instead of an error to allow challenger to differentiate between proposals in the future and blocks that just haven't been fully processed yet * op-supernode: Make optimistic blocks available even when full super root is not available. * op-supernode: Add JSON tag to data field. * op-supernode: Fix super root calculation * op-supernode: Fix grammar
…imism#18653) * op-challenger: Implement supernode super root provider. Not currently integrated but has unit tests passing. * Fix sorting.
…s comprehensive coverage (ethereum-optimism#18671) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* op-acceptance-tests: fix port collisions * look for expectedID * normalize peerID before comparison
0xiamflux
left a comment
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.
Excellent work so far, I guess we also will need to add apply tests to check the result of the whole migration.
…tion Replace JSON marshaling with proper ABI encoding using w3 library for migrate inputs. Change OPCM version detection from isDevFeatureEnabled to semantic version comparison. Restructure MigrateInputV1 to use nested GameParameters and Proposal structs. Update DisputeGameConfig.GameArgs from Hash to bytes for correct ABI encoding. Add isVersionAtLeast helper for version comparison (OPCM v2 starts at 7.0.0). Update tests and contracts to use version() method instead of feature flags.
|
Modified files:
|
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.
TODO:
- Refactor
op-devstack/sysgo/superroot.go
op-chain-ops/interopgen/deploy.go
Outdated
| MaxGameDepth: new(big.Int).SetUint64(l2Cfgs[l2ChainID].DisputeMaxGameDepth), | ||
| SplitDepth: new(big.Int).SetUint64(l2Cfgs[l2ChainID].DisputeSplitDepth), | ||
| InitBond: big.NewInt(0), | ||
| ClockExtension: new(big.Int).SetUint64(l2Cfgs[l2ChainID].DisputeClockExtension), | ||
| MaxClockDuration: new(big.Int).SetUint64(l2Cfgs[l2ChainID].DisputeMaxClockDuration), |
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.
todo: change this types from GameParameters struct to uint64
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.
Q: should we change these flags to strings so we can parse them as bigInts? Right now they’re read as uint64, which doesn’t cover the full 256 bit range.
| }, nil | ||
| } | ||
|
|
||
| func MigrateInterop( |
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.
TODO: add MigrateInteropV2
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.
For this task, we’ll also need to modify the flow of the Deploy function. We should probably ask OP for guidance on this. One possible approach is to use GlobalOverrides to set the opcmv2 dev feature flag to true here, so it can be passed through to the DeployImplementations script. That would help keep branching on the go side to a minimum.
the DeploySuperchainToL1 method currently uses OptimismPortalInteropDevFlag as feature bitmap, so we would probably need a DeploySuperchainToL1V2 for opcmv2.
No description provided.