Skip to content

Commit

Permalink
chore: devnet and 12s slots
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Aug 22, 2024
1 parent c78c198 commit 57dbd32
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 43 deletions.
4 changes: 2 additions & 2 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ library Constants {
uint256 internal constant INITIAL_L2_BLOCK_NUM = 1;
uint256 internal constant BLOB_SIZE_IN_BYTES = 126976;
uint256 internal constant ETHEREUM_SLOT_DURATION = 12;
uint256 internal constant AZTEC_SLOT_DURATION = 36;
uint256 internal constant AZTEC_SLOT_DURATION = 12;
uint256 internal constant AZTEC_EPOCH_DURATION = 48;
uint256 internal constant IS_DEV_NET = 0;
uint256 internal constant IS_DEV_NET = 1;
uint256 internal constant FEE_JUICE_INITIAL_MINT = 20000000000;
uint256 internal constant MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 20000;
uint256 internal constant MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS = 3000;
Expand Down
14 changes: 7 additions & 7 deletions l1-contracts/test/fixtures/empty_block_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"l2ToL1Messages": []
},
"block": {
"archive": "0x0f1c8759c5d468bc2923b86ca6489d28a90698c79e7dcab441e5a3bef80a8bea",
"archive": "0x1fc4515430abede0c269e0aaf99fe032b4368b094b2a399d112144d8e0b4b803",
"body": "0x00000000",
"txsEffectsHash": "0x00e994e16b3763fd5039413cf99c2b3c378e2bab939e7992a77bd201b28160d6",
"decodedHeader": {
Expand All @@ -20,12 +20,12 @@
},
"globalVariables": {
"blockNumber": 1,
"slotNumber": "0x0000000000000000000000000000000000000000000000000000000000000031",
"slotNumber": "0x0000000000000000000000000000000000000000000000000000000000000033",
"chainId": 31337,
"timestamp": 1724273554,
"timestamp": 1724321038,
"version": 1,
"coinbase": "0x15b9be2e7cb33a2fcbb4329e6c5ef65aeffe27e3",
"feeRecipient": "0x01f04e3f96a8bc93bbefcf569bf0e7538d240c089133389702f2fc6c128b8170",
"coinbase": "0x69d2d2c697a0ac4a874c591f6906706af27eb737",
"feeRecipient": "0x2c6280804920e2ecb139fe6185aeba95ee3687e64a14ff68a72a25ab9bb0d5eb",
"gasFees": {
"feePerDaGas": 0,
"feePerL2Gas": 0
Expand Down Expand Up @@ -56,8 +56,8 @@
}
}
},
"header": "0x1200a06aae1368abe36530b585bd7a4d2ba4de5037b82076412691a187d7621e00000001000000000000000000000000000000000000000000000000000000000000000200e994e16b3763fd5039413cf99c2b3c378e2bab939e7992a77bd201b28160d600089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb14f44d672eb357739e42463497f9fdac46623af863eea4d947ca00a497dcdeb3000000100b59baa35b9dc267744f0ccb4e3b0255c1fc512460d91130c6bc19fb2668568d0000008019a8c197c12bb33da6314c4ef4f8f6fcb9e25250c085df8672adf67c8f1e3dbc0000010023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000001000000000000000000000000000000000000000000000000000000000000007a690000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000310000000000000000000000000000000000000000000000000000000066c6539215b9be2e7cb33a2fcbb4329e6c5ef65aeffe27e301f04e3f96a8bc93bbefcf569bf0e7538d240c089133389702f2fc6c128b8170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x00f44db060111d0b69ed4305560101aa0b4b2bbe49dba30bcbc59a7f441aa3aa",
"header": "0x1200a06aae1368abe36530b585bd7a4d2ba4de5037b82076412691a187d7621e00000001000000000000000000000000000000000000000000000000000000000000000200e994e16b3763fd5039413cf99c2b3c378e2bab939e7992a77bd201b28160d600089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb14f44d672eb357739e42463497f9fdac46623af863eea4d947ca00a497dcdeb3000000100b59baa35b9dc267744f0ccb4e3b0255c1fc512460d91130c6bc19fb2668568d0000008019a8c197c12bb33da6314c4ef4f8f6fcb9e25250c085df8672adf67c8f1e3dbc0000010023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000001000000000000000000000000000000000000000000000000000000000000007a690000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000330000000000000000000000000000000000000000000000000000000066c70d0e69d2d2c697a0ac4a874c591f6906706af27eb7372c6280804920e2ecb139fe6185aeba95ee3687e64a14ff68a72a25ab9bb0d5eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x00acfc19a39d0814b57d47fbf843284cd2d293382e82dfcaafc819daf89b81b5",
"numTxs": 0
}
}
16 changes: 8 additions & 8 deletions l1-contracts/test/fixtures/empty_block_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"l2ToL1Messages": []
},
"block": {
"archive": "0x1ff51fd469761e649b7538a6095cdc2ce1510773cabba6920e9883d56c7c4073",
"archive": "0x2da3733e9f6522fcc8016aff753cb69100051aae6f3612a2180959adfd3293f6",
"body": "0x00000000",
"txsEffectsHash": "0x00e994e16b3763fd5039413cf99c2b3c378e2bab939e7992a77bd201b28160d6",
"decodedHeader": {
Expand All @@ -20,20 +20,20 @@
},
"globalVariables": {
"blockNumber": 2,
"slotNumber": "0x0000000000000000000000000000000000000000000000000000000000000033",
"slotNumber": "0x0000000000000000000000000000000000000000000000000000000000000035",
"chainId": 31337,
"timestamp": 1724273626,
"timestamp": 1724321062,
"version": 1,
"coinbase": "0x15b9be2e7cb33a2fcbb4329e6c5ef65aeffe27e3",
"feeRecipient": "0x01f04e3f96a8bc93bbefcf569bf0e7538d240c089133389702f2fc6c128b8170",
"coinbase": "0x69d2d2c697a0ac4a874c591f6906706af27eb737",
"feeRecipient": "0x2c6280804920e2ecb139fe6185aeba95ee3687e64a14ff68a72a25ab9bb0d5eb",
"gasFees": {
"feePerDaGas": 0,
"feePerL2Gas": 0
}
},
"lastArchive": {
"nextAvailableLeafIndex": 2,
"root": "0x0f1c8759c5d468bc2923b86ca6489d28a90698c79e7dcab441e5a3bef80a8bea"
"root": "0x1fc4515430abede0c269e0aaf99fe032b4368b094b2a399d112144d8e0b4b803"
},
"stateReference": {
"l1ToL2MessageTree": {
Expand All @@ -56,8 +56,8 @@
}
}
},
"header": "0x0f1c8759c5d468bc2923b86ca6489d28a90698c79e7dcab441e5a3bef80a8bea00000002000000000000000000000000000000000000000000000000000000000000000200e994e16b3763fd5039413cf99c2b3c378e2bab939e7992a77bd201b28160d600089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb14f44d672eb357739e42463497f9fdac46623af863eea4d947ca00a497dcdeb3000000200b59baa35b9dc267744f0ccb4e3b0255c1fc512460d91130c6bc19fb2668568d0000010019a8c197c12bb33da6314c4ef4f8f6fcb9e25250c085df8672adf67c8f1e3dbc0000018023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000001800000000000000000000000000000000000000000000000000000000000007a690000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000330000000000000000000000000000000000000000000000000000000066c653da15b9be2e7cb33a2fcbb4329e6c5ef65aeffe27e301f04e3f96a8bc93bbefcf569bf0e7538d240c089133389702f2fc6c128b8170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x001d78131989b826aabf44621ab134c2eb31c676c72a3936295a37b36ce609a5",
"header": "0x1fc4515430abede0c269e0aaf99fe032b4368b094b2a399d112144d8e0b4b80300000002000000000000000000000000000000000000000000000000000000000000000200e994e16b3763fd5039413cf99c2b3c378e2bab939e7992a77bd201b28160d600089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c00f5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb14f44d672eb357739e42463497f9fdac46623af863eea4d947ca00a497dcdeb3000000200b59baa35b9dc267744f0ccb4e3b0255c1fc512460d91130c6bc19fb2668568d0000010019a8c197c12bb33da6314c4ef4f8f6fcb9e25250c085df8672adf67c8f1e3dbc0000018023c08a6b1297210c5e24c76b9a936250a1ce2721576c26ea797c7ec35f9e46a9000001800000000000000000000000000000000000000000000000000000000000007a690000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000350000000000000000000000000000000000000000000000000000000066c70d2669d2d2c697a0ac4a874c591f6906706af27eb7372c6280804920e2ecb139fe6185aeba95ee3687e64a14ff68a72a25ab9bb0d5eb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"publicInputsHash": "0x00318295aad2a231c68b825b4fca99e2cbb1345c82ee6d01888289771199d1b9",
"numTxs": 0
}
}
14 changes: 7 additions & 7 deletions l1-contracts/test/fixtures/mixed_block_1.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions l1-contracts/test/fixtures/mixed_block_2.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ global INITIALIZATION_SLOT_SEPARATOR: Field = 1000_000_000;
global INITIAL_L2_BLOCK_NUM: Field = 1;
global BLOB_SIZE_IN_BYTES: Field = 31 * 4096;
global ETHEREUM_SLOT_DURATION: u32 = 12;
global AZTEC_SLOT_DURATION: u32 = ETHEREUM_SLOT_DURATION * 3;
global AZTEC_SLOT_DURATION: u32 = ETHEREUM_SLOT_DURATION * 1;
global AZTEC_EPOCH_DURATION: u32 = 48;
global IS_DEV_NET: bool = false;
global IS_DEV_NET: bool = true;
// The following and the value in `deploy_l1_contracts´ must match. We should not have the code both places, but
// we are running into circular dependency issues. #3342
global FEE_JUICE_INITIAL_MINT: Field = 20000000000;
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export const INITIALIZATION_SLOT_SEPARATOR = 1000000000;
export const INITIAL_L2_BLOCK_NUM = 1;
export const BLOB_SIZE_IN_BYTES = 126976;
export const ETHEREUM_SLOT_DURATION = 12;
export const AZTEC_SLOT_DURATION = 36;
export const AZTEC_SLOT_DURATION = 12;
export const AZTEC_EPOCH_DURATION = 48;
export const IS_DEV_NET = 0;
export const IS_DEV_NET = 1;
export const FEE_JUICE_INITIAL_MINT = 20000000000;
export const MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 20000;
export const MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS = 3000;
Expand Down
17 changes: 10 additions & 7 deletions yarn-project/sequencer-client/src/sequencer/sequencer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ describe('sequencer', () => {
BigInt(lastBlockNumber),
block.header.lastArchive.toBuffer(),
]);
publisher.getValidatorCount.mockResolvedValue(0n);

