Skip to content

Commit

Permalink
Set public input sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
akokoshn authored and akokoshn committed Mar 22, 2024
1 parent df994b4 commit 0af37d7
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 50 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@ jobs:
always() && !cancelled() &&
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped') &&
needs.build-and-test-linux.result == 'success'
uses: NilFoundation/evm-placeholder-verification/.github/workflows/reusable-verify-proofs.yml@5bb7c4b0790f56b3a339e33ba442816fac17ab88
uses: NilFoundation/evm-placeholder-verification/.github/workflows/reusable-verify-proofs.yml@2a0ef5fc67e97be8e3c7b59338cf9eecd030c57d
with:
artifact-name: ${{ needs.build-and-test-linux.outputs.transpiler-artifact-name }}
evm-placeholder-verification-ref: 202fbd0402eda22ae91348800dea7366110b1501
evm-placeholder-verification-ref: 2a0ef5fc67e97be8e3c7b59338cf9eecd030c57d
refs: ${{ needs.handle-syncwith.outputs.prs-refs }}
test-names: ${{ needs.build-and-test-linux.outputs.evm-targets }}

Expand All @@ -323,11 +323,11 @@ jobs:
always() && !cancelled() &&
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped') &&
needs.build-and-test-linux.result == 'success'
uses: NilFoundation/proof-producer/.github/workflows/reusable-generate-proofs-linux.yml@b1e380040b4714b6ad5fe9223555d854c49cf065
uses: NilFoundation/proof-producer/.github/workflows/reusable-generate-proofs-linux.yml@4ddd85878d66f9b916e9fbdafe51180058e5bdaa
with:
artifact-name: ${{ needs.build-and-test-linux.outputs.examples-artifact-name }}
# Update next line if you need new version of proof producer
proof-producer-ref: d6d8d18cd7a6e15dd9497140350efadb6af5179b
proof-producer-ref: 4ddd85878d66f9b916e9fbdafe51180058e5bdaa
refs: ${{ needs.handle-syncwith.outputs.prs-refs }}
targets: ${{ needs.build-and-test-linux.outputs.prover-targets }}

Expand Down Expand Up @@ -401,10 +401,10 @@ jobs:
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped') &&
needs.build-and-test-linux.result == 'success' &&
needs.merge-proofs-to-transpiler-output.result == 'success'
uses: NilFoundation/evm-placeholder-verification/.github/workflows/reusable-verify-proofs.yml@5bb7c4b0790f56b3a339e33ba442816fac17ab88
uses: NilFoundation/evm-placeholder-verification/.github/workflows/reusable-verify-proofs.yml@2a0ef5fc67e97be8e3c7b59338cf9eecd030c57d
with:
artifact-name: ${{ needs.merge-proofs-to-transpiler-output.outputs.merged-artifact-name }}
evm-placeholder-verification-ref: 202fbd0402eda22ae91348800dea7366110b1501
evm-placeholder-verification-ref: 2a0ef5fc67e97be8e3c7b59338cf9eecd030c57d
refs: ${{ needs.handle-syncwith.outputs.prs-refs }}
test-names: ${{ needs.build-and-test-linux.outputs.evm-targets }}

