@aztec/l1-artifacts 0.0.1-commit.f146247c → 0.0.1-commit.f1df4d2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dest/HonkVerifierBytecode.d.ts +2 -2
  2. package/dest/HonkVerifierBytecode.d.ts.map +1 -1
  3. package/dest/HonkVerifierBytecode.js +1 -1
  4. package/l1-contracts/cache/solidity-files-cache.json +1 -1
  5. package/l1-contracts/foundry.toml +1 -1
  6. package/l1-contracts/generated/HonkVerifier.sol +65 -70
  7. package/l1-contracts/out/CoinIssuer.sol/CoinIssuer.json +1 -1
  8. package/l1-contracts/out/DateGatedRelayer.sol/DateGatedRelayer.json +1 -1
  9. package/l1-contracts/out/DeployAztecL1Contracts.s.sol/DeployAztecL1Contracts.json +1 -1
  10. package/l1-contracts/out/DeployAztecL1Contracts.t.sol/DeployAztecL1ContractsTest.json +1 -1
  11. package/l1-contracts/out/DeployRollupForUpgrade.s.sol/DeployRollupForUpgrade.json +1 -1
  12. package/l1-contracts/out/DeployRollupForUpgrade.t.sol/DeployRollupForUpgradeTest.json +1 -1
  13. package/l1-contracts/out/DeployRollupLib.sol/DeployRollupLib.json +1 -1
  14. package/l1-contracts/out/DeploymentConfiguration.sol/DeploymentConfiguration.json +1 -1
  15. package/l1-contracts/out/FeeAssetHandler.sol/FeeAssetHandler.json +1 -1
  16. package/l1-contracts/out/FlushRewarder.sol/FlushRewarder.json +1 -1
  17. package/l1-contracts/out/HonkVerifier.sol/BaseHonkVerifier.json +1 -1
  18. package/l1-contracts/out/HonkVerifier.sol/CommitmentSchemeLib.json +1 -1
  19. package/l1-contracts/out/HonkVerifier.sol/FrLib.json +1 -1
  20. package/l1-contracts/out/HonkVerifier.sol/Honk.json +1 -1
  21. package/l1-contracts/out/HonkVerifier.sol/HonkVerificationKey.json +1 -1
  22. package/l1-contracts/out/HonkVerifier.sol/HonkVerifier.json +1 -1
  23. package/l1-contracts/out/HonkVerifier.sol/IVerifier.json +1 -1
  24. package/l1-contracts/out/HonkVerifier.sol/RelationsLib.json +1 -1
  25. package/l1-contracts/out/HonkVerifier.sol/TranscriptLib.json +1 -1
  26. package/l1-contracts/out/IDateGatedRelayer.sol/IDateGatedRelayer.json +1 -1
  27. package/l1-contracts/out/IFlushRewarder.sol/IFlushRewarder.json +1 -1
  28. package/l1-contracts/out/IMintableERC20.sol/IMintableERC20.json +1 -1
  29. package/l1-contracts/out/ISlashFactory.sol/ISlashFactory.json +1 -1
  30. package/l1-contracts/out/InputsExtractor.sol/InputsExtractor.json +1 -1
  31. package/l1-contracts/out/MockERC20.sol/MockERC20.json +1 -1
  32. package/l1-contracts/out/MockERC721.sol/MockERC721.json +1 -1
  33. package/l1-contracts/out/MockFeeJuicePortal.sol/MockFeeJuicePortal.json +1 -1
  34. package/l1-contracts/out/MockVerifier.sol/MockVerifier.json +1 -1
  35. package/l1-contracts/out/MockZKPassportVerifier.sol/MockZKPassportVerifier.json +1 -1
  36. package/l1-contracts/out/MultiAdder.sol/MultiAdder.json +1 -1
  37. package/l1-contracts/out/RegisterNewRollupVersionPayload.sol/RegisterNewRollupVersionPayload.json +1 -1
  38. package/l1-contracts/out/Registry.sol/Registry.json +1 -1
  39. package/l1-contracts/out/RewardDistributor.sol/RewardDistributor.json +1 -1
  40. package/l1-contracts/out/RollupConfiguration.sol/RollupConfiguration.json +1 -1
  41. package/l1-contracts/out/SlashFactory.sol/SlashFactory.json +1 -1
  42. package/l1-contracts/out/SlashPayload.sol/SlashPayload.json +1 -1
  43. package/l1-contracts/out/StakingAssetHandler.sol/StakingAssetHandler.json +1 -1
  44. package/l1-contracts/out/StdError.sol/stdError.json +1 -1
  45. package/l1-contracts/out/TestERC20.sol/TestERC20.json +1 -1
  46. package/l1-contracts/out/ZKPassportHelper.sol/ZKPassportHelper.json +1 -1
  47. package/l1-contracts/out/ZKPassportRootVerifier.sol/ZKPassportRootVerifier.json +1 -1
  48. package/l1-contracts/out/ZKPassportSubVerifier.sol/ZKPassportSubVerifier.json +1 -1
  49. package/l1-contracts/out/build-info/{bcca871da7c17f8e.json → 6b707081690bc1a6.json} +1 -1
  50. package/l1-contracts/out/build-info/{33d81a4b1b05e4ba.json → 8103921c6e825236.json} +1 -1
  51. package/l1-contracts/out/shouting.t.sol/ScreamAndShoutTest.json +1 -1
  52. package/l1-contracts/script/deploy/DeployRollupForUpgrade.s.sol +17 -1
  53. package/l1-contracts/test/script/DeployAztecL1Contracts.t.sol +61 -0
  54. package/l1-contracts/test/script/DeployRollupForUpgrade.t.sol +112 -0
  55. package/package.json +1 -1
  56. package/l1-contracts/solc-0.8.30 +0 -0
