Skip to content

Commit

Permalink
chore: bumping L2 gas and public reads constants (#9431)
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan authored Oct 25, 2024
1 parent a67d0e2 commit 91c50dd
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 44 deletions.
14 changes: 7 additions & 7 deletions barretenberg/cpp/pil/avm/constants_gen.pil
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace constants(256);
pol MAX_NULLIFIERS_PER_CALL = 16;
pol MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL = 16;
pol MAX_L2_TO_L1_MSGS_PER_CALL = 2;
pol MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 32;
pol MAX_PUBLIC_DATA_READS_PER_CALL = 32;
pol MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 64;
pol MAX_PUBLIC_DATA_READS_PER_CALL = 64;
pol MAX_NOTE_HASH_READ_REQUESTS_PER_CALL = 16;
pol MAX_NULLIFIER_READ_REQUESTS_PER_CALL = 16;
pol MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_CALL = 16;
Expand Down Expand Up @@ -39,9 +39,9 @@ namespace constants(256);
pol START_NULLIFIER_NON_EXISTS_OFFSET = 32;
pol START_L1_TO_L2_MSG_EXISTS_WRITE_OFFSET = 48;
pol START_SSTORE_WRITE_OFFSET = 64;
pol START_SLOAD_WRITE_OFFSET = 96;
pol START_EMIT_NOTE_HASH_WRITE_OFFSET = 128;
pol START_EMIT_NULLIFIER_WRITE_OFFSET = 144;
pol START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = 160;
pol START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = 162;
pol START_SLOAD_WRITE_OFFSET = 128;
pol START_EMIT_NOTE_HASH_WRITE_OFFSET = 192;
pol START_EMIT_NULLIFIER_WRITE_OFFSET = 208;
pol START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = 224;
pol START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = 226;

Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ template <typename FF_> class kernelImpl {
const auto constants_START_NULLIFIER_NON_EXISTS_OFFSET = FF(32);
const auto constants_START_L1_TO_L2_MSG_EXISTS_WRITE_OFFSET = FF(48);
const auto constants_START_SSTORE_WRITE_OFFSET = FF(64);
const auto constants_START_SLOAD_WRITE_OFFSET = FF(96);
const auto constants_START_EMIT_NOTE_HASH_WRITE_OFFSET = FF(128);
const auto constants_START_EMIT_NULLIFIER_WRITE_OFFSET = FF(144);
const auto constants_START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = FF(160);
const auto constants_START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = FF(162);
const auto constants_START_SLOAD_WRITE_OFFSET = FF(128);
const auto constants_START_EMIT_NOTE_HASH_WRITE_OFFSET = FF(192);
const auto constants_START_EMIT_NULLIFIER_WRITE_OFFSET = FF(208);
const auto constants_START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = FF(224);
const auto constants_START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = FF(226);
const auto main_KERNEL_INPUT_SELECTORS = ((((((((((new_term.main_sel_op_address + new_term.main_sel_op_sender) +
new_term.main_sel_op_function_selector) +
new_term.main_sel_op_transaction_fee) +
Expand Down
20 changes: 10 additions & 10 deletions barretenberg/cpp/src/barretenberg/vm/aztec_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#define MAX_NULLIFIERS_PER_CALL 16
#define MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL 16
#define MAX_L2_TO_L1_MSGS_PER_CALL 2
#define MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL 32
#define MAX_PUBLIC_DATA_READS_PER_CALL 32
#define MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL 64
#define MAX_PUBLIC_DATA_READS_PER_CALL 64
#define MAX_NOTE_HASH_READ_REQUESTS_PER_CALL 16
#define MAX_NULLIFIER_READ_REQUESTS_PER_CALL 16
#define MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_CALL 16
#define MAX_L1_TO_L2_MSG_READ_REQUESTS_PER_CALL 16
#define MAX_UNENCRYPTED_LOGS_PER_CALL 4
#define MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS 3000
#define MAX_L2_GAS_PER_ENQUEUED_CALL 6000000
#define MAX_L2_GAS_PER_ENQUEUED_CALL 12000000
#define AZTEC_ADDRESS_LENGTH 1
#define GAS_FEES_LENGTH 2
#define GAS_LENGTH 2
Expand All @@ -33,12 +33,12 @@
#define STATE_REFERENCE_LENGTH 8
#define TOTAL_FEES_LENGTH 1
#define HEADER_LENGTH 24
#define PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH 674
#define PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH 866
#define PUBLIC_CONTEXT_INPUTS_LENGTH 41
#define AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS 86
#define AVM_PROOF_LENGTH_IN_FIELDS 3993
#define AVM_PUBLIC_COLUMN_MAX_SIZE 1024
#define AVM_PUBLIC_INPUTS_FLATTENED_SIZE 2722
#define AVM_PUBLIC_INPUTS_FLATTENED_SIZE 2914
#define MEM_TAG_FF 0
#define MEM_TAG_U1 1
#define MEM_TAG_U8 2
Expand Down Expand Up @@ -66,11 +66,11 @@
#define START_NULLIFIER_NON_EXISTS_OFFSET 32
#define START_L1_TO_L2_MSG_EXISTS_WRITE_OFFSET 48
#define START_SSTORE_WRITE_OFFSET 64
#define START_SLOAD_WRITE_OFFSET 96
#define START_EMIT_NOTE_HASH_WRITE_OFFSET 128
#define START_EMIT_NULLIFIER_WRITE_OFFSET 144
#define START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET 160
#define START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET 162
#define START_SLOAD_WRITE_OFFSET 128
#define START_EMIT_NOTE_HASH_WRITE_OFFSET 192
#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 AVM_ADD_BASE_L2_GAS 32
#define AVM_SUB_BASE_L2_GAS 32
#define AVM_MUL_BASE_L2_GAS 33
Expand Down
18 changes: 9 additions & 9 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ library Constants {
uint256 internal constant MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL = 4;
uint256 internal constant MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL = 16;
uint256 internal constant MAX_L2_TO_L1_MSGS_PER_CALL = 2;
uint256 internal constant MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 32;
uint256 internal constant MAX_PUBLIC_DATA_READS_PER_CALL = 32;
uint256 internal constant MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 64;
uint256 internal constant MAX_PUBLIC_DATA_READS_PER_CALL = 64;
uint256 internal constant MAX_NOTE_HASH_READ_REQUESTS_PER_CALL = 16;
uint256 internal constant MAX_NULLIFIER_READ_REQUESTS_PER_CALL = 16;
uint256 internal constant MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_CALL = 16;
Expand Down Expand Up @@ -119,7 +119,7 @@ library Constants {
14061769416655647708490531650437236735160113654556896985372298487345;
uint256 internal constant DEFAULT_GAS_LIMIT = 1000000000;
uint256 internal constant DEFAULT_TEARDOWN_GAS_LIMIT = 100000000;
uint256 internal constant MAX_L2_GAS_PER_ENQUEUED_CALL = 6000000;
uint256 internal constant MAX_L2_GAS_PER_ENQUEUED_CALL = 12000000;
uint256 internal constant DEFAULT_MAX_FEE_PER_GAS = 10;
uint256 internal constant DEFAULT_INCLUSION_FEE = 0;
uint256 internal constant DA_BYTES_PER_FIELD = 32;
Expand Down Expand Up @@ -206,7 +206,7 @@ library Constants {
uint256 internal constant TOTAL_FEES_LENGTH = 1;
uint256 internal constant HEADER_LENGTH = 24;
uint256 internal constant PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 501;
uint256 internal constant PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 674;
uint256 internal constant PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 866;
uint256 internal constant PRIVATE_CONTEXT_INPUTS_LENGTH = 38;
uint256 internal constant PUBLIC_CONTEXT_INPUTS_LENGTH = 41;
uint256 internal constant FEE_RECIPIENT_LENGTH = 2;
Expand Down Expand Up @@ -273,11 +273,11 @@ library Constants {
uint256 internal constant START_NULLIFIER_NON_EXISTS_OFFSET = 32;
uint256 internal constant START_L1_TO_L2_MSG_EXISTS_WRITE_OFFSET = 48;
uint256 internal constant START_SSTORE_WRITE_OFFSET = 64;
uint256 internal constant START_SLOAD_WRITE_OFFSET = 96;
uint256 internal constant START_EMIT_NOTE_HASH_WRITE_OFFSET = 128;
uint256 internal constant START_EMIT_NULLIFIER_WRITE_OFFSET = 144;
uint256 internal constant START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = 160;
uint256 internal constant START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = 162;
uint256 internal constant START_SLOAD_WRITE_OFFSET = 128;
uint256 internal constant START_EMIT_NOTE_HASH_WRITE_OFFSET = 192;
uint256 internal constant START_EMIT_NULLIFIER_WRITE_OFFSET = 208;
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 PROOF_TYPE_PLONK = 0;
uint256 internal constant PROOF_TYPE_HONK = 1;
uint256 internal constant PROOF_TYPE_OINK = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ global MAX_NULLIFIERS_PER_CALL: u32 = 16;
global MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL: u32 = 4;
global MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL: u32 = 16;
global MAX_L2_TO_L1_MSGS_PER_CALL: u32 = 2;
global MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL: u32 = 32;
global MAX_PUBLIC_DATA_READS_PER_CALL: u32 = 32;
global MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL: u32 = 64;
global MAX_PUBLIC_DATA_READS_PER_CALL: u32 = 64;
global MAX_NOTE_HASH_READ_REQUESTS_PER_CALL: u32 = 16;
global MAX_NULLIFIER_READ_REQUESTS_PER_CALL: u32 = 16;
global MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_CALL: u32 = 16;
Expand Down Expand Up @@ -183,7 +183,7 @@ global DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE =
// GAS DEFAULTS
global DEFAULT_GAS_LIMIT: u32 = 1_000_000_000;
global DEFAULT_TEARDOWN_GAS_LIMIT: u32 = 100_000_000;
global MAX_L2_GAS_PER_ENQUEUED_CALL: u32 = 6_000_000;
global MAX_L2_GAS_PER_ENQUEUED_CALL: u32 = 12_000_000;
global DEFAULT_MAX_FEE_PER_GAS: Field = 10;
global DEFAULT_INCLUSION_FEE: Field = 0;
global DA_BYTES_PER_FIELD: u32 = 32;
Expand Down
20 changes: 10 additions & 10 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export const MAX_NULLIFIERS_PER_CALL = 16;
export const MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL = 4;
export const MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL = 16;
export const MAX_L2_TO_L1_MSGS_PER_CALL = 2;
export const MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 32;
export const MAX_PUBLIC_DATA_READS_PER_CALL = 32;
export const MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 64;
export const MAX_PUBLIC_DATA_READS_PER_CALL = 64;
export const MAX_NOTE_HASH_READ_REQUESTS_PER_CALL = 16;
export const MAX_NULLIFIER_READ_REQUESTS_PER_CALL = 16;
export const MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_CALL = 16;
Expand Down Expand Up @@ -104,7 +104,7 @@ export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE =
14061769416655647708490531650437236735160113654556896985372298487345n;
export const DEFAULT_GAS_LIMIT = 1000000000;
export const DEFAULT_TEARDOWN_GAS_LIMIT = 100000000;
export const MAX_L2_GAS_PER_ENQUEUED_CALL = 6000000;
export const MAX_L2_GAS_PER_ENQUEUED_CALL = 12000000;
export const DEFAULT_MAX_FEE_PER_GAS = 10;
export const DEFAULT_INCLUSION_FEE = 0;
export const DA_BYTES_PER_FIELD = 32;
Expand Down Expand Up @@ -183,7 +183,7 @@ export const TX_REQUEST_LENGTH = 13;
export const TOTAL_FEES_LENGTH = 1;
export const HEADER_LENGTH = 24;
export const PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 501;
export const PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 674;
export const PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 866;
export const PRIVATE_CONTEXT_INPUTS_LENGTH = 38;
export const PUBLIC_CONTEXT_INPUTS_LENGTH = 41;
export const FEE_RECIPIENT_LENGTH = 2;
Expand Down Expand Up @@ -226,7 +226,7 @@ export const CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS = 145;
export const AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS = 86;
export const AVM_PROOF_LENGTH_IN_FIELDS = 3993;
export const AVM_PUBLIC_COLUMN_MAX_SIZE = 1024;
export const AVM_PUBLIC_INPUTS_FLATTENED_SIZE = 2722;
export const AVM_PUBLIC_INPUTS_FLATTENED_SIZE = 2914;
export const MEM_TAG_FF = 0;
export const MEM_TAG_U1 = 1;
export const MEM_TAG_U8 = 2;
Expand Down Expand Up @@ -254,11 +254,11 @@ export const START_NULLIFIER_EXISTS_OFFSET = 16;
export const START_NULLIFIER_NON_EXISTS_OFFSET = 32;
export const START_L1_TO_L2_MSG_EXISTS_WRITE_OFFSET = 48;
export const START_SSTORE_WRITE_OFFSET = 64;
export const START_SLOAD_WRITE_OFFSET = 96;
export const START_EMIT_NOTE_HASH_WRITE_OFFSET = 128;
export const START_EMIT_NULLIFIER_WRITE_OFFSET = 144;
export const START_EMIT_L2_TO_L1_MSG_WRITE_OFFSET = 160;
export const START_EMIT_UNENCRYPTED_LOG_WRITE_OFFSET = 162;
export const START_SLOAD_WRITE_OFFSET = 128;
export const START_EMIT_NOTE_HASH_WRITE_OFFSET = 192;
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 AVM_ADD_BASE_L2_GAS = 32;
export const AVM_SUB_BASE_L2_GAS = 32;
export const AVM_MUL_BASE_L2_GAS = 33;
Expand Down

0 comments on commit 91c50dd

Please sign in to comment.