Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proof-producer: enable zkevm circuit test #206

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ namespace nil {
current_state.bytecode_hash_hi(0),
current_state.bytecode_hash_lo(0)
};
lookup(tmp, "zkevm_bytecode");

// TODO(oclaw): bytecode check is disabled since hash algorithm for circuits is not finalized yet
// https://github.com/NilFoundation/placeholder/issues/205
// lookup(tmp, "zkevm_bytecode");
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ namespace nil {
is_jump * current_state.bytecode_hash_hi(0),
is_jump * current_state.bytecode_hash_lo(0)
};
lookup(tmp, "zkevm_bytecode");
// TODO(oclaw): bytecode check is disabled since hash algorithm for circuits is not finalized yet
// https://github.com/NilFoundation/placeholder/issues/205
// lookup(tmp, "zkevm_bytecode");
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ namespace nil {
current_state.bytecode_hash_lo(1)
};
}
lookup(tmp, "zkevm_bytecode");
// TODO(oclaw): bytecode check is disabled since hash algorithm for circuits is not finalized yet
// https://github.com/NilFoundation/placeholder/issues/205
// lookup(tmp, "zkevm_bytecode");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <nil/blueprint/zkevm/zkevm_word.hpp>
#include <nil/blueprint/zkevm_bbf/types/opcode.hpp>
#include <nil/blueprint/zkevm_bbf/types/rw_operation.hpp>

namespace nil {
namespace blueprint {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,10 @@ namespace nil {
tmp[3] = context_object.relativize(evm_opcode_constraint, -1);
tmp[4] = context_object.relativize(evm_opcode_constraint * all_states[1].bytecode_hash_hi, -1);
tmp[5] = context_object.relativize(evm_opcode_constraint * all_states[1].bytecode_hash_lo, -1);
context_object.relative_lookup(tmp, "zkevm_bytecode", 1, max_zkevm_rows-1);

// TODO(oclaw): bytecode check is disabled since hash algorithm for circuits is not finalized yet
// https://github.com/NilFoundation/placeholder/issues/205
// context_object.relative_lookup(tmp, "zkevm_bytecode", 1, max_zkevm_rows-1);
}
}
protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 50000;
const std::size_t max_zkevm_rows = 25000;

const std::size_t RLC_CHALLENGE = 7; // should be the same between all components

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ const std::string SimpleIncrement = "increment_simple.pb";
INSTANTIATE_TEST_SUITE_P(SimpleRw, ProverTests, ::testing::Values(Input{SimpleIncrement, RW}));
INSTANTIATE_TEST_SUITE_P(SimpleBytecode, ProverTests, ::testing::Values(Input{SimpleIncrement, BYTECODE}));
INSTANTIATE_TEST_SUITE_P(SimpleCopy, ProverTests, ::testing::Values(Input{SimpleIncrement, COPY}));
INSTANTIATE_TEST_SUITE_P(SimpleZkevm, ProverTests, ::testing::Values(Input{SimpleIncrement, ZKEVM, true})); // TODO
INSTANTIATE_TEST_SUITE_P(SimpleZkevm, ProverTests, ::testing::Values(Input{SimpleIncrement, ZKEVM}));

// 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}));
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
INSTANTIATE_TEST_SUITE_P(MultiTxZkevm, ProverTests, ::testing::Values(Input{MultiTxIncrement, ZKEVM}));
Loading