@@ -8,6 +8,7 @@ import {console} from "forge-std/console.sol";
8
8
 
9
9
  import {IERC20} from "@oz/token/ERC20/IERC20.sol";
10
10
 
11
+ import {IInstance} from "@aztec/core/interfaces/IInstance.sol";
11
12
  import {IRollup} from "@aztec/core/interfaces/IRollup.sol";
12
13
  import {IStaking} from "@aztec/core/interfaces/IStaking.sol";
13
14
 
@@ -16,6 +17,8 @@ import {GSE} from "@aztec/governance/GSE.sol";
16
17
  import {Registry} from "@aztec/governance/Registry.sol";
17
18
  import {IRewardDistributor} from "@aztec/governance/interfaces/IRewardDistributor.sol";
18
19
 
20
+ import {RegisterNewRollupVersionPayload} from "@aztec/periphery/RegisterNewRollupVersionPayload.sol";
21
+
19
22
  import {DeployRollupLib, RollupAddressInput, RollupAddressOutput} from "./DeployRollupLib.sol";
20
23
  import {IRollupConfiguration, RollupConfiguration} from "./RollupConfiguration.sol";
21
24
 
@@ -33,11 +36,19 @@ contract DeployRollupForUpgrade is Script {
33
36
  /// @notice Rollup deployment output
34
37
  RollupAddressOutput internal _rollupOutput;
35
38
 
39
+ /// @notice Governance payload for registering the new rollup version
40
+ RegisterNewRollupVersionPayload internal _payload;
41
+
36
42
  /// @notice Get rollup deployment output
37
43
  function rollupOutput() external view returns (RollupAddressOutput memory) {
38
44
  return _rollupOutput;
39
45
  }
40
46
 
47
+ /// @notice Get the deployed governance payload
48
+ function payload() external view returns (RegisterNewRollupVersionPayload) {
49
+ return _payload;
50
+ }
51
+
41
52
  /// @notice Deploy rollup and write output to stdout
42
53
  function run() public {
43
54
  RollupAddressInput memory input = _getRollupAddressInput();
@@ -46,9 +57,14 @@ contract DeployRollupForUpgrade is Script {
46
57
 
47
58
  vm.startBroadcast(input.deployer);
48
59
  _rollupOutput = DeployRollupLib.deployRollup(input, rollupConfig);
60
+
61
+ // Deploy governance payload for registering this rollup via governance
62
+ _payload = new RegisterNewRollupVersionPayload(input.registry, IInstance(address(_rollupOutput.rollup)));
49
63
  vm.stopBroadcast();
50
64
 
51
- string memory finalJson = DeployRollupLib.writeRollupAddressesToJson(vm, "rollup", _rollupOutput);
65
+ // Write base rollup addresses to JSON, then add payload address
66
+ DeployRollupLib.writeRollupAddressesToJson(vm, "rollup", _rollupOutput);
67
+ string memory finalJson = vm.serializeAddress("rollup", "payloadAddress", address(_payload));
52
68
  console.log("JSON DEPLOY RESULT:", finalJson);
53
69
  }
54
70
 
@@ -0,0 +1,61 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright 2024 Aztec Labs.
3
+ pragma solidity >=0.8.27;
4
+
5
+ import {Test} from "forge-std/Test.sol";
6
+ import {stdJson} from "forge-std/StdJson.sol";
7
+
8
+ import {DeployAztecL1Contracts} from "../../script/deploy/DeployAztecL1Contracts.s.sol";
9
+
10
+ contract DeployAztecL1ContractsTest is Test {
11
+ using stdJson for string;
12
+
13
+ // Load environment variables from generated/default.json
14
+ // This file is copied from spartan/environments/default.json by bootstrap.sh
15
+ function setUp() public {
16
+ string memory root = vm.projectRoot();
17
+ string memory path = string.concat(root, "/generated/default.json");
18
+ string memory json = vm.readFile(path);
19
+
20
+ // Timing config
21
+ vm.setEnv("AZTEC_SLOT_DURATION", vm.toString(json.readUint(".AZTEC_SLOT_DURATION")));
22
+ vm.setEnv("AZTEC_EPOCH_DURATION", vm.toString(json.readUint(".AZTEC_EPOCH_DURATION")));
23
+ vm.setEnv("AZTEC_INBOX_LAG", vm.toString(json.readUint(".AZTEC_INBOX_LAG")));
24
+ vm.setEnv("AZTEC_PROOF_SUBMISSION_EPOCHS", vm.toString(json.readUint(".AZTEC_PROOF_SUBMISSION_EPOCHS")));
25
+
26
+ // Validator config
27
+ vm.setEnv("AZTEC_TARGET_COMMITTEE_SIZE", vm.toString(json.readUint(".AZTEC_TARGET_COMMITTEE_SIZE")));
28
+ vm.setEnv(
29
+ "AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET", vm.toString(json.readUint(".AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET"))
30
+ );
31
+ vm.setEnv("AZTEC_LAG_IN_EPOCHS_FOR_RANDAO", vm.toString(json.readUint(".AZTEC_LAG_IN_EPOCHS_FOR_RANDAO")));
32
+ vm.setEnv("AZTEC_LOCAL_EJECTION_THRESHOLD", json.readString(".AZTEC_LOCAL_EJECTION_THRESHOLD"));
33
+ vm.setEnv("AZTEC_EXIT_DELAY_SECONDS", vm.toString(json.readUint(".AZTEC_EXIT_DELAY_SECONDS")));
34
+
35
+ // Fees config
36
+ vm.setEnv("AZTEC_MANA_TARGET", vm.toString(json.readUint(".AZTEC_MANA_TARGET")));
37
+ vm.setEnv("AZTEC_PROVING_COST_PER_MANA", vm.toString(json.readUint(".AZTEC_PROVING_COST_PER_MANA")));
38
+ vm.setEnv("AZTEC_INITIAL_ETH_PER_FEE_ASSET", vm.toString(json.readUint(".AZTEC_INITIAL_ETH_PER_FEE_ASSET")));
39
+
40
+ // Slashing config
41
+ vm.setEnv("AZTEC_SLASHER_FLAVOR", json.readString(".AZTEC_SLASHER_FLAVOR"));
42
+ vm.setEnv("AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS", vm.toString(json.readUint(".AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS")));
43
+ vm.setEnv("AZTEC_SLASHING_OFFSET_IN_ROUNDS", vm.toString(json.readUint(".AZTEC_SLASHING_OFFSET_IN_ROUNDS")));
44
+ vm.setEnv("AZTEC_SLASHING_LIFETIME_IN_ROUNDS", vm.toString(json.readUint(".AZTEC_SLASHING_LIFETIME_IN_ROUNDS")));
45
+ vm.setEnv(
46
+ "AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS",
47
+ vm.toString(json.readUint(".AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS"))
48
+ );
49
+ vm.setEnv("AZTEC_SLASHING_DISABLE_DURATION", vm.toString(json.readUint(".AZTEC_SLASHING_DISABLE_DURATION")));
50
+ vm.setEnv("AZTEC_SLASHING_VETOER", json.readString(".AZTEC_SLASHING_VETOER"));
51
+ vm.setEnv("AZTEC_SLASH_AMOUNT_SMALL", json.readString(".AZTEC_SLASH_AMOUNT_SMALL"));
52
+ vm.setEnv("AZTEC_SLASH_AMOUNT_MEDIUM", json.readString(".AZTEC_SLASH_AMOUNT_MEDIUM"));
53
+ vm.setEnv("AZTEC_SLASH_AMOUNT_LARGE", json.readString(".AZTEC_SLASH_AMOUNT_LARGE"));
54
+ }
55
+
56
+ // Just exercise the code. It contains assertions internally.
57
+ function test_SmokeTest() public {
58
+ DeployAztecL1Contracts deployScript = new DeployAztecL1Contracts();
59
+ deployScript.run();
60
+ }
61
+ }
@@ -0,0 +1,112 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Copyright 2024 Aztec Labs.
3
+ pragma solidity >=0.8.27;
4
+
5
+ import {Test} from "forge-std/Test.sol";
6
+ import {stdJson} from "forge-std/StdJson.sol";
7
+
8
+ import {DeployAztecL1Contracts, DeployAztecL1ContractsOutput} from "../../script/deploy/DeployAztecL1Contracts.s.sol";
9
+ import {DeployRollupForUpgrade} from "../../script/deploy/DeployRollupForUpgrade.s.sol";
10
+ import {Rollup} from "@aztec/core/Rollup.sol";
11
+ import {Registry} from "@aztec/governance/Registry.sol";
12
+
13
+ /**
14
+ * @title DeployRollupForUpgradeTest
15
+ * @notice Tests for the DeployRollupForUpgrade.s.sol script
16
+ * @dev This test validates:
17
+ * 1. The script deploys only Rollup, Verifier, and SlashFactory
18
+ * 2. It uses existing infrastructure contracts correctly
19
+ * 3. The new rollup is properly registered (if deployer is owner)
20
+ */
21
+ contract DeployRollupForUpgradeTest is Test {
22
+ using stdJson for string;
23
+
24
+ // Load environment variables from generated/default.json
25
+ // This file is copied from spartan/environments/default.json by bootstrap.sh
26
+ function setUp() public {
27
+ string memory root = vm.projectRoot();
28
+ string memory path = string.concat(root, "/generated/default.json");
29
+ string memory json = vm.readFile(path);
30
+
31
+ // Timing config
32
+ vm.setEnv("AZTEC_SLOT_DURATION", vm.toString(json.readUint(".AZTEC_SLOT_DURATION")));
33
+ vm.setEnv("AZTEC_EPOCH_DURATION", vm.toString(json.readUint(".AZTEC_EPOCH_DURATION")));
34
+ vm.setEnv("AZTEC_INBOX_LAG", vm.toString(json.readUint(".AZTEC_INBOX_LAG")));
35
+ vm.setEnv("AZTEC_PROOF_SUBMISSION_EPOCHS", vm.toString(json.readUint(".AZTEC_PROOF_SUBMISSION_EPOCHS")));
36
+
37
+ // Validator config
38
+ vm.setEnv("AZTEC_TARGET_COMMITTEE_SIZE", vm.toString(json.readUint(".AZTEC_TARGET_COMMITTEE_SIZE")));
39
+ vm.setEnv(
40
+ "AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET", vm.toString(json.readUint(".AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET"))
41
+ );
42
+ vm.setEnv("AZTEC_LAG_IN_EPOCHS_FOR_RANDAO", vm.toString(json.readUint(".AZTEC_LAG_IN_EPOCHS_FOR_RANDAO")));
43
+ vm.setEnv("AZTEC_LOCAL_EJECTION_THRESHOLD", json.readString(".AZTEC_LOCAL_EJECTION_THRESHOLD"));
44
+ vm.setEnv("AZTEC_EXIT_DELAY_SECONDS", vm.toString(json.readUint(".AZTEC_EXIT_DELAY_SECONDS")));
45
+
46
+ // Fees config
47
+ vm.setEnv("AZTEC_MANA_TARGET", vm.toString(json.readUint(".AZTEC_MANA_TARGET")));
48
+ vm.setEnv("AZTEC_PROVING_COST_PER_MANA", vm.toString(json.readUint(".AZTEC_PROVING_COST_PER_MANA")));
49
+ vm.setEnv("AZTEC_INITIAL_ETH_PER_FEE_ASSET", vm.toString(json.readUint(".AZTEC_INITIAL_ETH_PER_FEE_ASSET")));
50
+
51
+ // Slashing config
52
+ vm.setEnv("AZTEC_SLASHER_FLAVOR", json.readString(".AZTEC_SLASHER_FLAVOR"));
53
+ vm.setEnv("AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS", vm.toString(json.readUint(".AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS")));
54
+ vm.setEnv("AZTEC_SLASHING_OFFSET_IN_ROUNDS", vm.toString(json.readUint(".AZTEC_SLASHING_OFFSET_IN_ROUNDS")));
55
+ vm.setEnv("AZTEC_SLASHING_LIFETIME_IN_ROUNDS", vm.toString(json.readUint(".AZTEC_SLASHING_LIFETIME_IN_ROUNDS")));
56
+ vm.setEnv(
57
+ "AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS",
58
+ vm.toString(json.readUint(".AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS"))
59
+ );
60
+ vm.setEnv("AZTEC_SLASHING_DISABLE_DURATION", vm.toString(json.readUint(".AZTEC_SLASHING_DISABLE_DURATION")));
61
+ vm.setEnv("AZTEC_SLASHING_VETOER", json.readString(".AZTEC_SLASHING_VETOER"));
62
+ vm.setEnv("AZTEC_SLASH_AMOUNT_SMALL", json.readString(".AZTEC_SLASH_AMOUNT_SMALL"));
63
+ vm.setEnv("AZTEC_SLASH_AMOUNT_MEDIUM", json.readString(".AZTEC_SLASH_AMOUNT_MEDIUM"));
64
+ vm.setEnv("AZTEC_SLASH_AMOUNT_LARGE", json.readString(".AZTEC_SLASH_AMOUNT_LARGE"));
65
+ }
66
+
67
+ // Test that a rollup upgrade works.
68
+ function test_DeployThenUpgrade() public {
69
+ // ============ STEP 1: Initial Deployment ============
70
+ DeployAztecL1Contracts fullDeploy = new DeployAztecL1Contracts();
71
+ fullDeploy.run();
72
+
73
+ DeployAztecL1ContractsOutput memory initialOutput = fullDeploy.output();
74
+ Registry registry = initialOutput.registry;
75
+ Rollup initialRollup = initialOutput.rollup.rollup;
76
+ uint256 initialVersion = initialRollup.getVersion();
77
+
78
+ // Verify initial state
79
+ assertEq(address(registry.getCanonicalRollup()), address(initialRollup));
80
+ assertEq(address(registry.getRollup(initialVersion)), address(initialRollup));
81
+
82
+ // become owner of the registry to perform upgrade
83
+ vm.prank(address(initialOutput.governance));
84
+ registry.transferOwnership(address(this));
85
+
86
+ // ============ STEP 2: Deploy Rollup Upgrade ============
87
+ vm.setEnv("REGISTRY_ADDRESS", vm.toString(address(registry)));
88
+ // Set a different genesis archive root to get a different version
89
+ // This mirrors the TS test: genesisArchiveRoot: Fr.random()
90
+ vm.setEnv("GENESIS_ARCHIVE_ROOT", vm.toString(uint256(keccak256("different_genesis"))));
91
+
92
+ DeployRollupForUpgrade upgradeDeploy = new DeployRollupForUpgrade();
93
+ upgradeDeploy.run();
94
+
95
+ Rollup newRollup = upgradeDeploy.rollupOutput().rollup;
96
+ uint256 newVersion = newRollup.getVersion();
97
+
98
+ // ============ STEP 3: Verify Registry State ============
99
+ assertTrue(address(newRollup) != address(initialRollup));
100
+ assertTrue(newVersion != initialVersion);
101
+
102
+ // Canonical should now be the new rollup
103
+ assertEq(address(registry.getCanonicalRollup()), address(newRollup));
104
+
105
+ // Both versions should be retrievable
106
+ assertEq(address(registry.getRollup(initialVersion)), address(initialRollup));
107
+ assertEq(address(registry.getRollup(newVersion)), address(newRollup));
108
+
109
+ // Version count should be 2
110
+ assertEq(registry.numberOfVersions(), 2);
111
+ }
112
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/l1-artifacts",
3
- "version": "0.0.1-commit.f146247c",
3
+ "version": "0.0.1-commit.f1df4d2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": "./dest/*.js",
Binary file