Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub contract Auth {

// docs:start:delayed_public_mutable_storage
// Authorizing a new address has a certain delay before it goes into effect. Set to 180 seconds.
pub(crate) global CHANGE_AUTHORIZED_DELAY: u64 = 180;
pub(crate) global CHANGE_AUTHORIZED_DELAY: u64 = 360;

#[storage]
struct Storage<Context> {
Expand Down
12 changes: 9 additions & 3 deletions spartan/environments/network-defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ l1-contracts: &l1-contracts-defaults
# How many seconds an L1 slot lasts (Ethereum consensus layer).
ETHEREUM_SLOT_DURATION: 12
# How many seconds an L2 slot lasts (must be multiple of L1 slot duration).
AZTEC_SLOT_DURATION: 36
AZTEC_SLOT_DURATION: 72
# How many L2 slots in an epoch.
AZTEC_EPOCH_DURATION: 32

Expand Down Expand Up @@ -171,8 +171,13 @@ _prodlike: &prodlike
#---------------------------------------------------------------------------
# Minimum transactions to include in a block.
SEQ_MIN_TX_PER_BLOCK: 0
# Maximum transactions to include in a block
# Build checkpoint even if block is empty.
SEQ_BUILD_CHECKPOINT_IF_EMPTY: true
# 6 second block times
SEQ_BLOCK_DURATION_MS: 6000
# Time allocated for publishing to L1
SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT: 36 # 3 Ethereum slots

#---------------------------------------------------------------------------
# Database Map Sizes (in KB)
Expand Down Expand Up @@ -216,7 +221,7 @@ networks:
SPONSORED_FPC: true # Fund sponsored FPC with fee juice
TRANSACTIONS_DISABLED: false
# Sequencer
SEQ_MAX_TX_PER_BLOCK: 32
SEQ_MAX_TX_PER_BLOCK: 18
# Prover
PROVER_REAL_PROOFS: false # Use mock proofs
PXE_PROVER_ENABLED: false # Disable PXE proving
Expand Down Expand Up @@ -268,7 +273,8 @@ networks:
SPONSORED_FPC: true
TRANSACTIONS_DISABLED: false
# Sequencer
SEQ_MAX_TX_PER_BLOCK: 8
# Gives ~0.1 TPS @ 72s slot time, 36s publish time, 6s block time - max 4 blocks per slot
SEQ_MAX_TX_PER_BLOCK: 2
# Prover
PROVER_REAL_PROOFS: true
# P2P
Expand Down
19 changes: 17 additions & 2 deletions spartan/environments/next-net.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ TX_COLLECTION_FILE_STORE_URLS="https://aztec-labs-snapshots.com/${TX_FILE_STORE_
R2_ACCESS_KEY_ID=REPLACE_WITH_GCP_SECRET
R2_SECRET_ACCESS_KEY=REPLACE_WITH_GCP_SECRET
PROVER_FAILED_PROOF_STORE=gs://aztec-develop/next-net/failed-proofs
L1_TX_FAILED_STORE=gs://aztec-develop/next-net/failed-l1-txs
TEST_ACCOUNTS=true
SPONSORED_FPC=true

SEQ_MIN_TX_PER_BLOCK=0
SEQ_MAX_TX_PER_BLOCK=8
AZTEC_EPOCH_DURATION=32
# Gives ~0.1 TPS @ 72s slot time, 36s publish time, 6s block time - max 4 blocks per slot
SEQ_MAX_TX_PER_BLOCK=2

# Build checkpoint even if block is empty.
SEQ_BUILD_CHECKPOINT_IF_EMPTY=true
SEQ_BLOCK_DURATION_MS=6000

AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET=2
AZTEC_LAG_IN_EPOCHS_FOR_RANDAO=2
Expand Down Expand Up @@ -60,3 +66,12 @@ RPC_INGRESS_SSL_CERT_NAMES='["nextnet-rpc-cert"]'

VALIDATOR_HA_REPLICAS=1
VALIDATOR_RESOURCE_PROFILE="prod-spot"

REAL_VERIFIER=true
AZTEC_SLOT_DURATION=72
AZTEC_EPOCH_DURATION=32
AZTEC_TARGET_COMMITTEE_SIZE=48
AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET=2
AZTEC_LAG_IN_EPOCHS_FOR_RANDAO=2
AZTEC_PROOF_SUBMISSION_EPOCHS=1

10 changes: 9 additions & 1 deletion spartan/environments/staging-public.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ ETHERSCAN_API_KEY=REPLACE_WITH_GCP_SECRET
DEPLOY_INTERNAL_BOOTNODE=true
SNAPSHOT_BUCKET_DIRECTORY=${SNAPSHOT_BUCKET_DIRECTORY:-staging-public}
BLOB_BUCKET_DIRECTORY=${BLOB_BUCKET_DIRECTORY:-staging-public/blobs}
TX_FILE_STORE_ENABLED=true
TX_FILE_STORE_BUCKET_DIRECTORY=${TX_FILE_STORE_BUCKET_DIRECTORY:-staging-public/txs}
TX_COLLECTION_FILE_STORE_URLS="https://aztec-labs-snapshots.com/${TX_FILE_STORE_BUCKET_DIRECTORY}"
R2_ACCESS_KEY_ID=REPLACE_WITH_GCP_SECRET
R2_SECRET_ACCESS_KEY=REPLACE_WITH_GCP_SECRET
TEST_ACCOUNTS=false
SPONSORED_FPC=true

SEQ_MIN_TX_PER_BLOCK=0
SEQ_MAX_TX_PER_BLOCK=4
# Gives ~0.1 TPS @ 72s slot time, 36s publish time, 6s block time - max 4 blocks per slot
SEQ_MAX_TX_PER_BLOCK=2

# Build checkpoint even if block is empty.
SEQ_BUILD_CHECKPOINT_IF_EMPTY=true
SEQ_BLOCK_DURATION_MS=6000

CREATE_ROLLUP_CONTRACTS=${CREATE_ROLLUP_CONTRACTS:-false}
P2P_TX_POOL_DELETE_TXS_AFTER_REORG=true
Expand Down
32 changes: 3 additions & 29 deletions spartan/environments/testnet.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,8 @@ CREATE_ETH_DEVNET=false
GCP_REGION=us-west1-a
CLUSTER=aztec-gke-public
NAMESPACE=${NAMESPACE:-testnet}
TEST_ACCOUNTS=false
SPONSORED_FPC=true
SEQ_MIN_TX_PER_BLOCK=0
SEQ_MAX_TX_PER_BLOCK=8
NETWORK=testnet

REAL_VERIFIER=true
AZTEC_ENTRY_QUEUE_BOOTSTRAP_VALIDATOR_SET_SIZE=48
AZTEC_ENTRY_QUEUE_BOOTSTRAP_FLUSH_SIZE=48
AZTEC_ENTRY_QUEUE_FLUSH_SIZE_MIN=10
AZTEC_ENTRY_QUEUE_FLUSH_SIZE_QUOTIENT=400
AZTEC_ENTRY_QUEUE_MAX_FLUSH_SIZE=10
AZTEC_SLOT_DURATION=72
AZTEC_EPOCH_DURATION=32
AZTEC_TARGET_COMMITTEE_SIZE=48
AZTEC_LAG_IN_EPOCHS_FOR_VALIDATOR_SET=2
AZTEC_LAG_IN_EPOCHS_FOR_RANDAO=2
AZTEC_PROOF_SUBMISSION_EPOCHS=1
AZTEC_LOCAL_EJECTION_THRESHOLD=199000e18
AZTEC_SLASHING_ROUND_SIZE_IN_EPOCHS=2
AZTEC_SLASHING_QUORUM=33
AZTEC_SLASHING_OFFSET_IN_ROUNDS=2
AZTEC_SLASHING_LIFETIME_IN_ROUNDS=5
AZTEC_SLASHING_EXECUTION_DELAY_IN_ROUNDS=2
AZTEC_SLASHING_VETOER=\"0xdfe19Da6a717b7088621d8bBB66be59F2d78e924\"
AZTEC_MANA_TARGET=150000000
AZTEC_ACTIVATION_THRESHOLD=200000e18
AZTEC_EJECTION_THRESHOLD=100000e18
AZTEC_GOVERNANCE_PROPOSER_ROUND_SIZE=100
AZTEC_GOVERNANCE_PROPOSER_QUORUM=60


ETHEREUM_CHAIN_ID=11155111
ETHEREUM_RPC_URLS=REPLACE_WITH_GCP_SECRET
Expand All @@ -48,6 +19,9 @@ ETHERSCAN_API_KEY=REPLACE_WITH_GCP_SECRET

SNAPSHOT_BUCKET_DIRECTORY=${SNAPSHOT_BUCKET_DIRECTORY:-testnet}
BLOB_BUCKET_DIRECTORY=${BLOB_BUCKET_DIRECTORY:-testnet/blobs}
TX_FILE_STORE_ENABLED=true
TX_FILE_STORE_BUCKET_DIRECTORY=${TX_FILE_STORE_BUCKET_DIRECTORY:-testnet/txs}
TX_COLLECTION_FILE_STORE_URLS="https://aztec-labs-snapshots.com/${TX_FILE_STORE_BUCKET_DIRECTORY}"
R2_ACCESS_KEY_ID=REPLACE_WITH_GCP_SECRET
R2_SECRET_ACCESS_KEY=REPLACE_WITH_GCP_SECRET
DEPLOY_INTERNAL_BOOTNODE=false
Expand Down
8 changes: 5 additions & 3 deletions yarn-project/end-to-end/src/e2e_contract_updates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,16 @@ describe('e2e_contract_updates', () => {
);

// Increases the delay so it should happen immediately
await contract.methods.set_update_delay(BigInt(MINIMUM_UPDATE_DELAY) + 1n).send({ from: defaultAccountAddress });
await contract.methods
.set_update_delay(BigInt(DEFAULT_TEST_UPDATE_DELAY) + 1n)
.send({ from: defaultAccountAddress });

expect(await contract.methods.get_update_delay().simulate({ from: defaultAccountAddress })).toEqual(
BigInt(MINIMUM_UPDATE_DELAY) + 1n,
BigInt(DEFAULT_TEST_UPDATE_DELAY) + 1n,
);

await contract.methods.update_to(updatedContractClassId).send({ from: defaultAccountAddress });
await cheatCodes.warpL2TimeAtLeastBy(sequencer, aztecNode, BigInt(MINIMUM_UPDATE_DELAY) + 1n);
await cheatCodes.warpL2TimeAtLeastBy(sequencer, aztecNode, BigInt(DEFAULT_TEST_UPDATE_DELAY) + 1n);

// Should be updated now
await wallet.registerContract(instance, UpdatedContract.artifact);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_state_vars.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ describe('e2e_state_vars', () => {
from: defaultAccountAddress,
});

if (aztecSlotDuration !== 36) {
if (aztecSlotDuration !== 72) {
throw new Error(
'Aztec slot duration changed and this will break this test. Update CHANGE_AUTHORIZED_DELAY constant in the Auth contract to be 5 slots again.',
);
Expand Down
19 changes: 13 additions & 6 deletions yarn-project/sequencer-client/src/sequencer/timetable.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { createLogger } from '@aztec/foundation/log';
import { MIN_EXECUTION_TIME } from '@aztec/stdlib/timetable';

import { SequencerTimetable } from './timetable.js';
import { SequencerState } from './utils.js';

describe('sequencer-timetable', () => {
let timetable: SequencerTimetable;
const logger = createLogger('sequencer-timetable-test');

const ETHEREUM_SLOT_DURATION = 12;
const AZTEC_SLOT_DURATION = 36;
Expand Down Expand Up @@ -287,16 +289,18 @@ describe('sequencer-timetable', () => {

describe('maxNumberOfBlocks calculation', () => {
it.each([
{ aztecSlot: 36, blockDuration: 8000 },
{ aztecSlot: 72, blockDuration: 8000 },
{ aztecSlot: 120, blockDuration: 10000 },
{ aztecSlot: 36, blockDuration: 8000, publishTime: L1_PUBLISHING_TIME },
{ aztecSlot: 72, blockDuration: 8000, publishTime: L1_PUBLISHING_TIME },
{ aztecSlot: 120, blockDuration: 10000, publishTime: L1_PUBLISHING_TIME },
{ aztecSlot: 72, blockDuration: 6000, publishTime: 36 },
{ aztecSlot: 72, blockDuration: 6000, publishTime: 24 },
])(
'should calculate max blocks with aztecSlot=$aztecSlot blockDuration=$blockDuration)',
({ aztecSlot, blockDuration }) => {
'should calculate max blocks with aztecSlot=$aztecSlot blockDuration=$blockDuration publishTime=$publishTime)',
({ aztecSlot, blockDuration, publishTime }) => {
const tt = new SequencerTimetable({
ethereumSlotDuration: ETHEREUM_SLOT_DURATION,
aztecSlotDuration: aztecSlot,
l1PublishingTime: L1_PUBLISHING_TIME,
l1PublishingTime: publishTime,
blockDurationMs: blockDuration,
enforce: ENFORCE_TIMETABLE,
});
Expand All @@ -311,6 +315,9 @@ describe('sequencer-timetable', () => {
const result2 = tt.canStartNextBlock(20);
expect(result2.canStart).toBe(true);
}
logger.info(
`AztecSlot: ${aztecSlot}, BlockDuration: ${blockDuration}, PublishTime: ${publishTime}, MaxBlocks: ${tt.maxNumberOfBlocks}\n\n`,
);
},
);

Expand Down
Loading