diff --git a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/bytecode.hpp b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/bytecode.hpp index 080703353d..49363508ba 100644 --- a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/bytecode.hpp +++ b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/bytecode.hpp @@ -134,7 +134,7 @@ namespace nil { // if (make_links) { // copy_constrain(input.rlc_challenge, rlc_challenge[0]); // } - auto zerohash = zkevm_keccak_hash({}); + static const auto zerohash = zkevm_keccak_hash({}); for(std::size_t i = 0; i < max_bytecode_size; i++) { constrain(tag[i] * (tag[i] - 1)); // 0. TAG is zeroes or ones -- maybe there will be third value for non-used rows constrain((tag[i] - 1) * index[i]); // 1. INDEX for HEADER and unused bytes is zero 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 2cfc20bcf0..620bd0e8ef 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 @@ -24,6 +24,8 @@ namespace nil { typename nil::blueprint::bbf::context context_object(assignment_table, limits::max_rows); typename ComponentType::input_type input; + input.rlc_challenge = limits::RLC_CHALLENGE; + 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) { diff --git a/proof-producer/libs/preset/include/nil/proof-generator/preset/limits.hpp b/proof-producer/libs/preset/include/nil/proof-generator/preset/limits.hpp index 6acee5eba9..d1806b47d1 100644 --- a/proof-producer/libs/preset/include/nil/proof-generator/preset/limits.hpp +++ b/proof-producer/libs/preset/include/nil/proof-generator/preset/limits.hpp @@ -13,7 +13,7 @@ namespace nil { const std::size_t max_bytecode_size = 20000; const std::size_t max_rows = 500000; const std::size_t max_mpt_size = 30; - const std::size_t max_zkevm_rows = 10000; + const std::size_t max_zkevm_rows = 50000; const std::size_t RLC_CHALLENGE = 7; // should be the same between all components 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 index 95a7132cc1..5d2aed0c5d 100644 Binary files a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.bc 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 index ed563dda36..f0b16b7f24 100644 Binary files a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.copy 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 index 5eda8a6d8e..a9390deab3 100644 Binary files a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.msg 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 index 4eceeb193e..f7444a8626 100644 Binary files a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.rw 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 index f5734f3ac3..7721a92c9b 100644 Binary files a/proof-producer/tests/bin/proof-producer/resources/traces/increment_multi_tx.pb.zkevm 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 f8731f6d20..3afa99b867 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 @@ -69,8 +69,10 @@ INSTANTIATE_TEST_SUITE_P(SimpleCopy, ProverTests, ::testing::Values(Input{Simple INSTANTIATE_TEST_SUITE_P(SimpleZkevm, ProverTests, ::testing::Values(Input{SimpleIncrement, ZKEVM, true})); // TODO // Multiple calls of Counter contract increment function (several transactions) +// !! note that due to https://github.com/NilFoundation/placeholder/issues/196 +// contracts for these traces were compiled with --no-cbor-metadata flag const std::string MultiTxIncrement = "increment_multi_tx.pb"; 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(MultiTxBytecode, ProverTests, ::testing::Values(Input{MultiTxIncrement, BYTECODE})); INSTANTIATE_TEST_SUITE_P(MultiTxCopy, ProverTests, ::testing::Values(Input{MultiTxIncrement, COPY})); INSTANTIATE_TEST_SUITE_P(MultiTxZkevm, ProverTests, ::testing::Values(Input{MultiTxIncrement, ZKEVM, true})); // TODO