Expand Down
25 changes: 19 additions & 6 deletions bin/assigner/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ using namespace nil::blueprint;
template<typename Endianness, typename ArithmetizationType, typename ConstraintSystemType>
void print_circuit(const circuit_proxy<ArithmetizationType> &circuit_proxy,
const assignment_proxy<ArithmetizationType> &table_proxy,
bool rename_required, std::ostream &out = std::cout) {
bool multi_prover, std::uint32_t idx, std::ostream &out = std::cout) {
using TTypeBase = nil::marshalling::field_type<Endianness>;
using value_marshalling_type =
nil::crypto3::marshalling::types::plonk_constraint_system<TTypeBase, ConstraintSystemType>;
Expand All @@ -90,7 +90,7 @@ void print_circuit(const circuit_proxy<ArithmetizationType> &circuit_proxy,
used_copy_constraints.push_back(copy_constraints[it]);
}

if (rename_required) {
if (multi_prover && idx > 0) {
const auto& used_rows = table_proxy.get_used_rows();
std::uint32_t local_row = 0;
for (const auto &row : used_rows) {
Expand Down Expand Up @@ -128,13 +128,26 @@ void print_circuit(const circuit_proxy<ArithmetizationType> &circuit_proxy,
used_lookup_tables.push_back(lookup_tables[it]);
}


// fill public input sizes
nil::crypto3::marshalling::types::public_input_sizes_type<TTypeBase> public_input_sizes;
using public_input_size_type = typename nil::crypto3::marshalling::types::public_input_sizes_type<TTypeBase>::element_type;
const auto public_input_size = table_proxy.public_inputs_amount();
for (std::uint32_t i = 0; i < public_input_size; i++) {
public_input_sizes.value().push_back(public_input_size_type(table_proxy.public_input_column_size(i)));
}
if (multi_prover) {
public_input_sizes.value().push_back(public_input_size_type(table_proxy.shared_column_size(0)));
}

auto filled_val =
value_marshalling_type(std::make_tuple(
nil::crypto3::marshalling::types::fill_plonk_gates<Endianness, typename ConstraintSystemType::gates_container_type::value_type>(used_gates),
nil::crypto3::marshalling::types::fill_plonk_copy_constraints<Endianness, typename ConstraintSystemType::variable_type>(used_copy_constraints),
nil::crypto3::marshalling::types::fill_plonk_lookup_gates<Endianness, typename ConstraintSystemType::lookup_gates_container_type::value_type>(used_lookup_gates),
nil::crypto3::marshalling::types::fill_plonk_lookup_tables<Endianness, typename ConstraintSystemType::lookup_tables_type::value_type>(used_lookup_tables)
));
nil::crypto3::marshalling::types::fill_plonk_lookup_tables<Endianness, typename ConstraintSystemType::lookup_tables_type::value_type>(used_lookup_tables),
public_input_sizes
));

std::vector<std::uint8_t> cv;
cv.resize(filled_val.length(), 0x00);
Expand Down Expand Up @@ -559,7 +572,7 @@ int curve_dependent_main(std::string bytecode_file_name,
}

print_circuit<nil::marshalling::option::big_endian, ArithmetizationType, ConstraintSystemType>(
assigner_instance.circuits[0], assigner_instance.assignments[0], false, ocircuit);
assigner_instance.circuits[0], assigner_instance.assignments[0], false, 0, ocircuit);
ocircuit.close();
}
} else if (assigner_instance.assignments.size() > 1 &&
Expand Down Expand Up @@ -596,7 +609,7 @@ int curve_dependent_main(std::string bytecode_file_name,

ASSERT_MSG(idx < assigner_instance.circuits.size(), "Not found circuit");
print_circuit<nil::marshalling::option::big_endian, ArithmetizationType, ConstraintSystemType>(
assigner_instance.circuits[idx], assigner_instance.assignments[idx], (idx > 0), ocircuit);
assigner_instance.circuits[idx], assigner_instance.assignments[idx], true, idx, ocircuit);

ocircuit.close();
}
Expand Down
42 changes: 14 additions & 28 deletions bin/recursive_gen/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ int main(int argc, char *argv[]) {
It'll be better to create an empty folder for output")
("skip-verification", "Used with gen-test-proof, if set - skips verifiyng the generated proof")
("multi-prover", "Pass this flag if input circuit is a part of larger circuit, divided for faster paralel proving")
("public-input-rows,p", boost::program_options::value<int>(), "Used public input column rows")
("shared-rows,s", boost::program_options::value<int>(), "Used shared rows")
("elliptic-curve-type,e", boost::program_options::value<std::string>(), "Native elliptic curve type (pallas, vesta, ed25519, bls12381)");

// clang-format on
Expand Down Expand Up @@ -303,38 +301,12 @@ int curve_dependent_main(
return 1;
}

std::uint32_t public_input_rows = 50;
if (vm.count("public-input-rows")) {
public_input_rows = vm["public-input-rows"].as<int>(); }

std::uint32_t shared_rows = 50;
if (vm.count("shared-rows")) {
if( !vm.count("shared-rows") )
std::cout << "shared-rows parameter will be ignored because it is single-prover example" << std::endl;
shared_rows = vm["shared-rows"].as<int>();
}

using parameters_policy = ParametersPolicy<BlueprintFieldType>;
constexpr std::size_t WitnessColumns = parameters_policy::WitnessColumns;
constexpr std::size_t PublicInputColumns = is_multi_prover? parameters_policy::PublicInputColumns + 1: parameters_policy::PublicInputColumns;
constexpr std::size_t ConstantColumns = parameters_policy::ComponentConstantColumns + parameters_policy::LookupConstantColumns;
constexpr std::size_t SelectorColumns = parameters_policy::ComponentSelectorColumns + parameters_policy::LookupSelectorColumns;

std::cout << "WitnessColumns = " << WitnessColumns << std::endl;
std::cout << "PublicInputColumns = " << PublicInputColumns << std::endl;
std::cout << "ConstantColumns = " << ConstantColumns << ": LookupConstantColumns = " << parameters_policy::LookupConstantColumns << std::endl;
std::cout << "SelectorColumns = " << SelectorColumns << ": LookupSelectorColumns = " << parameters_policy::LookupSelectorColumns << std::endl;

std::vector<std::size_t> public_input_sizes(PublicInputColumns);
for(std::size_t i = 0; i < PublicInputColumns; i++){
public_input_sizes[i] = public_input_rows;
}
if( is_multi_prover )
public_input_sizes[PublicInputColumns - 1] = shared_rows;

zk::snark::plonk_table_description<BlueprintFieldType> desc(
WitnessColumns, PublicInputColumns, ConstantColumns, SelectorColumns);

// Circuit-specific parameter
using ConstraintSystemType =
nil::crypto3::zk::snark::plonk_constraint_system<BlueprintFieldType>;
Expand Down Expand Up @@ -364,6 +336,7 @@ int curve_dependent_main(
}

ConstraintSystemType constraint_system;
std::vector<std::size_t> public_input_sizes(PublicInputColumns);
{
std::ifstream ifile;
ifile.open(circuit_file_name, std::ios_base::binary | std::ios_base::in);
Expand All @@ -389,9 +362,16 @@ int curve_dependent_main(
constraint_system = nil::crypto3::marshalling::types::make_plonk_constraint_system<Endianness, ConstraintSystemType>(
marshalled_data
);

for(std::size_t i = 0; i < constraint_system.public_input_sizes_num(); i++){
public_input_sizes[i] = constraint_system.public_input_size(i);
std::cout << "Public input size " << i << " = " << public_input_sizes[i] << std::endl;
}
}

AssignmentTableType assignment_table;
zk::snark::plonk_table_description<BlueprintFieldType> desc(
WitnessColumns, PublicInputColumns, ConstantColumns, SelectorColumns);
{
std::ifstream iassignment;
iassignment.open(assignment_table_file_name, std::ios_base::binary | std::ios_base::in);
Expand Down Expand Up @@ -419,6 +399,12 @@ int curve_dependent_main(
);
desc.rows_amount = assignment_table.rows_amount();
}

std::cout << "WitnessColumns = " << desc.witness_columns << std::endl;
std::cout << "PublicInputColumns = " << desc.public_input_columns << std::endl;
std::cout << "ConstantColumns = " << desc.constant_columns << ": LookupConstantColumns = " << parameters_policy::LookupConstantColumns << std::endl;
std::cout << "SelectorColumns = " << desc.selector_columns << ": LookupSelectorColumns = " << parameters_policy::LookupSelectorColumns << std::endl;

std::vector<std::set<int>> columns_rotations;

const std::size_t Lambda = parameters_policy::lambda;
Expand Down
2 changes: 1 addition & 1 deletion libs/assigner
Submodule assigner updated 81 files
+3 −3 include/nil/blueprint/asserts.hpp
+4 −4 include/nil/blueprint/assigner.hpp
+3 −3 include/nil/blueprint/bitwise/and.hpp
+3 −3 include/nil/blueprint/bitwise/or.hpp
+3 −3 include/nil/blueprint/bitwise/xor.hpp
+3 −3 include/nil/blueprint/bls_signature/bls12_381_pairing.hpp
+3 −3 include/nil/blueprint/bls_signature/fp12_multiplication.hpp
+3 −3 include/nil/blueprint/bls_signature/h2c.hpp
+3 −3 include/nil/blueprint/bls_signature/is_in_g1.hpp
+3 −3 include/nil/blueprint/bls_signature/is_in_g2.hpp
+3 −3 include/nil/blueprint/boolean/logic_ops.hpp
+5 −5 include/nil/blueprint/comparison/comparison.hpp
+6 −7 include/nil/blueprint/component_mockups/bls12_381_pairing.hpp
+5 −5 include/nil/blueprint/component_mockups/comparison.hpp
+8 −8 include/nil/blueprint/component_mockups/fp12_multiplication.hpp
+6 −9 include/nil/blueprint/component_mockups/h2c.hpp
+6 −8 include/nil/blueprint/component_mockups/is_in_g1.hpp
+5 −7 include/nil/blueprint/component_mockups/is_in_g2.hpp
+3 −3 include/nil/blueprint/curves/addition.hpp
+3 −3 include/nil/blueprint/curves/init.hpp
+3 −3 include/nil/blueprint/curves/multiplication.hpp
+3 −3 include/nil/blueprint/curves/subtraction.hpp
+3 −3 include/nil/blueprint/extract_constructor_parameters.hpp
+7 −7 include/nil/blueprint/fields/addition.hpp
+6 −6 include/nil/blueprint/fields/division.hpp
+7 −7 include/nil/blueprint/fields/multiplication.hpp
+7 −7 include/nil/blueprint/fields/subtraction.hpp
+15 −14 include/nil/blueprint/handle_component.hpp
+3 −3 include/nil/blueprint/hashes/sha2_256.hpp
+3 −3 include/nil/blueprint/hashes/sha2_512.hpp
+3 −3 include/nil/blueprint/input_reader.hpp
+4 −4 include/nil/blueprint/integers/addition.hpp
+4 −4 include/nil/blueprint/integers/bit_de_composition.hpp
+4 −4 include/nil/blueprint/integers/bit_shift.hpp
+3 −3 include/nil/blueprint/integers/division.hpp
+3 −3 include/nil/blueprint/integers/division_remainder.hpp
+4 −4 include/nil/blueprint/integers/multiplication.hpp
+4 −4 include/nil/blueprint/integers/subtraction.hpp
+3 −3 include/nil/blueprint/layout_resolver.hpp
+3 −3 include/nil/blueprint/logger.hpp
+3 −3 include/nil/blueprint/memory.hpp
+3 −3 include/nil/blueprint/non_native_marshalling.hpp
+3 −3 include/nil/blueprint/policy/default_policy.hpp
+3 −3 include/nil/blueprint/policy/policy.hpp
+3 −3 include/nil/blueprint/policy/policy_manager.hpp
+3 −3 include/nil/blueprint/recursive_prover/fri_array_swap.hpp
+3 −3 include/nil/blueprint/recursive_prover/fri_cosets.hpp
+3 −3 include/nil/blueprint/recursive_prover/fri_lin_inter.hpp
+4 −4 include/nil/blueprint/recursive_prover/gate_arg_verifier.hpp
+3 −3 include/nil/blueprint/recursive_prover/lookup_arg_verifier.hpp
+3 −3 include/nil/blueprint/recursive_prover/permutation_arg_verifier.hpp
+3 −3 include/nil/blueprint/signature_parser.hpp
+3 −3 include/nil/blueprint/stack.hpp
+3 −3 include/nil/blueprint/statistics.hpp
+3 −3 include/nil/blueprint/utilities.hpp
+ test/data/ed25519_non_native_field_add_0.crct
+ test/data/ed25519_non_native_field_add_1.crct
+ test/data/ed25519_non_native_field_add_2.crct
+ test/data/ed25519_non_native_field_mul_0.crct
+ test/data/ed25519_non_native_field_mul_1.crct
+ test/data/ed25519_non_native_field_mul_2.crct
+ test/data/ed25519_non_native_field_sub_0.crct
+ test/data/ed25519_non_native_field_sub_1.crct
+ test/data/ed25519_non_native_field_sub_2.crct
+ test/data/pallas_native_curve_add_0.crct
+ test/data/pallas_native_curve_add_1.crct
+ test/data/pallas_native_curve_add_2.crct
+ test/data/pallas_native_curve_mul_0.crct
+ test/data/pallas_native_curve_mul_1.crct
+ test/data/pallas_native_field_add_0.crct
+ test/data/pallas_native_field_add_1.crct
+ test/data/pallas_native_field_add_2.crct
+ test/data/pallas_native_field_add_3.crct
+ test/data/pallas_native_field_mul_0.crct
+ test/data/pallas_native_field_mul_1.crct
+ test/data/pallas_native_field_mul_2.crct
+ test/data/pallas_native_field_mul_3.crct
+ test/data/pallas_native_field_sub_0.crct
+ test/data/pallas_native_field_sub_1.crct
+ test/data/pallas_native_field_sub_2.crct
+ test/data/pallas_native_field_sub_3.crct
2 changes: 1 addition & 1 deletion libs/blueprint
Submodule blueprint updated 64 files
+1 −0 .github/workflows/run_tests.yml
+144 −0 include/nil/blueprint/basic_non_native_policy.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/edwards/plonk/non_native/bool_scalar_multiplication.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/edwards/plonk/non_native/complete_addition.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/edwards/plonk/non_native/doubling.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/edwards/plonk/non_native/scalar_non_native_range.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/edwards/plonk/non_native/variable_base_multiplication.hpp
+1 −1 ...e/nil/blueprint/components/algebra/curves/edwards/plonk/non_native/variable_base_multiplication_per_bit.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/pasta/plonk/endo_scalar.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/pasta/plonk/unified_addition.hpp
+1 −1 include/nil/blueprint/components/algebra/curves/pasta/plonk/variable_base_scalar_mul.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/addition.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/bit_shift_constant.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/division.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/division_or_zero.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/exponentiation.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/linear_interpolation.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/logic_and_flag.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/logic_or_flag.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/multiplication.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/multiplication_by_constant.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/addition.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/bit_composition.hpp
+5 −2 include/nil/blueprint/components/algebra/fields/plonk/non_native/bit_decomposition.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/comparison_checked.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/comparison_flag.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/comparison_unchecked.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/detail/boolean_lookup_op_component.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/detail/boolean_op_component.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/division_remainder.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/equality_flag.hpp
+69 −0 include/nil/blueprint/components/algebra/fields/plonk/non_native/logic_ops.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/multiplication.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/range.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/reduction.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/non_native/subtraction.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/quadratic_interpolation.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/range_check.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/sqrt.hpp
+1 −1 include/nil/blueprint/components/algebra/fields/plonk/subtraction.hpp
+3 −8 include/nil/blueprint/components/hashes/poseidon/plonk/poseidon.hpp
+1 −2 include/nil/blueprint/components/hashes/poseidon/plonk/poseidon_constants.hpp
+1 −1 include/nil/blueprint/components/hashes/sha2/plonk/decomposition.hpp
+1 −1 include/nil/blueprint/components/hashes/sha2/plonk/sha256.hpp
+2 −2 include/nil/blueprint/components/hashes/sha2/plonk/sha256_process.hpp
+2 −2 include/nil/blueprint/components/hashes/sha2/plonk/sha512.hpp
+2 −2 include/nil/blueprint/components/hashes/sha2/plonk/sha512_process.hpp
+170 −0 include/nil/blueprint/components/mock/mocked_component_base.hpp
+683 −0 include/nil/blueprint/components/mock/mocked_components.hpp
+2 −2 include/nil/blueprint/components/systems/snark/plonk/kimchi/detail/limbs.hpp
+1 −1 include/nil/blueprint/components/systems/snark/plonk/placeholder/detail/f1_loop.hpp
+1 −1 include/nil/blueprint/components/systems/snark/plonk/placeholder/detail/f3_loop.hpp
+1 −1 include/nil/blueprint/components/systems/snark/plonk/placeholder/detail/gate_component.hpp
+5 −2 include/nil/blueprint/components/systems/snark/plonk/placeholder/fri_array_swap.hpp
+2 −2 include/nil/blueprint/components/systems/snark/plonk/placeholder/fri_cosets.hpp
+1 −1 include/nil/blueprint/components/systems/snark/plonk/placeholder/fri_lin_inter.hpp
+1 −1 include/nil/blueprint/components/systems/snark/plonk/placeholder/gate_argument_verifier.hpp
+1 −1 include/nil/blueprint/components/systems/snark/plonk/placeholder/lookup_argument_verifier.hpp
+1 −1 include/nil/blueprint/components/systems/snark/plonk/placeholder/permutation_argument_verifier.hpp
+7 −4 include/nil/blueprint/utils/connectedness_check.hpp
+1 −0 test/CMakeLists.txt
+61 −4 test/algebra/fields/plonk/non_native/logic_ops.cpp
+749 −0 test/mock/mocked_components.cpp
+35 −30 test/utils/connectedness_check.cpp
14 changes: 7 additions & 7 deletions multi_gen_and_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ mkdir -p ./recursive
ninja -C build merkle_poseidon_3provers_cpp_example_generate_both -j4

# Generate proof and verifier for 1st piece
./build/bin/recursive_gen/recursive_gen -m gen-input -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl0 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct0 -o ./recursive -e pallas -p 1 -s 3 --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-verifier -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl0 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct0 -o ./recursive -e pallas -p 1 -s 3 --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-input -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl0 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct0 -o ./recursive -e pallas --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-verifier -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl0 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct0 -o ./recursive -e pallas --multi-prover

# Copy 1st piece files to placeholder_verifier example
cp -rf ./recursive/placeholder_verifier.cpp ./examples/cpp/placeholder_verifier.cpp
Expand All @@ -15,8 +15,8 @@ ninja -C build placeholder_verifier_cpp_example -j4
./build/bin/assigner/assigner -i ./examples/inputs/placeholder_verifier.inp -b ./build/examples/cpp/placeholder_verifier_cpp_example.ll -c recursive/circuit.crct -t recursive/assignment.tbl --max-num-provers 100 -e pallas --check --column-sizes {15,1,2,0,60,0}

# Generate proof and verifier for 2nd piece
./build/bin/recursive_gen/recursive_gen -m gen-input -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl1 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct1 -o ./recursive -e pallas -p 1 -s 3 --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-verifier -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl1 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct1 -o ./recursive -e pallas -p 1 -s 3 --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-input -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl1 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct1 -o ./recursive -e pallas --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-verifier -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl1 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct1 -o ./recursive -e pallas --multi-prover

# Copy 2nd piece files to placeholder_verifier example
cp -rf ./recursive/placeholder_verifier.cpp ./examples/cpp/placeholder_verifier.cpp
Expand All @@ -27,13 +27,13 @@ ninja -C build placeholder_verifier_cpp_example -j4
./build/bin/assigner/assigner -i ./examples/inputs/placeholder_verifier.inp -b ./build/examples/cpp/placeholder_verifier_cpp_example.ll -c recursive/circuit.crct -t recursive/assignment.tbl --max-num-provers 100 -e pallas --check --column-sizes {15,1,2,0,60,0}

# Generate proof and verifier for 3rd piece
./build/bin/recursive_gen/recursive_gen -m gen-input -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl2 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct2 -o ./recursive -e pallas -p 1 -s 3 --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-verifier -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl2 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct2 -o ./recursive -e pallas -p 1 -s 3 --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-input -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl2 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct2 -o ./recursive -e pallas --multi-prover
./build/bin/recursive_gen/recursive_gen -m gen-verifier -i ./examples/inputs/merkle_poseidon_3provers_public.inp -t ./build/examples/cpp/assignment_merkle_poseidon_3provers_cpp_example.tbl2 -c ./build/examples/cpp/circuit_merkle_poseidon_3provers_cpp_example.crct2 -o ./recursive -e pallas --multi-prover

# Copy 3rd piece files to placeholder_verifier example
cp -rf ./recursive/placeholder_verifier.cpp ./examples/cpp/placeholder_verifier.cpp
cp -rf ./recursive/placeholder_verifier.inp ./examples/inputs/placeholder_verifier.inp

# Assign it
ninja -C build placeholder_verifier_cpp_example -j4
./build/bin/assigner/assigner -i ./examples/inputs/placeholder_verifier.inp -b ./build/examples/cpp/placeholder_verifier_cpp_example.ll -c recursive/circuit.crct -t recursive/assignment.tbl --max-num-provers 100 -e pallas --check --column-sizes {15,1,2,0,60,0}
./build/bin/assigner/assigner -i ./examples/inputs/placeholder_verifier.inp -b ./build/examples/cpp/placeholder_verifier_cpp_example.ll -c recursive/circuit.crct -t recursive/assignment.tbl --max-num-provers 100 -e pallas --check --column-sizes {15,1,2,0,60,0}

0 comments on commit 0af37d7

Please sign in to comment.