refactor: move L1 network defaults source of truth to l1-contracts#24434
Open
fcarreiro wants to merge 1 commit into
Open
refactor: move L1 network defaults source of truth to l1-contracts#24434fcarreiro wants to merge 1 commit into
fcarreiro wants to merge 1 commit into
Conversation
2dee6a4 to
a896ac0
Compare
a896ac0 to
407ab69
Compare
Collaborator
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
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
Prep for the foundation / node / fairies repo split: make
l1-contractsown the canonical L1 contract configuration defaults instead of deriving them fromspartan/environments/network-defaults.yml. The new source of truth isl1-contracts/scripts/network-defaults.json, published via@aztec/l1-artifactsand consumed directly by both the Solidity deploy scripts and@aztec/ethereum. This flips the dependency tospartan → l1-contracts, the right direction for the split.Worth noting is that now the defaults in
@aztec/ethereumread from the JSON in@aztec/l1-artifactsand NOT from the yml files. IIUC the yml files are for kubernetes deployment and this change would not affect someone that wants to run a docker image with a sequencer/prover.Changes
l1-contracts/scripts/network-defaults.jsonas the committed, canonical set of L1 contract defaults. This replaces the gitignoredl1-contracts/generated/default.jsonthat used to be generated from the yaml at bootstrap. It also adds the parametersRollupConfiguration.solreads that were previously only defaulted in Solidity (AZTEC_SLASHING_QUORUM,AZTEC_ENTRY_QUEUE_*).@aztec/l1-artifacts(new package export + copied into the bundled foundry subtree bycopy-foundry-artifacts.sh).@aztec/ethereum's config now imports the JSON from@aztec/l1-artifactsdirectly (import … with { type: 'json' }). Deleted the generatedl1-contracts-defaults.tsand its generator (scripts/generate.sh), and droppedethereumfrom the yarn-project bootstrap generate step.l1-contracts/scripts/load_network_defaults.shnow reads the JSON — network-agnostic, no network argument, no yaml.spartan'sdeploy_rollup_upgrade.shswitches to spartan's own network-aware yaml loader for its per-network needs.foundry.tomlfs_permissions and the deploy.t.solscripts read fromscripts/network-defaults.json.l1-contractssection ofnetwork-defaults.ymlis now a hand-synced mirror of the JSON (it still feeds theslasher/cligenerators and thenetworkspresets). Docs updated:spartan/CLAUDE.md, the yaml header, and the governance rollup-upgrade tutorial.RollupConfiguration.solnow reads parameters viavm.envUint/envBool(required) instead ofvm.envOr(silent Solidity fallback). Consequently the deploy-script tests (DeployAztecL1Contracts.t.sol,DeployRollupForUpgrade.t.sol) now forward those env vars from the JSON insetUp().Behaviour change in l1-contracts tests
The tests now use the values in the network-agnostic JSON and therefore do NOT use the same values as before (devnet).
Testing
l1-contracts:forge testpasses for both deploy suites —DeployAztecL1ContractsTest::test_SmokeTestandDeployRollupForUpgradeTest::test_DeployThenUpgrade.@aztec/ethereum: builds cleanly;DefaultL1ContractsConfigloads from the JSON at runtime with exactbigintthreshold values (no precision loss).Closes https://linear.app/aztec-labs/issue/A-1358/decouple-spartan-network-configuration-and-l1-contracts