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

enable multi-tx bytecode test #201

Merged
merged 1 commit into from
Dec 12, 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 @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ namespace nil {
typename nil::blueprint::bbf::context<BlueprintFieldType, nil::blueprint::bbf::GenerationStage::ASSIGNMENT> 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) {
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 = 10000;
const std::size_t max_zkevm_rows = 50000;

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.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading