Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: lower public tx gas limit to 6M #10635

Merged
merged 2 commits into from
Dec 12, 2024
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
2 changes: 1 addition & 1 deletion barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/migration_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
Expand Down Expand Up @@ -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.

Comment on lines -47 to -50
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was incorrectly placed in the 0.66 section by a previous PR because i thought it would be merged before 0.66....

### 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.
Expand Down
5 changes: 2 additions & 3 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading