Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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 @@ -198,7 +198,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 @@ -222,10 +222,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
Expand Up @@ -1551,6 +1551,10 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000"
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3330,6 +3330,10 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000"
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3224,7 +3224,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
Comment thread
Thunkar marked this conversation as resolved.
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down Expand Up @@ -6608,7 +6612,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down Expand Up @@ -1416,7 +1420,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down Expand Up @@ -1416,7 +1420,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3227,7 +3227,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down Expand Up @@ -6611,7 +6615,11 @@ fields = [
"0x0000000000000000000000000000000000000000000000000000000000000213",
"0x0000000000000000000000000000000000000000000000000000000000000214",
"0x0000000000000000000000000000000000000000000000000000000000000215",
"0x0000000000000000000000000000000000000000000000000000000000000216"
"0x0000000000000000000000000000000000000000000000000000000000000216",
"0x0000000000000000000000000000000000000000000000000000000000000217",
"0x0000000000000000000000000000000000000000000000000000000000000218",
"0x0000000000000000000000000000000000000000000000000000000000000219",
"0x000000000000000000000000000000000000000000000000000000000000021A"
]

[inputs.previous_rollup_data.vk]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ pub global NUM_BASE_PARITY_PER_ROOT_PARITY: u32 = 4;
// Lengths of the different types of proofs in fields
pub global RECURSIVE_PROOF_LENGTH: u32 = 459;
pub global NESTED_RECURSIVE_PROOF_LENGTH: u32 = RECURSIVE_PROOF_LENGTH;
pub global IPA_PROOF_LENGTH: u32 = 65;
pub global IPA_PROOF_LENGTH: u32 = 69;
pub global RECURSIVE_ROLLUP_HONK_PROOF_LENGTH: u32 =
RECURSIVE_PROOF_LENGTH + IPA_CLAIM_LENGTH + IPA_PROOF_LENGTH;
pub global NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH: u32 = RECURSIVE_ROLLUP_HONK_PROOF_LENGTH;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This circuit aggregates a single Honk proof from `assert_statement`.
global SIZE_OF_PROOF_IF_LOGN_IS_28: u32 = 469 + 65;
global SIZE_OF_PROOF_IF_LOGN_IS_28: u32 = 469 + 69;
global ROLLUP_HONK_IDENTIFIER: u32 = 5;
fn main(
verification_key: [Field; 139],
Expand Down
10 changes: 5 additions & 5 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const PRIVATE_TO_ROLLUP_ACCUMULATED_DATA_LENGTH = 741;
export const TX_CONSTANT_DATA_LENGTH = 37;
export const COMBINED_CONSTANT_DATA_LENGTH = 46;
export const PRIVATE_ACCUMULATED_DATA_LENGTH = 1412;
export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2229;
export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2230;
export const PRIVATE_TO_PUBLIC_ACCUMULATED_DATA_LENGTH = 900;
export const PRIVATE_TO_AVM_ACCUMULATED_DATA_LENGTH = 160;
export const NUM_PRIVATE_TO_AVM_ACCUMULATED_DATA_ARRAYS = 3;
Expand All @@ -202,10 +202,10 @@ export const NUM_MSGS_PER_BASE_PARITY = 4;
export const NUM_BASE_PARITY_PER_ROOT_PARITY = 4;
export const RECURSIVE_PROOF_LENGTH = 459;
export const NESTED_RECURSIVE_PROOF_LENGTH = 459;
export const IPA_PROOF_LENGTH = 65;
export const RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 534;
export const NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 534;
export const TUBE_PROOF_LENGTH = 534;
export const IPA_PROOF_LENGTH = 69;
export const RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 538;
export const NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH = 538;
export const TUBE_PROOF_LENGTH = 538;
export const HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS = 128;
export const ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS = 139;
export const CLIENT_IVC_VERIFICATION_KEY_LENGTH_IN_FIELDS = 143;
Expand Down