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 48c6171 commit b68ce98
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 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
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 b68ce98

Please sign in to comment.