forked from ethstorage/optimism
-
Notifications
You must be signed in to change notification settings - Fork 1
update #6
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
Open
JustXxx
wants to merge
4,397
commits into
JustXxx:develop_4ary
Choose a base branch
from
ethereum-optimism:develop
base: develop_4ary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
update #6
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* WIP - Passing metrics env vars through in l2_cl_kona - Added L2MetricsDashboard sysgo lifecycle component * Documenting and wiring up L2MetricsDashboard Also adds some util unit tests * Adding op-reth metrics support Also: - Updates README with more useful metrics info - Fixes error log in l2_cl_kona.go - Changes default docker exec path to `docker` - Makes available port util threadsafe * Updating GetAvailableLocalPort signature * Adding logging context in kona-node, op-reth, l2 metrics dashboard * GetEnvVarOrDefault: os.GetEnv => os.LookupEnv to allow for setting "" * Single env var to enable/disable metrics for all configured components * Encapsulate vars and functions within sysgo package * Inline metrics endpoint parsing from logs * Adding issues to kona and op-reth and referencing in metrics port setting * Making metrics' subprocesses start/stop in parallel * Moving PrometheusMetricsEndpoint into l2_metrics_dashboard.go * Using new L2MetricsRegistrar interface instead of callbacks Also uses stack.IDWithChain instead of service name * Simplifying PrometheusMetricsTarget Still conveys how to interpret the host & port without storing that on the struct * Using logger's key-value format where possible * Handling file close errors when writing metrics configs * Fixing broken test * Making metrics url parsing more resilient * Start/Stop updates - Removing goroutines from Start - Blocking on waitgroup in Stop instead of waitgroup or context done * Removing failure when registering the same endpoint twice * Removing redundant if * Unexporting util functions * Pinning specific versions of prometheus and grafana Overrides are possible via env vars * Updating Subprocess.Stop calls after rebase
was seeing lots of insufficient funds errors on Jovian alphanet
* Add validation input for cannon-kona prestate * Pass errorPrefix as a parameter to assertValidPermissionlessDisputeGame * Inject gameType into assertValidPermissionlessDisputeGame * Add checks for cannon-kona game type * Cleanup - rename game variables for clarity * Cleanup: guard logic that is only necessary for v1 games * Deploy cannon-kona game for standard validator tests * Update existing test error expectations * Add CannonKona tests * Bump contract versions * Run pre-pr * Preserve current validation methods and structs * Run pre-pr
* fix(op-batcher): exempt generic da from max input size * Apply suggestion from @sebastianst --------- Co-authored-by: Javed Khan <tuxcanfly@gmail.com> Co-authored-by: Sebastian Stammler <seb@oplabs.co>
… fix tests (#17744) * remove proxyAdmin inputs from opcm and sv, derive it from the sysCfg, fix tests * run semver lock for sv * remove unused imports * adapt go code, fix go tests * fix UpgradeOPChain test * fix addGameType go test * use semverComp to make interface usage checks flexible * fix failing ci * use better naming for old opcm interfaces and related contracts * fix go tests * try fix op-acceptance tests * finally fix op-acceptance tests? * update block number in justfile and not do u16a upgrade on tests * add upgradeSuperchainConfig pkg and add e2e bootstrap test for it upgrade in v5_0_0 pkg * fix failing upgrade go test, add more upgradeOPChain solidity test * rm old validate fn from sv interface * rm unused import * add unexpectedEncoding revert test and improved assertion to upgradOPChainInput * fix semgrep * fix upgradeSuperchainConfig script * make upgrade test fork a specific block * update addGameType to support the new opcm addGameType interface * fix go lint * fixes * fixes * fixes * fix semver and go lint * fix go test * fix go test * fix go test * fixes * fixes for add game type go test * fixes * remove outdated test * pull and fix
* ctb: Fix OPCM std validator test setup for v2 DG * fix typo
#18027) * op-deployer: Fix error handling in add_game_type CLI parsing. Previously it exited with an error message when there was no error. * op-deployer: Add flags for new implementations options Also provides standard values as defaults.
* opcm: Add CANNON_KONA support for opcm.upgrade * fix sepolia upgrade integration test * run cannon-kona upgrade in integration test * remove debugme * fix stdvalidator.test_init * fix outdated opcm bindings * update semver; snapshots * cleanup setNewGameImplV2 * fix semver; fix natspec * fix op-deployer Migrate input encoding * fix nits * fix semantic merge conflict * fix fmt * update semver * only expect cannon-kona reverts if feature flag set
…zation (#18028) * fix(test): add missing event expectation in burn test * refactor(test): remove redundant initiateWithdrawal tests and add nonce assertion * test(contracts): add coverage for version, receive, messageNonce, and burn edge case * refactor(test): reorganize test contracts to match source function order * fix(test): restore removed initiateWithdrawal tests with scenario-specific assertions * refactor(test): remove redundant zero-balance burn test per review * refactor(test): remove unnecessary contract code length assertion per review --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* refactor(test): remove redundant contract name from constructor test Simplified test_constructor_operatorFeeVault_succeeds to test_constructor_succeeds to match naming convention used in other FeeVault tests (BaseFeeVault, etc.) * test(contracts): add version format validation for OperatorFeeVault Added OperatorFeeVault_Version_Test contract to validate that the version constant returns a valid semver string using SemverComp.parse() * refactor(test): reorganize test contracts to match source declaration order Moved Version_Test before Constructor_Test to match the order in which version (line 21) and constructor (line 25) are declared in OperatorFeeVault.sol --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…8024) * op-deployer: Support working with V2 fault dispute game contracts * Deploying implementations supports the fault dispute game configuration options previously used by deploy dispute game * DeployDisputeGame has been updated to work with v1 and v2 contracts * SetDisputeGameImpl works with and without game args * ReadImplementationAddresses loads the V2 dispute game addresses * op-deployer: Don't validate inputs set as game args when v2 is enabled. * op-deployer: Restore absolute prestate check for V1 contracts. * opcm: Read super dispute game implementation addresses. * opcm: Allow clock extension to be zero again * Store permissionedDisputeGame when V2 enabled * opcm: Restore the clockExtension > 0 check
fails against isthmus networks. Discovered when running against jovian betanet.
* opcm: Set cannon_kona init bond during upgrade * address review comments
* dispute-mon: Add metric to track node endpoint errors * dispute-mon: Add node endpoint error count metric * dispute-mon: Add metric for mixed availability of nodes * dispute-mon: Add metric to track mixed safety * dispute-mon: Add metric for disagreeing output roots * Increase log level for mixed availability * Use better check for RollupEndpointErrors * Fix test after merge * Remove useless logging * Remove unnecessary fields from Service struct * Remove unused function and lint fix
The latest mise (installed by brew) errors if tools don't have a known install source even if they're disabled. While we control the version of mise used in CI, local development depends on an existing mise to bootstrap and there isn't a good way to ensure it is using a specific version.
* remove DeployProxy * fixes
* fix: bump mips version from 7 to 8 * fix: don't require building binary to use justfile with correct op-deployer version * fix: remove mips version arg
* feat(ci): run upgrade tests with dev flags Updates CI to run upgrade tests with dev flags enabled. Only OP will run with dev flags enabled for now, this should be sufficient and will avoid dramatically increasing CI impact. * fix: correct cannon kona prestate in validator tests
* Update opcm.migrate to set super-cannonKona * Validate cannonKona prestates during migrate * Update OCPM migrate tests * Cleanup: add helper to construct gameType expectations * Fix game validation test logic * Fix shadowed var warning * Rework op-deployer migrate CLI args for absolute prestate * Read cannonKona prestate in GenerateOPCMMigrateCalldata * Don't create SuperCannonKona game if prestate is zero * Update migration gameType helper * Clean up test logic, perform stricter checks on empty games * Add error messages * Clear game args when game impl removed * Add test with empty cannonKona prestate * Enforce non-empty cannon prestate * Bump contract version * Run just pre-pr * Cleanup and add another test * Fix test documentation * Add new prestate flags to the migrate CLI command * Update script comment with updated sample input * Add check for consistent permissionless weth contracts post-migrate * Bump opcm version again * Run semver-lock
* all: update op-geth to pull in fusaka timestamps * update for scr changes * point go.mod at op-geth rc * address comment
* wiring for l2.follow.source * Follow Safe without handling external safe > local unsafe * safe follow * safe follow consider unsafe gap EL Sync * follow finalized * Comments * cleanup * drop unused interface methods * sanity check external finalized * Adjust follow source log level * op-devstack: Follow Source Support * op-acceptance-tests: Follow Source * op-devstack: Follow Source Support * simplify labeling * l1 reorg protection: reset * add reorg tc * typo * follow source: check unsafe * convention * Add unsafe only reorg test * devstack/acceptance test : rename FollowSource to FollowL2 * follow upstream source enabled when derivation disabled, reorg detection * fix unsafe only reorg sync test comments * rm unused interface method * dsl * devstack support for ext sync test + follow l2 * op-acceptance-tests: Follow L2 using Ext + SyncTester * use blockref * fix log msg err * Fix composite interface naming * op-node: Follow Source: EL / CL support * devstack: Allow EL or CL to be follow source * Inject CurrentL1 * logs for injecting CurrentL1 * refactor to less rpc calls * acceptance-tests: Check CurrentL1 is advancing * linter * fix error args * sanity check external values using L1 * op-node: Follow Source CL and drop unsafeOnly * op-acceptance-tests: drop EL follow source / Unsafe Only tests * op-devstack|acceptance-tests: Follow Source CL * op-node: Follow Client: only allow CL source * drop unused args * rm redundant unsafe head reorg logic * rm unused dsl * Do not use functions
* chore: Add SafeRename ioutil utility * fix: Lint
* feat: have OPCMv2 check upgrade ordering version This PR introduces a check in OPCM that validates that the version difference in the previous OPCM and the current OPCM is acceptable. This PR explicitly disallows skipping OPCM versions which was previously an implicit requirement. * fix: properly set version testing flag * fix: semver lock * fix: move valid instructions allowance * fix: semver lock * fix: better mechanism for checking permitted upgrades * fix: properly run permitted upgrade sequence tests
* chore: bump opcmv2 to v7 * fix: correct version in upgrade sequence * fix: broken tests
* verify opcm v2 * fixes * fixes * some fixes * some fixes * some fixes * fix verifyOPCM v1 tests * fix verifyOPCM v1 tests * fix ci checks * better approach to tests, less diff * improve test coverage * fix typo * fix semver * Update packages/contracts-bedrock/scripts/deploy/VerifyOPCM.s.sol Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com> --------- Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
* ci: Fix contracts test-upgrade test junit output * fix test-upgrade xml output
* proofs: Add provable output roots to super DGs This patch updates the SuperFaultDisputeGame to explicitly prove output roots contained in the super root. This is accomplished by requiring proposers to provide the preimage of the super root when creating a SuperFaultDisputeGame. The Super DG is then extended with a rootClaim(uint256 _l2ChainId) method that returns specific output roots contained in the proposal. This allows withdrawals to be proven using only an output root. * review comments * fix nits; update interfaces * update snapshots * fix panic in non-l2oo proposals
Pull in superchain registry changes and a few other minor changes. No upstream merges.
…18589) * WIP * wip * WIP * Treat NotFound next L1 origin as chain end * Use recover mode in sequence window expiry test * Invoke fault proof earlier and fix typos Run env.RunFaultProofProgram after computing l2SafeHead (l2SafeHead.Number.Uint64()/2) and replace the FromGenesis call with RunFaultProofProgram. Fix minor comment typos and wrap a long log line. * reduce diff * Use requireL1OriginAt helper in test Replace manual error assertions around FindL1Origin with requireL1OriginAt and remove the now-unused derive import. * Introduce L2Sequencer.ActMaybeL2StartBlock * add TestRecoverModeWhenChainHealthy acceptance test sysgo only * Add SetSequencerRecoverMode and enable debug logs * Adjust L1 block time and sequence window test Set default L1 block time to 12s to match action helper assumptions. Increase sequencer window size in the test to 50. Compute drift from UnsafeL2 headers (use UnsafeL2.L1Origin). Simplify L1 mining to always BatchMineAndSync and remove the extra numL1Blocks > 10 lag guard. * restore stub * WIP * name errs * refactor * fix * add test * Rename error constant and add L1 origin tests Rename ErrInvalidL1OriginChild to ErrNextL1OriginOrphaned and adjust the error text. Add test cases covering L1 reorg and invalid L1 origin, and refactor the test case construction in the unit test. * Use drift check for next L1 origin and update tests Compute driftNext and use it to decide adoption of the next L1 origin instead of comparing absolute timestamps. Bump MaxSequencerDrift to 1800 and add tests covering max-drift and negative-drift scenarios. * Refactor L1 origin selection and error handling Delegate origin decision logic to FindL1OriginOfNextL2Block and handle synchronous fetch when in recover mode. Remove recover-mode fetching from CurrentAndNextOrigin and return cached values instead. Update sequencer error handling to distinguish invalid/orphaned origin (which triggers a reset) from temporary lookup errors. * fixes * fixes * lint * don't use pointers saves some translation code * handle retries without a "temporary error" fixes action tests * use Fjord drift constant * fix origin_selector_test mainly just asserting on sentinel errors, and taking account of small optimization (fewer network calls) * Simplify FindL1Origin * move new pure function into a method on los * Update comment to refer to empty nextL1Origin * Use errors.Is for L1 origin error checks * Return L1 origin on validation errors * Add expectedResult to origin selector tests Set expectedResult for the test cases with l2Head d1000 and e1000 to assert the expected L1 origins (c101 and c100 respectively) * Add assertion message and clarify origin comments Provide a helpful failure message in sequence_window_expiry_test when the safe head doesn't advance after the sequencing window expires. Document that the current L1 origin should always be non-empty and add a panic guard. Clarify the rationale for requiring the next L1 origin, include a source link, and note the effect on unsafe block production. * Store recoverMode and add comment period * Update op-node/rollup/sequencing/origin_selector.go Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com> * Update op-node/rollup/sequencing/origin_selector.go Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com> --------- Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>
* feat: add readsuperchaindeployment for opcm v2 * fix: argument in PopulateSuperchainState & add docs (#734) * fix: set superchainConfig to zero for populateSuperchainState with opcmV1 * docs: add clarification of opcmv1 deprecation * fix: remove unused opcmV2Enabled var * test: opcm2 add read sup chain tests (#754) * chore: expand comment on ReadSuperchainDeployment.s.sol and init.go * test: add additional test cases for PopulateSuperchainState and InitLiveStrategy * fix: adds the right number of hex digits to OPCMV2DevFlag in devfeatures.go (#755) * fix: remove branching in init.go & link TODO issue (#760) * docs: link todo issue * refactor: remove branching in init.go WIP * fix: remove unused opcmv2 feature flag * fix: remove console logs * fix: set original timeout, fix isOpcmV2 version and add populateSuperchainState tests * fix: set original timeout * fix: isOpcmV2 version * feat: add test cases for populateSuperchainState and unify tests * fix: ocpm version comments --------- Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com> Co-authored-by: OneTony <onetony@defi.sucks> Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
* test: use a custom Test contract for makeAddr This PR introduces a light wrapper around the forge Test contract specifically for the purpose of making sure people are using a version of makeAddr that will always be reproducible. Without this makeAddr uses a private key which means that fork tests can be unreliable if people mess with these addresses on mainnet. * fix: compilation failures * fix: linting issues, version issues
* test: update succinct tests to follow our conventions * fix: test naming and remove unused imports * chore: add AccessManager snapshots Contract changed from abstract to concrete, now needs snapshot files. * fix: specify GameOver revert in expectRevert * fix: snapshot for access manager * fix: create interface for contract * fix: snapshot semver bump * fix: bump semver * chore: bump semver * fix: semver lock mismatch * fix: enforce strict pragma for deterministic init code hashes * chore: fix pragma * fix: lock pragma versions * fix: semver lock passing * chore: cleanup whitespace * chore: bump semver * chore: reduce diff * fix: strict pragma * feat: fix for ci and compiler profile * chore: forge fmt * fix: regenerate semver-lock with clean build The semver-lock.json had incorrect hashes due to stale build artifacts. Clean build restores hashes to match develop. * fix: semgrep for proxy * fix: workaround for potential cache issue * chore: clean build semver bump * fix: remove troubleshooting * chore: bump semver * fix: compiler setting issues * chore: remove helper for vm.getCode * refactor: reuse DisputeGameFactory_TestInit in OPSuccinct tests Remove duplicated setup logic from OPSuccinctFaultDisputeGame tests by inheriting from DisputeGameFactory_TestInit instead of Test. - Add setupOPSuccinctFaultDisputeGame() helper to DisputeGameFactory_TestInit - Add OPSuccinctGameParams struct for configurable game parameters - Remove ~100 lines of duplicated contract deployment code - Update variable references to use inherited contracts * refactor: rename OPSuccinctFaultDisputeGame to OptimisticZkGame Align contract naming with op-challenger's OptimisticZKGameType. Renames: - IOPSuccinctFaultDisputeGame -> IOptimisticZkGame - OPSuccinctFaultDisputeGame -> OptimisticZkGame - Test contracts and helper functions updated accordingly * chore: remove unused import * chore: bump snapshots * fix: update abi_loader.go embed path after rename * fix: update snapshots * fix: circle ci cache fix * fix: ci cache * chore: add back placeholder for opsuccinet * chore: remove cache-lite * fix: make OptimisticZkGame tests compatible with fork mode Replace hardcoded block numbers and game indices with dynamically calculated values based on anchor state. This allows tests to pass in both regular mode (empty factory) and fork mode (mainnet fork with existing games). * fix: skip OptimisticZkGame tests on fork Tests create games with specific state assumptions that conflict with existing state on forked networks. * fix: use same pattern as fault dispute game * chore: check CI skpping for tests for op zk * fix: remove OPSuccinctFaultDisputeGame from compiler restrictions * fix: move OptimisticZk type into GameTypes and update usage * fix: bump semver
* feat: revert opcm v1 on public interface functions (#699) * feat: revert opcm v1 on public interface functions * fix: add dev flag check for OPCM v2 * feat: OPCM v2 support on for op-deployer (#701) * feat: add feature flag initial * feat: add feature flags to deploy chains using OPCM v2 * chore: remove unused function, update helper function names * chore: remove unused DeployOPChainV2 * chore: add todo for obtaining a superchain config per deployment * fix: remove unnecessary arg and replace function visibility --------- Co-authored-by: niha <205694301+0xniha@users.noreply.github.com> * fix: add superchainConfig input & fix tests in deployopchain (#705) * fix: add superchainConfig input & fix tests in deployopchain * docs: add TODOs * feat: add opcmv2 flag to deployImplementations and apply opcmv2 deployment test * feat: add opcmv2 flag to deployImplementations and add apply opcmv2 deployment test * fix: hardcode flag to avoid import cycles & refactor createOPCMContractV2 * fix: remove todo comment * fix: deploy implementations test branching * refactor: add deployOPCMStandardValidatorV2 * fix: add test and script checks * fix: remove cgt & fix tests (#736) * fix: remove cgt * fix: query chainIdToBatchInboxAddress in chain assertions script * fix: add skip deploy ocpmv1 when v2 enabled * refactor: remove unnecesary function * fix: opcm semver * chore: add todo comment with issue number (#737) --------- Co-authored-by: IamFlux <175354924+0xiamflux@users.noreply.github.com> * refactor: match assert pattern on OPCM v1 (#749) * refactor: adheres OPCM v1 revert function to assert pattern * chore: enable deny_warnings on foundry.toml * chore: pre-pr ready * fix: add implementations for StandardValidator when using OPCMv2 * chore: pre-pr ready (#758) * fix: remove cgt checks for opcmv2 (#765) * chore: opcm revert develop sync (#769) * feat(ci): mise; cache & retries. (#18572) * op-node: Light CL: Always Follow Source using CL (#18571) * wiring for l2.follow.source * Follow Safe without handling external safe > local unsafe * safe follow * safe follow consider unsafe gap EL Sync * follow finalized * Comments * cleanup * drop unused interface methods * sanity check external finalized * Adjust follow source log level * op-devstack: Follow Source Support * op-acceptance-tests: Follow Source * op-devstack: Follow Source Support * simplify labeling * l1 reorg protection: reset * add reorg tc * typo * follow source: check unsafe * convention * Add unsafe only reorg test * devstack/acceptance test : rename FollowSource to FollowL2 * follow upstream source enabled when derivation disabled, reorg detection * fix unsafe only reorg sync test comments * rm unused interface method * dsl * devstack support for ext sync test + follow l2 * op-acceptance-tests: Follow L2 using Ext + SyncTester * use blockref * fix log msg err * Fix composite interface naming * op-node: Follow Source: EL / CL support * devstack: Allow EL or CL to be follow source * Inject CurrentL1 * logs for injecting CurrentL1 * refactor to less rpc calls * acceptance-tests: Check CurrentL1 is advancing * linter * fix error args * sanity check external values using L1 * op-node: Follow Source CL and drop unsafeOnly * op-acceptance-tests: drop EL follow source / Unsafe Only tests * op-devstack|acceptance-tests: Follow Source CL * op-node: Follow Client: only allow CL source * drop unused args * rm redundant unsafe head reorg logic * rm unused dsl * Do not use functions * chore: Add SafeRename ioutil utility (#18610) * chore: Add SafeRename ioutil utility * fix: Lint * proofs: Update pinned kona client version (#18611) * feat: have OPCMv2 check upgrade ordering version (#18583) * feat: have OPCMv2 check upgrade ordering version This PR introduces a check in OPCM that validates that the version difference in the previous OPCM and the current OPCM is acceptable. This PR explicitly disallows skipping OPCM versions which was previously an implicit requirement. * fix: properly set version testing flag * fix: semver lock * fix: move valid instructions allowance * fix: semver lock * fix: better mechanism for checking permitted upgrades * fix: properly run permitted upgrade sequence tests * chore: bump opcmv2 to v7 (#18631) * chore: bump opcmv2 to v7 * fix: correct version in upgrade sequence * fix: broken tests * op-chain-ops: Add command to calculate an output root from an EL endpoint. (#18626) * verify opcm v2 (#18590) * verify opcm v2 * fixes * fixes * some fixes * some fixes * some fixes * fix verifyOPCM v1 tests * fix verifyOPCM v1 tests * fix ci checks * better approach to tests, less diff * improve test coverage * fix typo * fix semver * Update packages/contracts-bedrock/scripts/deploy/VerifyOPCM.s.sol Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com> --------- Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com> * codeowners(op-deployer): add platforms team as codeowners (#18635) * ci: Fix contracts test-upgrade test junit output (#18637) * ci: Fix contracts test-upgrade test junit output * fix test-upgrade xml output * proofs: Add provable output roots to super DGs (#18605) * proofs: Add provable output roots to super DGs This patch updates the SuperFaultDisputeGame to explicitly prove output roots contained in the super root. This is accomplished by requiring proposers to provide the preimage of the super root when creating a SuperFaultDisputeGame. The Super DG is then extended with a rootClaim(uint256 _l2ChainId) method that returns specific output roots contained in the proposal. This allows withdrawals to be proven using only an output root. * review comments * fix nits; update interfaces * update snapshots * fix panic in non-l2oo proposals * op-program: Reduce disk usage of preimage prestate builds in ci (#18641) * all: upgrade op-geth (#18646) Pull in superchain registry changes and a few other minor changes. No upstream merges. * refactor+fix(op-node/sequencing): l1 origin selection improvements (#18589) * WIP * wip * WIP * Treat NotFound next L1 origin as chain end * Use recover mode in sequence window expiry test * Invoke fault proof earlier and fix typos Run env.RunFaultProofProgram after computing l2SafeHead (l2SafeHead.Number.Uint64()/2) and replace the FromGenesis call with RunFaultProofProgram. Fix minor comment typos and wrap a long log line. * reduce diff * Use requireL1OriginAt helper in test Replace manual error assertions around FindL1Origin with requireL1OriginAt and remove the now-unused derive import. * Introduce L2Sequencer.ActMaybeL2StartBlock * add TestRecoverModeWhenChainHealthy acceptance test sysgo only * Add SetSequencerRecoverMode and enable debug logs * Adjust L1 block time and sequence window test Set default L1 block time to 12s to match action helper assumptions. Increase sequencer window size in the test to 50. Compute drift from UnsafeL2 headers (use UnsafeL2.L1Origin). Simplify L1 mining to always BatchMineAndSync and remove the extra numL1Blocks > 10 lag guard. * restore stub * WIP * name errs * refactor * fix * add test * Rename error constant and add L1 origin tests Rename ErrInvalidL1OriginChild to ErrNextL1OriginOrphaned and adjust the error text. Add test cases covering L1 reorg and invalid L1 origin, and refactor the test case construction in the unit test. * Use drift check for next L1 origin and update tests Compute driftNext and use it to decide adoption of the next L1 origin instead of comparing absolute timestamps. Bump MaxSequencerDrift to 1800 and add tests covering max-drift and negative-drift scenarios. * Refactor L1 origin selection and error handling Delegate origin decision logic to FindL1OriginOfNextL2Block and handle synchronous fetch when in recover mode. Remove recover-mode fetching from CurrentAndNextOrigin and return cached values instead. Update sequencer error handling to distinguish invalid/orphaned origin (which triggers a reset) from temporary lookup errors. * fixes * fixes * lint * don't use pointers saves some translation code * handle retries without a "temporary error" fixes action tests * use Fjord drift constant * fix origin_selector_test mainly just asserting on sentinel errors, and taking account of small optimization (fewer network calls) * Simplify FindL1Origin * move new pure function into a method on los * Update comment to refer to empty nextL1Origin * Use errors.Is for L1 origin error checks * Return L1 origin on validation errors * Add expectedResult to origin selector tests Set expectedResult for the test cases with l2Head d1000 and e1000 to assert the expected L1 origins (c101 and c100 respectively) * Add assertion message and clarify origin comments Provide a helpful failure message in sequence_window_expiry_test when the safe head doesn't advance after the sequencing window expires. Document that the current L1 origin should always be non-empty and add a panic guard. Clarify the rationale for requiring the next L1 origin, include a source link, and note the effect on unsafe block production. * Store recoverMode and add comment period * Update op-node/rollup/sequencing/origin_selector.go Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com> * Update op-node/rollup/sequencing/origin_selector.go Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com> --------- Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com> * feat: add ReadSuperchainDeployment support for opcm v2 (#18520) * feat: add readsuperchaindeployment for opcm v2 * fix: argument in PopulateSuperchainState & add docs (#734) * fix: set superchainConfig to zero for populateSuperchainState with opcmV1 * docs: add clarification of opcmv1 deprecation * fix: remove unused opcmV2Enabled var * test: opcm2 add read sup chain tests (#754) * chore: expand comment on ReadSuperchainDeployment.s.sol and init.go * test: add additional test cases for PopulateSuperchainState and InitLiveStrategy * fix: adds the right number of hex digits to OPCMV2DevFlag in devfeatures.go (#755) * fix: remove branching in init.go & link TODO issue (#760) * docs: link todo issue * refactor: remove branching in init.go WIP * fix: remove unused opcmv2 feature flag * fix: remove console logs * fix: set original timeout, fix isOpcmV2 version and add populateSuperchainState tests * fix: set original timeout * fix: isOpcmV2 version * feat: add test cases for populateSuperchainState and unify tests * fix: ocpm version comments --------- Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com> Co-authored-by: OneTony <onetony@defi.sucks> Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com> * fix: opcmv2 view function calls --------- Co-authored-by: Stefano Charissis <stefano@oplabs.co> Co-authored-by: Changwan Park <pcw109550@gmail.com> Co-authored-by: Ján Jakub Naništa <jan.jakub.nanista@gmail.com> Co-authored-by: Inphi <mlaw2501@gmail.com> Co-authored-by: smartcontracts <14298799+smartcontracts@users.noreply.github.com> Co-authored-by: Adrian Sutton <adrian@oplabs.co> Co-authored-by: Michael Amadi <amadimichaeld@gmail.com> Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com> Co-authored-by: serpixel <5087962+serpixel@users.noreply.github.com> Co-authored-by: Josh Klopfenstein <joshklop@oplabs.co> Co-authored-by: George Knee <georgeknee@googlemail.com> Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com> Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com> Co-authored-by: OneTony <onetony@defi.sucks> * Revert "chore: opcm revert develop sync (#769)" This reverts commit d84f0b9. * fix: sync commit --------- Co-authored-by: IamFlux <175354924+0xiamflux@users.noreply.github.com> Co-authored-by: OneTony <onetony@defi.sucks> Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com> Co-authored-by: Stefano Charissis <stefano@oplabs.co> Co-authored-by: Changwan Park <pcw109550@gmail.com> Co-authored-by: Ján Jakub Naništa <jan.jakub.nanista@gmail.com> Co-authored-by: Inphi <mlaw2501@gmail.com> Co-authored-by: smartcontracts <14298799+smartcontracts@users.noreply.github.com> Co-authored-by: Adrian Sutton <adrian@oplabs.co> Co-authored-by: Michael Amadi <amadimichaeld@gmail.com> Co-authored-by: serpixel <5087962+serpixel@users.noreply.github.com> Co-authored-by: Josh Klopfenstein <joshklop@oplabs.co> Co-authored-by: George Knee <georgeknee@googlemail.com> Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>
Required for Kona
* 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 (#18644) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* 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 <175354924+0xiamflux@users.noreply.github.com> * 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 <205694301+0xniha@users.noreply.github.com> Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
* 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
* op-challenger: Implement supernode super root provider. Not currently integrated but has unit tests passing. * Fix sorting.
…s comprehensive coverage (#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
Confusion likely led to an innocuous security report.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.