diff --git a/proof-producer/bin/proof-producer/include/nil/proof-generator/prover.hpp b/proof-producer/bin/proof-producer/include/nil/proof-generator/prover.hpp index 1bb51847dc..ddb804dfe7 100644 --- a/proof-producer/bin/proof-producer/include/nil/proof-generator/prover.hpp +++ b/proof-producer/bin/proof-producer/include/nil/proof-generator/prover.hpp @@ -274,7 +274,7 @@ namespace nil { BOOST_LOG_TRIVIAL(error) << "Proof verification failed"; return false; } - + BOOST_LOG_TRIVIAL(info) << "Writing proof to " << proof_file_; auto filled_placeholder_proof = nil::crypto3::marshalling::types::fill_placeholder_proof(proof, lpc_scheme_->get_fri_params()); @@ -585,7 +585,7 @@ namespace nil { return false; } - writer::write_binary_circuit(out, *constraint_system_, constraint_system_->public_input_sizes()); + writer::write_binary_circuit(out, *constraint_system_, constraint_system_->public_input_sizes()); return true; } @@ -604,7 +604,7 @@ namespace nil { if (!marshalled_table) { return false; } - + auto [table_description, assignment_table] = nil::crypto3::marshalling::types::make_assignment_table( *marshalled_table @@ -634,7 +634,7 @@ namespace nil { using writer = assignment_table_writer; BOOST_LOG_TRIVIAL(info) << "Writing binary assignment table to " << output_filename; - + if (!assignment_table_.has_value() || !table_description_.has_value()) { BOOST_LOG_TRIVIAL(error) << "No assignment table is currently loaded"; return false; @@ -677,8 +677,8 @@ namespace nil { const auto write = [&](std::ostream& out) -> bool { return assignment_table_writer::write_text_assignment( - out, - assignment_table_.value(), + out, + assignment_table_.value(), table_description_.value(), opts ); @@ -1141,7 +1141,7 @@ namespace nil { return assignment_table_.value(); } - bool fill_assignment_table(const boost::filesystem::path& trace_file_path) { + bool fill_assignment_table(const boost::filesystem::path& trace_base_path) { if (!constraint_system_.has_value()) { BOOST_LOG_TRIVIAL(error) << "Circuit is not initialized"; return false; @@ -1150,9 +1150,9 @@ namespace nil { BOOST_LOG_TRIVIAL(error) << "Assignment table is not initialized"; return false; } - const auto err = fill_assignment_table_single_thread(*assignment_table_, *table_description_, circuit_name_, trace_file_path); + const auto err = fill_assignment_table_single_thread(*assignment_table_, *table_description_, circuit_name_, trace_base_path); if (err) { - BOOST_LOG_TRIVIAL(error) << "Can't fill assignment table rom trace " << trace_file_path << ": " << err.value(); + BOOST_LOG_TRIVIAL(error) << "Can't fill assignment table from trace " << trace_base_path << ": " << err.value(); return false; } return true; diff --git a/proof-producer/bin/proof-producer/src/arg_parser.cpp b/proof-producer/bin/proof-producer/src/arg_parser.cpp index 11eeb4b651..d25388b56f 100644 --- a/proof-producer/bin/proof-producer/src/arg_parser.cpp +++ b/proof-producer/bin/proof-producer/src/arg_parser.cpp @@ -81,7 +81,7 @@ namespace nil { ("preprocessed-data", make_defaulted_option(prover_options.preprocessed_public_data_path), "Preprocessed public data file") ("commitment-state-file", make_defaulted_option(prover_options.commitment_scheme_state_path), "Commitment state data file") ("updated-commitment-state-file", make_defaulted_option(prover_options.updated_commitment_scheme_state_path), "Updated commitment state data file") - ("trace", po::value(&prover_options.trace_file_path), "EVM trace input file") + ("trace", po::value(&prover_options.trace_base_path), "Base path for EVM trace files") ("circuit", po::value(&prover_options.circuit_file_path), "Circuit input file") ("circuit-name", po::value(&prover_options.circuit_name), "Target circuit name") ("assignment-table,t", po::value(&prover_options.assignment_table_file_path), "Assignment table input file") @@ -121,7 +121,7 @@ namespace nil { ("proof-of-work-file", make_defaulted_option(prover_options.proof_of_work_output_file), "File with proof of work."); register_output_artifacts_cli_args(prover_options.output_artifacts, config); - + // clang-format on po::options_description cmdline_options("nil; Proof Producer"); cmdline_options.add(generic).add(config); diff --git a/proof-producer/bin/proof-producer/src/arg_parser.hpp b/proof-producer/bin/proof-producer/src/arg_parser.hpp index 803b85cdb2..5982017e5d 100644 --- a/proof-producer/bin/proof-producer/src/arg_parser.hpp +++ b/proof-producer/bin/proof-producer/src/arg_parser.hpp @@ -44,7 +44,7 @@ namespace nil { boost::filesystem::path preprocessed_public_data_path = "preprocessed_data.dat"; boost::filesystem::path commitment_scheme_state_path = "commitment_scheme_state.dat"; boost::filesystem::path updated_commitment_scheme_state_path = "updated_commitment_scheme_state.dat"; - boost::filesystem::path trace_file_path; + boost::filesystem::path trace_base_path; boost::filesystem::path circuit_file_path; boost::filesystem::path assignment_table_file_path; boost::filesystem::path assignment_description_file_path; diff --git a/proof-producer/bin/proof-producer/src/main.cpp b/proof-producer/bin/proof-producer/src/main.cpp index ad8186674d..6a66e7f4c2 100644 --- a/proof-producer/bin/proof-producer/src/main.cpp +++ b/proof-producer/bin/proof-producer/src/main.cpp @@ -72,7 +72,7 @@ int run_prover(const nil::proof_generator::ProverOptions& prover_options) { } break; case nil::proof_generator::detail::ProverStage::ASSIGNMENT: - prover_result = prover.setup_prover() && prover.fill_assignment_table(prover_options.trace_file_path); + prover_result = prover.setup_prover() && prover.fill_assignment_table(prover_options.trace_base_path); if (!prover_options.assignment_table_file_path.empty() && prover_result) { prover_result = prover.save_binary_assignment_table_to_file(prover_options.assignment_table_file_path); } @@ -129,7 +129,7 @@ int run_prover(const nil::proof_generator::ProverOptions& prover_options) { // Preset, fill assignment table, preprocess prover_result = prover.setup_prover() && - prover.fill_assignment_table(prover_options.trace_file_path) && + prover.fill_assignment_table(prover_options.trace_base_path) && prover.preprocess_public_data() && prover.save_preprocessed_common_data_to_file(prover_options.preprocessed_common_data_path) && prover.preprocess_private_data() && diff --git a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/assigner.hpp b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/assigner.hpp index c400e160c3..0904d8d4af 100644 --- a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/assigner.hpp +++ b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/assigner.hpp @@ -15,7 +15,7 @@ namespace nil { template std::map( nil::crypto3::zk::snark::plonk_assignment_table& assignment_table, - const boost::filesystem::path& trace_file_path)>> circuit_selector = { + const boost::filesystem::path& trace_base_path)>> circuit_selector = { {circuits::BYTECODE, fill_bytecode_assignment_table}, {circuits::RW, fill_rw_assignment_table}, {circuits::ZKEVM, fill_zkevm_assignment_table}, @@ -63,12 +63,12 @@ namespace nil { std::optional fill_assignment_table_single_thread(nil::crypto3::zk::snark::plonk_assignment_table& assignment_table, nil::crypto3::zk::snark::plonk_table_description& desc, const std::string& circuit_name, - const boost::filesystem::path& trace_file_path) { + const boost::filesystem::path& trace_base_path) { auto find_it = circuit_selector.find(circuit_name); if (find_it == circuit_selector.end()) { return "Unknown circuit name " + circuit_name; } - const auto err = find_it->second(assignment_table, trace_file_path); + const auto err = find_it->second(assignment_table, trace_base_path); if (err) { return err; } diff --git a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/bytecode.hpp b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/bytecode.hpp index a5f62a57be..2cfc20bcf0 100644 --- a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/bytecode.hpp +++ b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/bytecode.hpp @@ -16,17 +16,18 @@ namespace nil { /// @brief Fill assignment table template std::optional fill_bytecode_assignment_table(nil::crypto3::zk::snark::plonk_assignment_table& assignment_table, - const boost::filesystem::path& trace_file_path) { - BOOST_LOG_TRIVIAL(debug) << "fill bytecode table from " << trace_file_path << "\n"; + const boost::filesystem::path& trace_base_path) { + BOOST_LOG_TRIVIAL(debug) << "fill bytecode table from " << trace_base_path << "\n"; using ComponentType = nil::blueprint::bbf::bytecode; typename nil::blueprint::bbf::context context_object(assignment_table, limits::max_rows); typename ComponentType::input_type input; - const auto contract_bytecodes = deserialize_bytecodes_from_file(trace_file_path); + const auto bytecode_trace_path = get_bytecode_trace_path(trace_base_path); + const auto contract_bytecodes = deserialize_bytecodes_from_file(bytecode_trace_path); if (!contract_bytecodes) { - return "can't read bytecode trace from file"; + return "can't read bytecode trace from file: " + bytecode_trace_path.string(); } for (const auto& bytecode_it : contract_bytecodes.value()) { diff --git a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/copy.hpp b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/copy.hpp index 2d0acbcedb..2b06da81c0 100644 --- a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/copy.hpp +++ b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/copy.hpp @@ -19,8 +19,8 @@ namespace nil { /// @brief Fill assignment table template std::optional fill_copy_events_assignment_table(nil::crypto3::zk::snark::plonk_assignment_table& assignment_table, - const boost::filesystem::path& trace_file_path) { - BOOST_LOG_TRIVIAL(debug) << "fill copy table from " << trace_file_path << "\n"; + const boost::filesystem::path& trace_base_path) { + BOOST_LOG_TRIVIAL(debug) << "fill copy table from " << trace_base_path << "\n"; using ComponentType = nil::blueprint::bbf::copy; @@ -28,16 +28,18 @@ namespace nil { typename ComponentType::input_type input; input.rlc_challenge = limits::RLC_CHALLENGE; - - auto copy_events = deserialize_copy_events_from_file(trace_file_path); + + const auto copy_trace_path = get_copy_trace_path(trace_base_path); + auto copy_events = deserialize_copy_events_from_file(copy_trace_path); if (!copy_events) { - return "can't read copy events from file"; + return "can't read copy events from file: " + copy_trace_path.string(); } input.copy_events = std::move(copy_events.value()); - const auto contract_bytecodes = deserialize_bytecodes_from_file(trace_file_path); + const auto bytecode_trace_path = get_bytecode_trace_path(trace_base_path); + const auto contract_bytecodes = deserialize_bytecodes_from_file(bytecode_trace_path); if (!contract_bytecodes) { - return "can't read bytecode trace from file"; + return "can't read bytecode trace from file: " + bytecode_trace_path.string(); } for (const auto& bytecode_it : contract_bytecodes.value()) { const auto raw_bytecode = string_to_bytes(bytecode_it.second); @@ -45,9 +47,10 @@ namespace nil { input.keccak_buffers.new_buffer(raw_bytecode); } - const auto rw_operations = deserialize_rw_traces_from_file(trace_file_path); + const auto rw_trace_path = get_rw_trace_path(trace_base_path); + const auto rw_operations = deserialize_rw_traces_from_file(rw_trace_path); if (!rw_operations) { - return "can't read rw operations trace from file"; + return "can't read rw operations trace from file: " + rw_trace_path.string(); } for (const auto& stack_op : rw_operations->stack_ops) { input.rw_operations.push_back(stack_op); @@ -62,11 +65,11 @@ namespace nil { auto start = std::chrono::high_resolution_clock::now(); ComponentType instance( - context_object, - input, - limits::max_copy, - limits::max_rw_size, - limits::max_keccak_blocks, + context_object, + input, + limits::max_copy, + limits::max_rw_size, + limits::max_keccak_blocks, limits::max_bytecode_size ); auto duration = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start); @@ -78,4 +81,3 @@ namespace nil { } // nil #endif // PROOF_GENERATOR_LIBS_ASSIGNER_COPY_HPP_ - diff --git a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/rw.hpp b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/rw.hpp index 56c5636f1b..b956c88d1c 100644 --- a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/rw.hpp +++ b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/rw.hpp @@ -17,17 +17,18 @@ namespace nil { /// @brief Fill assignment table template std::optional fill_rw_assignment_table(nil::crypto3::zk::snark::plonk_assignment_table& assignment_table, - const boost::filesystem::path& trace_file_path) { - BOOST_LOG_TRIVIAL(debug) << "fill rw table from " << trace_file_path << "\n"; + const boost::filesystem::path& trace_base_path) { + BOOST_LOG_TRIVIAL(debug) << "fill rw table from " << trace_base_path << "\n"; using ComponentType = nil::blueprint::bbf::rw; typename nil::blueprint::bbf::context context_object(assignment_table, limits::max_rows); nil::blueprint::bbf::rw_operations_vector input; - const auto rw_operations = deserialize_rw_traces_from_file(trace_file_path); + const auto rw_trace_path = get_rw_trace_path(trace_base_path); + const auto rw_operations = deserialize_rw_traces_from_file(rw_trace_path); if (!rw_operations) { - return "can't read rw from file"; + return "can't read rw from file: " + rw_trace_path.string(); } for (const auto& stack_op : rw_operations->stack_ops) { input.push_back(stack_op); diff --git a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/trace_parser.hpp b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/trace_parser.hpp index 9840eb27ce..42fcf9cdee 100644 --- a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/trace_parser.hpp +++ b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/trace_parser.hpp @@ -25,6 +25,11 @@ namespace nil { std::vector storage_ops; }; + const char BYTECODE_EXTENSION[] = ".bc"; + const char RW_EXTENSION[] = ".rw"; + const char ZKEVM_EXTENSION[] = ".zkevm"; + const char COPY_EXTENSION[] = ".copy"; + namespace { // Convert protobuf Uint256 to zkevm_word_type @@ -36,24 +41,27 @@ namespace nil { return result; } - [[nodiscard]] std::optional read_pb_traces_from_file(const boost::filesystem::path& filename) { + boost::filesystem::path extend_base_path(boost::filesystem::path base, + const char* extension) { + std::string current_extension = base.has_extension() ? base.extension().string() : ""; + auto new_extension = base.extension().string() + extension; + return base.replace_extension(new_extension); + } + + template + [[nodiscard]] std::optional read_pb_traces_from_file(const boost::filesystem::path& filename) { std::ifstream file(filename.c_str(), std::ios::in | std::ios::binary); if (!file.is_open()) { return std::nullopt; } - if (!file) { - return std::nullopt; - } - executionproofs::ExecutionTraces pb_traces; + ProtoTraces pb_traces; if (!pb_traces.ParseFromIstream(&file)) { return std::nullopt; } - return pb_traces; } - [[nodiscard]] std::optional @@ -101,6 +109,22 @@ namespace nil { } } // namespace + boost::filesystem::path get_bytecode_trace_path(const boost::filesystem::path& trace_base_path) { + return extend_base_path(trace_base_path, BYTECODE_EXTENSION); + } + + boost::filesystem::path get_rw_trace_path(const boost::filesystem::path& trace_base_path) { + return extend_base_path(trace_base_path, RW_EXTENSION); + } + + boost::filesystem::path get_zkevm_trace_path(const boost::filesystem::path& trace_base_path) { + return extend_base_path(trace_base_path, ZKEVM_EXTENSION); + } + + boost::filesystem::path get_copy_trace_path(const boost::filesystem::path& trace_base_path) { + return extend_base_path(trace_base_path, COPY_EXTENSION); + } + std::vector string_to_bytes(const std::string& str) { std::vector res(str.size()); for (std::size_t i = 0; i < str.size(); i++) { @@ -109,8 +133,8 @@ namespace nil { return res; } - [[nodiscard]] std::optional> deserialize_bytecodes_from_file(const boost::filesystem::path& filename) { - const auto pb_traces = read_pb_traces_from_file(filename); + [[nodiscard]] std::optional> deserialize_bytecodes_from_file(const boost::filesystem::path& bytecode_trace_path) { + const auto pb_traces = read_pb_traces_from_file(bytecode_trace_path); if (!pb_traces) { return std::nullopt; } @@ -125,8 +149,8 @@ namespace nil { return contract_bytecodes; } - [[nodiscard]] std::optional deserialize_rw_traces_from_file(const boost::filesystem::path& filename) { - const auto pb_traces = read_pb_traces_from_file(filename); + [[nodiscard]] std::optional deserialize_rw_traces_from_file(const boost::filesystem::path& rw_traces_path) { + const auto pb_traces = read_pb_traces_from_file(rw_traces_path); if (!pb_traces) { return std::nullopt; } @@ -178,8 +202,8 @@ namespace nil { return rw_traces; } - [[nodiscard]] std::optional> deserialize_zkevm_state_traces_from_file(const boost::filesystem::path& filename) { - const auto pb_traces = read_pb_traces_from_file(filename); + [[nodiscard]] std::optional> deserialize_zkevm_state_traces_from_file(const boost::filesystem::path& zkevm_traces_path) { + const auto pb_traces = read_pb_traces_from_file(zkevm_traces_path); if (!pb_traces) { return std::nullopt; } @@ -217,8 +241,8 @@ namespace nil { return zkevm_states; } - [[nodiscard]] std::optional> deserialize_copy_events_from_file(const boost::filesystem::path& filename) { - const auto pb_traces = read_pb_traces_from_file(filename); + [[nodiscard]] std::optional> deserialize_copy_events_from_file(const boost::filesystem::path& copy_traces_file) { + const auto pb_traces = read_pb_traces_from_file(copy_traces_file); if (!pb_traces) { return std::nullopt; } diff --git a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/zkevm.hpp b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/zkevm.hpp index 4619eb83ea..73a36213cd 100644 --- a/proof-producer/libs/assigner/include/nil/proof-generator/assigner/zkevm.hpp +++ b/proof-producer/libs/assigner/include/nil/proof-generator/assigner/zkevm.hpp @@ -17,8 +17,8 @@ namespace nil { /// @brief Fill assignment table template std::optional fill_zkevm_assignment_table(nil::crypto3::zk::snark::plonk_assignment_table& assignment_table, - const boost::filesystem::path& trace_file_path) { - BOOST_LOG_TRIVIAL(debug) << "fill zkevm table from " << trace_file_path << "\n"; + const boost::filesystem::path& trace_base_path) { + BOOST_LOG_TRIVIAL(debug) << "fill zkevm table from " << trace_base_path << "\n"; using ComponentType = nil::blueprint::bbf::zkevm; @@ -27,9 +27,10 @@ namespace nil { typename ComponentType::input_type input; // bytecode - const auto contract_bytecodes = deserialize_bytecodes_from_file(trace_file_path); + const auto bytecode_trace_path = get_bytecode_trace_path(trace_base_path); + const auto contract_bytecodes = deserialize_bytecodes_from_file(bytecode_trace_path); if (!contract_bytecodes) { - return "can't read bytecode from file"; + return "can't read bytecode from file: " + bytecode_trace_path.string(); } for (const auto& bytecode_it : contract_bytecodes.value()) { const auto raw_bytecode = string_to_bytes(bytecode_it.second); @@ -38,9 +39,10 @@ namespace nil { } // rw - const auto rw_operations = deserialize_rw_traces_from_file(trace_file_path); + const auto rw_trace_path = get_rw_trace_path(trace_base_path); + const auto rw_operations = deserialize_rw_traces_from_file(rw_trace_path); if (!rw_operations) { - return "can't read rw from file"; + return "can't read rw from file: " + rw_trace_path.string(); } for (const auto& stack_op : rw_operations->stack_ops) { input.rw_operations.push_back(stack_op); @@ -52,28 +54,30 @@ namespace nil { input.rw_operations.push_back(storage_op); } - + // states - const auto zkevm_states = deserialize_zkevm_state_traces_from_file(trace_file_path); + const auto zkevm_trace_path = get_zkevm_trace_path(trace_base_path); + const auto zkevm_states = deserialize_zkevm_state_traces_from_file(zkevm_trace_path); if (!zkevm_states) { - return "can't read zkevm states from file"; + return "can't read zkevm states from file: " + zkevm_trace_path.string(); } input.zkevm_states = zkevm_states.value(); - const auto copy_events = deserialize_copy_events_from_file(trace_file_path); + const auto copy_trace_path = get_copy_trace_path(trace_base_path); + const auto copy_events = deserialize_copy_events_from_file(copy_trace_path); if (!copy_events) { - return "can't read copy events from file"; + return "can't read copy events from file: " + copy_trace_path.string(); } input.copy_events = copy_events.value(); auto start = std::chrono::high_resolution_clock::now(); ComponentType instance( - context_object, - input, - limits::max_zkevm_rows, - limits::max_copy, - limits::max_rw_size, - limits::max_keccak_blocks, + context_object, + input, + limits::max_zkevm_rows, + limits::max_copy, + limits::max_rw_size, + limits::max_keccak_blocks, limits::max_bytecode_size ); auto duration = std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - start); diff --git a/proof-producer/libs/assigner/proto/trace.proto b/proof-producer/libs/assigner/proto/trace.proto index b5e31e5536..cf42668e68 100644 --- a/proof-producer/libs/assigner/proto/trace.proto +++ b/proof-producer/libs/assigner/proto/trace.proto @@ -57,14 +57,14 @@ message SlotChangeTrace { bytes ssz_proof = 6; } -message AdderssSlotsChanges { +message AddressSlotsChanges { repeated SlotChangeTrace slots_changes = 1; } -// MessageTraces contains traces related to a single executed message -message MessageTraces { +// MessageSlotChanges contains traces related to a single executed message +message MessageSlotChanges { // HEX address to slots changes in address's storage - map storage_traces_by_address = 1; + map storage_traces_by_address = 1; } // StorageEntry is a key-value pair representing a single piece of storage data @@ -118,13 +118,28 @@ message CopyEvent { } -// ExecutionTraces represents all proofs related to contract execution -message ExecutionTraces { +// Traces collected for bytecode circuit +message BytecodeTraces { + map contract_bytecodes = 1; +} + +// Traces collected for rw circuit +message RWTraces { repeated StackOp stack_ops = 1; repeated MemoryOp memory_ops = 2; repeated StorageOp storage_ops = 3; - repeated MessageTraces message_traces = 4; - map contract_bytecodes = 5; - repeated ZKEVMState zkevm_states = 6; - repeated CopyEvent copy_events = 7; +} + +// Traces collected for zkevm circuit +message ZKEVMTraces { + repeated ZKEVMState zkevm_states = 1; +} + +// Traces collected for bytecode circuit +message CopyTraces { + repeated CopyEvent copy_events = 1; +} + +message MessageTraces { + repeated MessageSlotChanges message_slot_changes = 1; } diff --git a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb deleted file mode 100644 index caf1e32419..0000000000 Binary files a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb and /dev/null differ diff --git a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.bc b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.bc new file mode 100644 index 0000000000..95a7132cc1 Binary files /dev/null and b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.bc differ diff --git a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.copy b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.copy new file mode 100644 index 0000000000..ed563dda36 Binary files /dev/null and b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.copy differ diff --git a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.msg b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.msg new file mode 100644 index 0000000000..5eda8a6d8e Binary files /dev/null and b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.msg differ diff --git a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.rw b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.rw new file mode 100644 index 0000000000..4eceeb193e Binary files /dev/null and b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.rw differ diff --git a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.zkevm b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.zkevm new file mode 100644 index 0000000000..f5734f3ac3 Binary files /dev/null and b/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.zkevm differ diff --git a/proof-producer/tests/bin/proof-producer/test_zkevm_bbf_circuits.cpp b/proof-producer/tests/bin/proof-producer/test_zkevm_bbf_circuits.cpp index 55905fb1d7..a7adb2a9d3 100644 --- a/proof-producer/tests/bin/proof-producer/test_zkevm_bbf_circuits.cpp +++ b/proof-producer/tests/bin/proof-producer/test_zkevm_bbf_circuits.cpp @@ -20,7 +20,7 @@ class ProverTests: public ::testing::Test { }; TEST_F(ProverTests, Bytecode) { - std::string trace_file_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; + std::string trace_base_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; nil::proof_generator::Prover prover( lambda, expand_factor, @@ -31,7 +31,7 @@ TEST_F(ProverTests, Bytecode) { ASSERT_TRUE(prover.setup_prover()); - ASSERT_TRUE(prover.fill_assignment_table(trace_file_path)); + ASSERT_TRUE(prover.fill_assignment_table(trace_base_path)); const auto& circuit = prover.get_constraint_system(); const auto& assignment_table = prover.get_assignment_table(); @@ -41,7 +41,7 @@ TEST_F(ProverTests, Bytecode) { } TEST_F(ProverTests, RW) { - std::string trace_file_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; + std::string trace_base_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; nil::proof_generator::Prover prover( lambda, expand_factor, @@ -52,7 +52,7 @@ TEST_F(ProverTests, RW) { ASSERT_TRUE(prover.setup_prover()); - ASSERT_TRUE(prover.fill_assignment_table(trace_file_path)); + ASSERT_TRUE(prover.fill_assignment_table(trace_base_path)); const auto& circuit = prover.get_constraint_system(); const auto& assignment_table = prover.get_assignment_table(); @@ -62,7 +62,7 @@ TEST_F(ProverTests, RW) { } TEST_F(ProverTests, Copy) { - std::string trace_file_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; + std::string trace_base_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; nil::proof_generator::Prover prover( lambda, expand_factor, @@ -73,7 +73,7 @@ TEST_F(ProverTests, Copy) { ASSERT_TRUE(prover.setup_prover()); - ASSERT_TRUE(prover.fill_assignment_table(trace_file_path)); + ASSERT_TRUE(prover.fill_assignment_table(trace_base_path)); const auto& circuit = prover.get_constraint_system(); const auto& assignment_table = prover.get_assignment_table(); @@ -82,7 +82,7 @@ TEST_F(ProverTests, Copy) { } TEST_F(ProverTests, Zkevm) { - std::string trace_file_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; + std::string trace_base_path = std::string(TEST_DATA_DIR) + "increment_multi_tx.pb"; nil::proof_generator::Prover prover( lambda, expand_factor, @@ -93,7 +93,7 @@ TEST_F(ProverTests, Zkevm) { ASSERT_TRUE(prover.setup_prover()); - ASSERT_TRUE(prover.fill_assignment_table(trace_file_path)); + ASSERT_TRUE(prover.fill_assignment_table(trace_base_path)); const auto& circuit = prover.get_constraint_system(); const auto& assignment_table = prover.get_assignment_table();