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 2e55e0defb..19b6c64855 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 @@ -166,7 +166,7 @@ namespace nil { // Convert memory operations for (const auto& pb_mop : pb_traces->memory_ops()) { - auto const value = string_to_bytes(pb_mop.value()); + auto value = string_to_bytes(pb_mop.value()); auto const op = blueprint::bbf::memory_rw_operation( static_cast(pb_mop.msg_id()), blueprint::zkevm_word_type(static_cast(pb_mop.index())), @@ -174,12 +174,12 @@ namespace nil { !pb_mop.is_read(), blueprint::zkevm_word_from_bytes(value) ); - rw_traces.push_back(op); + rw_traces.push_back(std::move(op)); } // Convert storage operations for (const auto& pb_sop : pb_traces->storage_ops()) { - const auto& op = blueprint::bbf::storage_rw_operation( + auto op = blueprint::bbf::storage_rw_operation( static_cast(pb_sop.msg_id()), blueprint::zkevm_word_from_string(static_cast(pb_sop.key())), static_cast(pb_sop.rw_idx()), @@ -192,17 +192,13 @@ namespace nil { rw_traces.push_back(std::move(op)); } - using nil::blueprint::bbf::rw_operation; - std::sort(rw_traces.begin(), rw_traces.end(), [](rw_operation a, rw_operation b){ - return a < b; - }); + std::sort(rw_traces.begin(), rw_traces.end(), std::less()); BOOST_LOG_TRIVIAL(debug) << "number RW operations " << rw_traces.size() << ":\n" << "stack " << pb_traces->stack_ops_size() << "\n" << "memory " << pb_traces->memory_ops_size() << "\n" << "storage " << pb_traces->storage_ops_size() << "\n"; - return rw_traces; } 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 88aadf5374..f8731f6d20 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 @@ -4,7 +4,7 @@ #include #include -#include "nil/proof-generator/preset/preset.hpp" +#include namespace { @@ -15,7 +15,7 @@ namespace { bool skip_check{false}; // skip satisfiability check while running the test }; -} +} // namespace class ProverTests: public ::testing::TestWithParam { @@ -70,7 +70,7 @@ INSTANTIATE_TEST_SUITE_P(SimpleZkevm, ProverTests, ::testing::Values(Input{Simpl // Multiple calls of Counter contract increment function (several transactions) const std::string MultiTxIncrement = "increment_multi_tx.pb"; -INSTANTIATE_TEST_SUITE_P(MultiTxRw, ProverTests, ::testing::Values(Input{MultiTxIncrement, RW, true})); // https://github.com/NilFoundation/placeholder/issues/187 +INSTANTIATE_TEST_SUITE_P(MultiTxRw, ProverTests, ::testing::Values(Input{MultiTxIncrement, RW})); INSTANTIATE_TEST_SUITE_P(MultiTxBytecode, ProverTests, ::testing::Values(Input{MultiTxIncrement, BYTECODE, true})); // TODO INSTANTIATE_TEST_SUITE_P(MultiTxCopy, ProverTests, ::testing::Values(Input{MultiTxIncrement, COPY})); INSTANTIATE_TEST_SUITE_P(MultiTxZkevm, ProverTests, ::testing::Values(Input{MultiTxIncrement, ZKEVM, true})); // TODO