globalVariableBuilder = mock<GlobalVariableBuilder>();
merkleTreeOps = mock<MerkleTreeOperations>();
Expand Down Expand Up @@ -190,7 +191,7 @@ describe('sequencer', () => {
const mockedGlobalVariables = new GlobalVariables(
chainId,
version,
new Fr(lastBlockNumber + 1),
block.header.globalVariables.blockNumber,
block.header.globalVariables.slotNumber,
Fr.ZERO,
coinbase,
Expand Down Expand Up @@ -231,7 +232,7 @@ describe('sequencer', () => {
const mockedGlobalVariables = new GlobalVariables(
chainId,
version,
new Fr(lastBlockNumber + 1),
block.header.globalVariables.blockNumber,
block.header.globalVariables.slotNumber,
Fr.ZERO,
coinbase,
Expand All @@ -250,6 +251,8 @@ describe('sequencer', () => {
BigInt(lastBlockNumber),
block.header.lastArchive.toBuffer(),
]);
// Specify that there is a validator, such that we don't allow everyone to publish
publisher.getValidatorCount.mockResolvedValueOnce(1n);

await sequencer.initialSync();
await sequencer.work();
Expand Down Expand Up @@ -294,7 +297,7 @@ describe('sequencer', () => {
const mockedGlobalVariables = new GlobalVariables(
chainId,
version,
new Fr(lastBlockNumber + 1),
block.header.globalVariables.blockNumber,
block.header.globalVariables.slotNumber,
Fr.ZERO,
coinbase,
Expand Down Expand Up @@ -346,7 +349,7 @@ describe('sequencer', () => {
const mockedGlobalVariables = new GlobalVariables(
chainId,
version,
new Fr(lastBlockNumber + 1),
block.header.globalVariables.blockNumber,
block.header.globalVariables.slotNumber,
Fr.ZERO,
coinbase,
Expand Down Expand Up @@ -498,7 +501,7 @@ describe('sequencer', () => {
const mockedGlobalVariables = new GlobalVariables(
chainId,
version,
new Fr(lastBlockNumber + 1),
block.header.globalVariables.blockNumber,
block.header.globalVariables.slotNumber,
Fr.ZERO,
coinbase,
Expand Down Expand Up @@ -560,7 +563,7 @@ describe('sequencer', () => {
const mockedGlobalVariables = new GlobalVariables(
chainId,
version,
new Fr(lastBlockNumber + 1),
block.header.globalVariables.blockNumber,
block.header.globalVariables.slotNumber,
Fr.ZERO,
coinbase,
Expand Down Expand Up @@ -619,7 +622,7 @@ describe('sequencer', () => {
const mockedGlobalVariables = new GlobalVariables(
chainId,
version,
new Fr(lastBlockNumber + 1),
block.header.globalVariables.blockNumber,
block.header.globalVariables.slotNumber,
Fr.ZERO,
coinbase,
Expand Down

0 comments on commit 57dbd32

Please sign in to comment.