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

feat: bytecode hashing init #8535

Merged
merged 4 commits into from
Oct 25, 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
13 changes: 13 additions & 0 deletions barretenberg/cpp/pil/avm/bytecode.pil
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace bytecode(256);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a placeholder for now


pol commit packed;
pol commit length_remaining;
pol commit running_hash;

pol commit end_latch;

// TODO: Come back to this;
// pol commit class_id;
// pol commit contract_address;


1 change: 1 addition & 0 deletions barretenberg/cpp/pil/avm/constants_gen.pil
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace constants(256);
pol MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_CALL = 16;
pol MAX_L1_TO_L2_MSG_READ_REQUESTS_PER_CALL = 16;
pol MAX_UNENCRYPTED_LOGS_PER_CALL = 4;
pol MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 3000;
pol MEM_TAG_FF = 0;
pol MEM_TAG_U1 = 1;
pol MEM_TAG_U8 = 2;
Expand Down
1 change: 1 addition & 0 deletions barretenberg/cpp/pil/avm/main.pil
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include "constants_gen.pil";
include "constants_misc.pil";
include "gas.pil";
include "kernel.pil";
include "bytecode.pil";
include "fixed/powers.pil";
include "gadgets/conversion.pil";
include "gadgets/sha256.pil";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ template class ExecutionTrace_<MegaFlavor>;
template class ExecutionTrace_<plonk::flavor::Standard>;
template class ExecutionTrace_<plonk::flavor::Ultra>;

} // namespace bb
} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co
polys.binary_op_id.set_if_valid_index(i, rows[i].binary_op_id);
polys.binary_sel_bin.set_if_valid_index(i, rows[i].binary_sel_bin);
polys.binary_start.set_if_valid_index(i, rows[i].binary_start);
polys.bytecode_end_latch.set_if_valid_index(i, rows[i].bytecode_end_latch);
polys.bytecode_length_remaining.set_if_valid_index(i, rows[i].bytecode_length_remaining);
polys.bytecode_packed.set_if_valid_index(i, rows[i].bytecode_packed);
polys.bytecode_running_hash.set_if_valid_index(i, rows[i].bytecode_running_hash);
polys.cmp_a_hi.set_if_valid_index(i, rows[i].cmp_a_hi);
polys.cmp_a_lo.set_if_valid_index(i, rows[i].cmp_a_lo);
polys.cmp_b_hi.set_if_valid_index(i, rows[i].cmp_b_hi);
Expand Down
Loading
Loading