test: local multi-rollup environment with real contracts#60
Merged
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
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.
Summary
Adds a self-contained local test environment that stands up two canonical rollups in the same Registry on anvil, using real production bytecode for every contract (no mocks). Lets us validate multi-rollup behaviour end-to-end against the indexer's
/api/rollupsendpoint and downstream hooks before we touch the dashboard's claim/withdraw flows in a follow-up.This is a testing-only PR, no frontend or indexer behaviour changes. Just three scripts + a README under
scripts/multi-rollup-test/.Dependant PR
This PR depends on #59 merging
What's in the box
scripts/multi-rollup-test/deploy-multi-rollup.shorchestrates:anvil_setCode(wagmiuseReadContractsneeds it; anvil doesn't deploy it).aztec-packages/l1-contractsDeployAztecL1Contracts.s.sol, Registry, GSE, Governance, Rollup v1, MockVerifier, TestERC20s.DeployRollupForUpgrade.s.solwith a fresh randomGENESIS_ARCHIVE_ROOTto mint a Rollup v2 with a different version hash.anvil_impersonateAccountGovernance and callRegistry.addRollup(v2)so the Registry knows about both versions.SplitsWarehouse,PullSplitFactory,StakingRegistry,ATPFactory(with library linking for the LATP/MATP/NCATP factory libs),ATPWithdrawableAndClaimableStakerfromignition-contracts. Wires them up with the staking asset and Registry from Phase 1.deploy-output.json(every address, for the seed scripts) pluscontract_addresses.jsonin the schema bothbootstrap.shscripts already understand. Drop them in viaCONTRACT_ADDRESSES_FILE.scripts/multi-rollup-test/seed-multi-rollup.ts:anvil_setStorageAt(matrix in the README).isRewardsClaimable=trueon both rollups without clobbering the packed timestamp at offset 0.claimSequencerRewardscan pay out.scripts/multi-rollup-test/seed-providers.ts:StakingRegistry.registerProvider(admin, takeRate, recipient)so/api/providersreturns non-empty data.scripts/multi-rollup-test/README.md:claimSequencerRewardsinsufficient balance, Multicall3 missing,HonkVerifier.solmissing, ERC-7201 storage slot calculation, Governance ownership of the Registry.