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: bump CRS and constants #11306

Merged
merged 8 commits into from
Jan 18, 2025
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
14 changes: 7 additions & 7 deletions barretenberg/cpp/src/barretenberg/bb/api_client_ivc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ class ClientIVCAPI : public API {
}

// TODO(https://github.com/AztecProtocol/barretenberg/issues/1163) set these dynamically
init_bn254_crs(1 << 20);
init_grumpkin_crs(1 << 15);
init_bn254_crs(1 << CONST_PG_LOG_N);
init_grumpkin_crs(1 << CONST_ECCVM_LOG_N);

std::vector<acir_format::AcirProgram> folding_stack =
_build_folding_stack(*flags.input_type, bytecode_path, witness_path);
Expand Down Expand Up @@ -203,7 +203,7 @@ class ClientIVCAPI : public API {
{
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1163): Set these dynamically
init_bn254_crs(1);
init_grumpkin_crs(1 << 15);
init_grumpkin_crs(1 << CONST_ECCVM_LOG_N);

const auto proof = from_buffer<ClientIVC::Proof>(read_file(proof_path));
const auto vk = from_buffer<ClientIVC::VerificationKey>(read_file(vk_path));
Expand All @@ -227,8 +227,8 @@ class ClientIVCAPI : public API {
}

// TODO(https://github.com/AztecProtocol/barretenberg/issues/1163) set these dynamically
init_bn254_crs(1 << 20);
init_grumpkin_crs(1 << 15);
init_bn254_crs(1 << CONST_PG_LOG_N);
init_grumpkin_crs(1 << CONST_ECCVM_LOG_N);

std::vector<acir_format::AcirProgram> folding_stack =
_build_folding_stack(*flags.input_type, bytecode_path, witness_path);
Expand Down Expand Up @@ -256,8 +256,8 @@ class ClientIVCAPI : public API {
}

// TODO(https://github.com/AztecProtocol/barretenberg/issues/1163) set these dynamically
init_bn254_crs(1 << 20);
init_grumpkin_crs(1 << 15);
init_bn254_crs(1 << CONST_PG_LOG_N);
init_grumpkin_crs(1 << CONST_ECCVM_LOG_N);

ClientIVC ivc{ { CLIENT_IVC_BENCH_STRUCTURE } };

Expand Down
8 changes: 4 additions & 4 deletions barretenberg/cpp/src/barretenberg/bb/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ void gate_count_for_ivc(const std::string& bytecodePath)
auto constraint_systems = get_constraint_systems(bytecodePath, /*honk_recursion=*/0);

// Initialize an SRS to make the ClientIVC constructor happy
init_bn254_crs(1 << 20);
init_grumpkin_crs(1 << 15);
init_bn254_crs(1 << CONST_PG_LOG_N);
init_grumpkin_crs(1 << CONST_ECCVM_LOG_N);
TraceSettings trace_settings{ E2E_FULL_TEST_STRUCTURE };

size_t i = 0;
Expand Down Expand Up @@ -1027,8 +1027,8 @@ void write_vk_for_ivc(const std::string& bytecodePath, const std::string& output
using ProgramMetadata = acir_format::ProgramMetadata;

// TODO(https://github.com/AztecProtocol/barretenberg/issues/1163) set these dynamically
init_bn254_crs(1 << 20);
init_grumpkin_crs(1 << 15);
init_bn254_crs(1 << CONST_PG_LOG_N);
init_grumpkin_crs(1 << CONST_ECCVM_LOG_N);

Program program{ get_constraint_system(bytecodePath, /*honk_recursion=*/0), /*witness=*/{} };
auto& ivc_constraints = program.constraints.ivc_recursion_constraints;
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/src/barretenberg/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static constexpr uint32_t CONST_PROOF_SIZE_LOG_N = 28;
// circuits being folded.
static constexpr uint32_t CONST_PG_LOG_N = 20;

static constexpr uint32_t CONST_ECCVM_LOG_N = 15;
static constexpr uint32_t CONST_ECCVM_LOG_N = 16;

// TODO(https://github.com/AztecProtocol/barretenberg/issues/1193): potentially reenable for better memory performance
// static constexpr uint32_t MAX_LOOKUP_TABLES_SIZE = 80000;
Expand Down
10 changes: 5 additions & 5 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ library Constants {
uint256 internal constant TX_CONSTANT_DATA_LENGTH = 37;
uint256 internal constant COMBINED_CONSTANT_DATA_LENGTH = 46;
uint256 internal constant PRIVATE_ACCUMULATED_DATA_LENGTH = 1412;
uint256 internal constant PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2229;
uint256 internal constant PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2230;
uint256 internal constant PRIVATE_TO_PUBLIC_ACCUMULATED_DATA_LENGTH = 900;
uint256 internal constant PRIVATE_TO_AVM_ACCUMULATED_DATA_LENGTH = 160;
uint256 internal constant NUM_PRIVATE_TO_AVM_ACCUMULATED_DATA_ARRAYS = 3;
Expand All @@ -224,10 +224,10 @@ library Constants {
uint256 internal constant NUM_BASE_PARITY_PER_ROOT_PARITY = 4;
uint256 internal constant RECURSIVE_PROOF_LENGTH = 459;
uint256 internal constant NESTED_RECURSIVE_PROOF_LENGTH = 459;
uint256 internal constant IPA_PROOF_LENGTH = 65;
uint256 internal constant RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 534;
uint256 internal constant NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 534;
uint256 internal constant TUBE_PROOF_LENGTH = 534;
uint256 internal constant IPA_PROOF_LENGTH = 69;
uint256 internal constant RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 538;
uint256 internal constant NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 538;
uint256 internal constant TUBE_PROOF_LENGTH = 538;
uint256 internal constant HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS = 128;
uint256 internal constant ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS = 139;
uint256 internal constant CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS = 143;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
vk_tree_root = "0x09d1cff91f930a124fe1c5e54ac3caab742e5a1268501fdc7fe1ebf37ce80b8d"
protocol_contract_tree_root = "0x0586d6158689bcc36f32f0e2e351cfe7b3be422add44055892138f1e725ee482"
vk_tree_root = "0x130ae70545763dadb59caeb820400cffc41df59bcc2b8731917644f247717686"
protocol_contract_tree_root = "0x2f9edcbdd0cfc67764aa32cdef9ea44f2914b44bfd9cf77d518a5ac172e7f9e4"
is_private_only = false
first_nullifier_hint = "0x0000000000000000000000000000000000000000000000000000000000000000"

[tx_request]
args_hash = "0x0cd867b53a950040117f00784f5060a3f4014b40abfcc99046b3945b42b278ac"
args_hash = "0x0af1cbd9eb90baf47ec9d1306eb8877ea38b9a383a2ab2145c04cae5ac01048d"

[tx_request.origin]
inner = "0x2fe8ad613b2137ad92fcf533074edba4ab0696a452f0bbef5e710f9eb5e29445"
inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5"

[tx_request.tx_context]
chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69"
Expand All @@ -23,7 +23,7 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000005b8d80"

[tx_request.tx_context.gas_settings.max_fees_per_gas]
fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000"
fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9be07c0a"
fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd0959c"

[tx_request.tx_context.gas_settings.max_priority_fees_per_gas]
fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000"
Expand Down Expand Up @@ -204,30 +204,30 @@ acir_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
]

[private_call.public_keys.npk_m.inner]
x = "0x29eaca32a8e1ac808afbd5735a2a6ff92814dc383a0ef3c8d723714c466be7f3"
y = "0x10051e9f1e5710d2ab50f83b7806ee006dc70502f8ab6eb48d5907ba667b99d5"
x = "0x2bcd3866b5cfda1e4ec60ac07d18d963d3dc0312565f0bd87c57bee8b11a3d79"
y = "0x2a1698b41b5275c81f388c8197320a7f2c3ea6e00eff1b6fc766d37438813d91"
is_infinite = false

[private_call.public_keys.ivpk_m.inner]
x = "0x16c6c0f826f9761c449c8b2c4a0f6f07b2cfbc6b8dbfd5b23160da4e8dc7ec7a"
y = "0x027c0dd5563bf25b1a9fa355a6929da5f689b13e98a0bde4294a4f84f70b40e8"
x = "0x29bf6934ce2dad97372aebc3996999ac75f36861521a7f9e3e4015398b6dae0c"
y = "0x2bad97bc7a60a7eb91f74fcac835078f2d349b76baebb04a4c67ab38f47e7d8d"
is_infinite = false

[private_call.public_keys.ovpk_m.inner]
x = "0x0c7700f2ffb05f4a1a7ecaf57c26e1552b9bd41e372423a144c4a5ab85967464"
y = "0x0ce0001d815dd70fe01c345ba24170891a4535ff4396b603dcf9a2744c3c7ccf"
x = "0x0466d31125860343f098277c6fb01d8402a0ac4cfccf8acb81eee53b498fe3d4"
y = "0x033776c04e1be74c10a298b4216e5d73961c833bf056e3aabbe8cb14e43345b6"
is_infinite = false

[private_call.public_keys.tpk_m.inner]
x = "0x1425de40ba276209a507a9aae6f6bf75541bf4064876d6aae0f27ead38206b72"
y = "0x2bff439abe62d06e6b6ce2932ee769176b8d17ba31a6707557a76b410d3dd5bb"
x = "0x15383ff9964199e59a676e836d9d05724afc61f29aecbdac4869a346b01716aa"
y = "0x14cc049d171836530ba20dc7e80010b669cb37456031212c57fb8dabaf9bdf3b"
is_infinite = false

[private_call.salted_initialization_hash]
inner = "0x0ca8cd74d80c5ce4bb03b97a2e414a64753c3ac89c2ea733bd3ecf886f4936d8"
inner = "0x072ad0fe9aedb284a12f22f48c156e660f91fc0d318e184d2386f6be5148a15d"

[app_public_inputs]
args_hash = "0x0cd867b53a950040117f00784f5060a3f4014b40abfcc99046b3945b42b278ac"
args_hash = "0x0af1cbd9eb90baf47ec9d1306eb8877ea38b9a383a2ab2145c04cae5ac01048d"
returns_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"
start_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000001"
end_side_effect_counter = "0x0000000000000000000000000000000000000000000000000000000000000004"
Expand All @@ -245,13 +245,13 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000"
inner = "0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000000"

[app_public_inputs.call_context.contract_address]
inner = "0x2fe8ad613b2137ad92fcf533074edba4ab0696a452f0bbef5e710f9eb5e29445"
inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5"

[app_public_inputs.call_context.function_selector]
inner = "0x0000000000000000000000000000000000000000000000000000000027e740b2"

[[app_public_inputs.note_hash_read_requests]]
value = "0x1a32a2e119a230c1a11031fbb2da53460daed1e16598a4f0f8cdfeae9dfde462"
value = "0x0493504d7e2628c6f4c13f91240ac2aeff1175f772039af764ebced0da4326e4"
counter = "0x0000000000000000000000000000000000000000000000000000000000000002"

[[app_public_inputs.note_hash_read_requests]]
Expand Down Expand Up @@ -793,13 +793,13 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000"

[app_public_inputs.public_call_requests.inner]
is_static_call = true
args_hash = "0x2281e2d398bd95c84d5583f931a06a32b2d2956d35595b45221206b72432d357"
args_hash = "0x0f0616825d1d1592b7dfa8ac06c7ddeaeadc7d34a61a1632604c73588bd09ea1"

[app_public_inputs.public_call_requests.inner.msg_sender]
inner = "0x2fe8ad613b2137ad92fcf533074edba4ab0696a452f0bbef5e710f9eb5e29445"
inner = "0x238db6644a299b7b33993c163a0b3f3f3aaeca32f9d0f9d0328c1615d7efb8a5"

[app_public_inputs.public_call_requests.inner.contract_address]
inner = "0x1e04cb704370f423130235cf64e5f35346101ddcc1e9685930f438a1f2ff5de6"
inner = "0x1f3f85b45ea6c7be79b6e4948002182167732a202d83e1dba67b53f676583c83"

[app_public_inputs.public_call_requests.inner.function_selector]
inner = "0x00000000000000000000000000000000000000000000000000000000d5441b0d"
Expand Down Expand Up @@ -1493,51 +1493,51 @@ _value = "0x0000000000000000000000000000000000000000000000000000000000000000"
length = "0x0000000000000000000000000000000000000000000000000000000000000000"

[app_public_inputs.historical_header]
total_fees = "0x00000000000000000000000000000000000000000000000000d1ca89a3df1280"
total_mana_used = "0x000000000000000000000000000000000000000000000000000000000010a2b0"
total_fees = "0x0000000000000000000000000000000000000000000000000003a83222de8a00"
total_mana_used = "0x0000000000000000000000000000000000000000000000000000000000004a40"

[app_public_inputs.historical_header.last_archive]
root = "0x08065cb9a246fc64cb8b7e8d96e3844cde1be02d76852863d3a1b9f7f95f6fd1"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000005"
root = "0x082bf9a6382021ca9fa204bdbc71fd5536d84358e57a61f129fdf5bfb228c06f"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000008"

[app_public_inputs.historical_header.content_commitment]
num_txs = "0x0000000000000000000000000000000000000000000000000000000000000001"
blobs_hash = "0x00882d1eee32ddeea47c4440b94c4e351601d97789c47552ce9a8967e5753eea"
blobs_hash = "0x00310bb50f2202183669b8a85c09986fd69c203fee7d32e06dd1b46c84b20a7d"
in_hash = "0x00089a9d421a82c4a25f7acbebe69e638d5b064fa8a60e018793dcb0be53752c"
out_hash = "0x0000000000000000000000000000000000000000000000000000000000000000"

[app_public_inputs.historical_header.state.l1_to_l2_message_tree]
root = "0x2e33ee2008411c04b99c24b313513d097a0d21a5040b6193d1f978b8226892d6"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000050"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000080"

[app_public_inputs.historical_header.state.partial.note_hash_tree]
root = "0x0a17550139b25759dfb5ffb96aadf7463293b4d61ccc033e2e02a894d1dfb6bb"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000180"
root = "0x2596f3d6b05b7055c3c5ab89de6e270b653cb30c3dd6b9cfd230ff41b5ffa623"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000240"

[app_public_inputs.historical_header.state.partial.nullifier_tree]
root = "0x2d76b4e8df2d1def1b630234beb64f8cee5b20cb3de63e65e8574e8432ed6beb"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000200"
root = "0x15205da8ec6fc0317cee4482de04084768078d73397e7f466c11c45c2cb66bac"
next_available_leaf_index = "0x00000000000000000000000000000000000000000000000000000000000002c0"

[app_public_inputs.historical_header.state.partial.public_data_tree]
root = "0x0f5e38c8b1fb8ec138e0d892da60b39004fd531458b7aceb258dc1770b916417"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000096"
root = "0x2841d0ae135bd8bf3761f919c16b9e5cf7ad4b3035328f65bf84ee2dc599aed6"
next_available_leaf_index = "0x0000000000000000000000000000000000000000000000000000000000000097"

[app_public_inputs.historical_header.global_variables]
chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69"
version = "0x0000000000000000000000000000000000000000000000000000000000000001"
block_number = "0x0000000000000000000000000000000000000000000000000000000000000005"
slot_number = "0x0000000000000000000000000000000000000000000000000000000000000009"
timestamp = "0x00000000000000000000000000000000000000000000000000000000678a4a03"
block_number = "0x0000000000000000000000000000000000000000000000000000000000000008"
slot_number = "0x0000000000000000000000000000000000000000000000000000000000000022"
timestamp = "0x00000000000000000000000000000000000000000000000000000000678ac01a"

[app_public_inputs.historical_header.global_variables.coinbase]
inner = "0x000000000000000000000000ad0df4c37133fd475d440a4cd5fd5d8366209721"
inner = "0x00000000000000000000000017ad47b9f14dc201975cca47fea765e5d42f0b72"

[app_public_inputs.historical_header.global_variables.fee_recipient]
inner = "0x0000000000000000000000000000000000000000000000000000000000000000"

[app_public_inputs.historical_header.global_variables.gas_fees]
fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000"
fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9c6e0778"
fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd3a5e8"

[app_public_inputs.tx_context]
chain_id = "0x0000000000000000000000000000000000000000000000000000000000007a69"
Expand All @@ -1553,7 +1553,7 @@ l2_gas = "0x00000000000000000000000000000000000000000000000000000000005b8d80"

[app_public_inputs.tx_context.gas_settings.max_fees_per_gas]
fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000"
fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9be07c0a"
fee_per_l2_gas = "0x0000000000000000000000000000000000000000000000000000000c9bd0959c"

[app_public_inputs.tx_context.gas_settings.max_priority_fees_per_gas]
fee_per_da_gas = "0x0000000000000000000000000000000000000000000000000000000000000000"
Expand Down
Loading
Loading