diff --git a/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp b/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp index a0297450023..24d69635058 100644 --- a/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp @@ -82,7 +82,7 @@ #define START_EMIT_NULLIFIER_WRITE_OFFSET 208 #define START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET 224 #define START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET 226 -#define MAX_L2_GAS_PER_TX_PUBLIC_PORTION 12000000 +#define MAX_L2_GAS_PER_TX_PUBLIC_PORTION 6000000 #define AVM_POSEIDON2_BASE_L2_GAS 36 #define AVM_ADD_BASE_L2_GAS 27 #define AVM_SUB_BASE_L2_GAS 27 diff --git a/docs/docs/migration_notes.md b/docs/docs/migration_notes.md index 2b096d8899c..f2a713587d9 100644 --- a/docs/docs/migration_notes.md +++ b/docs/docs/migration_notes.md @@ -8,6 +8,10 @@ Aztec is in full-speed development. Literally every version breaks compatibility ## TBD +### L2 Gas limit of 6M enforced for public portion of TX + +A 12M limit was previously enforced per-enqueued-public-call. The protocol now enforces a stricter limit that the entire public portion of a transaction consumes at most 6,000,000 L2 gas. + ### [aztec.nr] Renamed `Header` and associated helpers The `Header` struct has been renamed to `BlockHeader`, and the `get_header()` family of functions have been similarly renamed to `get_block_header()`. @@ -44,10 +48,6 @@ Further changes are planned, so that: ## 0.66 -### L2 Gas limit of 12M enforced for public portion of TX - -This limit was previously enforced per-enqueued-public-call. The protocol now enforces a stricter limit that the entire public portion of a transaction consumes at most 12,000,000 L2 gas. - ### DEBUG env var is removed The `DEBUG` variable is no longer used. Use `LOG_LEVEL` with one of `silent`, `fatal`, `error`, `warn`, `info`, `verbose`, `debug`, or `trace`. To tweak log levels per module, add a list of module prefixes with their overridden level. For example, LOG_LEVEL="info; verbose: aztec:sequencer, aztec:archiver; debug: aztec:kv-store" sets `info` as the default log level, `verbose` for the sequencer and archiver, and `debug` for the kv-store. Module name match is done by prefix. diff --git a/l1-contracts/src/core/libraries/ConstantsGen.sol b/l1-contracts/src/core/libraries/ConstantsGen.sol index ce952a6fb6d..f9a9435bf8b 100644 --- a/l1-contracts/src/core/libraries/ConstantsGen.sol +++ b/l1-contracts/src/core/libraries/ConstantsGen.sol @@ -251,9 +251,8 @@ library Constants { uint256 internal constant START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = 224; uint256 internal constant START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = 226; uint256 internal constant DEFAULT_GAS_LIMIT = 1000000000; - uint256 internal constant DEFAULT_TEARDOWN_GAS_LIMIT = 12000000; - uint256 internal constant MAX_L2_GAS_PER_TX_PUBLIC_PORTION = 12000000; - uint256 internal constant MAX_L2_GAS_PER_ENQUEUED_CALL = 12000000; + uint256 internal constant MAX_L2_GAS_PER_TX_PUBLIC_PORTION = 6000000; + uint256 internal constant DEFAULT_TEARDOWN_GAS_LIMIT = 6000000; uint256 internal constant DA_BYTES_PER_FIELD = 32; uint256 internal constant DA_GAS_PER_BYTE = 16; uint256 internal constant FIXED_DA_GAS = 512; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr index 7dd7fa27906..bb754d4a9ad 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr @@ -582,9 +582,8 @@ pub global START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET: u32 = // GAS DEFAULTS pub global DEFAULT_GAS_LIMIT: u32 = 1_000_000_000; -pub global DEFAULT_TEARDOWN_GAS_LIMIT: u32 = 12_000_000; -pub global MAX_L2_GAS_PER_TX_PUBLIC_PORTION: u32 = 12_000_000; -pub global MAX_L2_GAS_PER_ENQUEUED_CALL: u32 = 12_000_000; +pub global MAX_L2_GAS_PER_TX_PUBLIC_PORTION: u32 = 6_000_000; +pub global DEFAULT_TEARDOWN_GAS_LIMIT: u32 = MAX_L2_GAS_PER_TX_PUBLIC_PORTION; pub global DA_BYTES_PER_FIELD: u32 = 32; pub global DA_GAS_PER_BYTE: u32 = 16; // pays for preamble information in TX Effects diff --git a/yarn-project/circuits.js/src/constants.gen.ts b/yarn-project/circuits.js/src/constants.gen.ts index fd9eea48da4..eeb86040682 100644 --- a/yarn-project/circuits.js/src/constants.gen.ts +++ b/yarn-project/circuits.js/src/constants.gen.ts @@ -235,9 +235,8 @@ export const START_EMIT_NULLIFIER_WRITE_OFFSET = 208; export const START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = 224; export const START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = 226; export const DEFAULT_GAS_LIMIT = 1000000000; -export const DEFAULT_TEARDOWN_GAS_LIMIT = 12000000; -export const MAX_L2_GAS_PER_TX_PUBLIC_PORTION = 12000000; -export const MAX_L2_GAS_PER_ENQUEUED_CALL = 12000000; +export const MAX_L2_GAS_PER_TX_PUBLIC_PORTION = 6000000; +export const DEFAULT_TEARDOWN_GAS_LIMIT = 6000000; export const DA_BYTES_PER_FIELD = 32; export const DA_GAS_PER_BYTE = 16; export const FIXED_DA_GAS = 512;