Skip to content
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
1 change: 1 addition & 0 deletions barretenberg/cpp/pil/vm2/opcodes/send_l2_to_l1_msg.pil
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ namespace execution; // this is a virtual gadget that shares rows with the execu
public_inputs.cols[2]
};

// Increase num message if error is off. We increase even in the discard case, since discard only implies not writing to public inputs.
#[EMIT_L2_TO_L1_MSG_NUM_L2_TO_L1_MSGS_EMITTED_INCREASE]
sel_execute_send_l2_to_l1_msg * (prev_num_l2_to_l1_messages + (1 - sel_opcode_error) - num_l2_to_l1_messages) = 0;
Comment on lines +69 to 71
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This comment was present for emit_unencrypted.pil, but omitted here. It feels helpful here too.

1 change: 0 additions & 1 deletion barretenberg/cpp/pil/vm2/precomputed.pil
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ pol constant envvar_pi_row_idx;
pol constant is_address;
pol constant is_sender;
pol constant is_transactionfee;
pol constant is_feeperl2gas;
pol constant is_isstaticcall;
pol constant is_l2gasleft;
pol constant is_dagasleft;
Expand Down
1 change: 0 additions & 1 deletion barretenberg/cpp/pil/vm2/trees/nullifier_check.pil
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ namespace nullifier_check;
// Inputs to the gadget
pol commit write;
write * (1 - write) = 0;
pol READ = 1 - write;
// If writing, sel must be on
write * (1 - sel) = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ namespace retrieved_bytecodes_tree_check;
// Inputs to the gadget
pol commit write;
write * (1 - write) = 0;
pol READ = 1 - write;

pol commit class_id;
pol commit root;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ namespace written_public_data_slots_tree_check;
// Inputs to the gadget
pol commit write;
write * (1 - write) = 0;
pol READ = 1 - write;

pol commit slot;
pol commit root;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class AvmFixedVKCommitments {
uint256_t("0x0000000000000000000000000000000000000000000000000000000000000001"),
uint256_t(
"0x0000000000000000000000000000000000000000000000000000000000000002")), // precomputed_is_deployer
Commitment::infinity(), // precomputed_is_feeperl2gas
Commitment(
uint256_t("0x020ad6e43ccd48a6a39e43897cc85187bd364919be8a3b82d4809715cfe489db"),
uint256_t(
Expand Down
10 changes: 5 additions & 5 deletions barretenberg/cpp/src/barretenberg/vm2/generated/columns.hpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@
namespace bb::avm2 {

struct AvmFlavorVariables {
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 124;
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 123;
static constexpr size_t NUM_WITNESS_ENTITIES = 3059;
static constexpr size_t NUM_SHIFTED_ENTITIES = 344;
static constexpr size_t NUM_WIRES = 2593;
static constexpr size_t NUM_ALL_ENTITIES = 3527;
static constexpr size_t NUM_ALL_ENTITIES = 3526;

// Need to be templated for recursive verifier
template <typename FF_>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ struct EmitUnencryptedLogWriteEvent {

bool error_memory_out_of_bounds;
bool error_too_many_log_fields;
bool error_is_static;
bool error_tag_mismatch;

bool operator==(const EmitUnencryptedLogWriteEvent& other) const = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@

namespace bb::avm2::simulation {

struct ContractInstanceNotFoundError : public std::runtime_error {
ContractInstanceNotFoundError(AztecAddress address, const std::string& message)
: std::runtime_error(message)
, address(address)
{}

AztecAddress address;
};

class ContractInstanceManager : public ContractInstanceManagerInterface {
public:
ContractInstanceManager(ContractDBInterface& contract_db,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ void ExecutionTraceBuilder::process(
trace.set(C::execution_sel_read_unwind_call_stack, row, 1);
}
} else if (*exec_opcode == ExecutionOpCode::SSTORE) {
// Equivalent to PIL's (MAX + INITIAL_SIZE - prev_written_public_data_slots_tree_size)
// since prev_size = counter + 1 and INITIAL_SIZE = 1.
uint32_t remaining_data_writes = MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX -
ex_event.before_context_event.tree_states.public_data_tree.counter;

Expand Down
26 changes: 9 additions & 17 deletions yarn-project/constants/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,11 @@ export const MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS = 3000;
export const MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS = 3000;
export const CLASS_REGISTRY_PRIVATE_FUNCTION_BROADCASTED_ADDITIONAL_FIELDS = 23;
export const CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_ADDITIONAL_FIELDS = 14;
export const CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE =
14149211982683198966415397187677099530590983261208050372085833907509n;
export const CONTRACT_CLASS_REGISTRY_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE =
2889881020989534926461066592611988634597302675057895885580456197069n;
export const CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE =
24399338136397901754495080759185489776044879232766421623673792970137n;
export const CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE =
19558544958816189742429223939242700295084178455458336806004020892999n;
export const CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE =
1534834688047131268740281708431107902615560100979874281215533519862n;
export const CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE = 14149211982683198966415397187677099530590983261208050372085833907509n;
export const CONTRACT_CLASS_REGISTRY_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE = 2889881020989534926461066592611988634597302675057895885580456197069n;
export const CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE = 24399338136397901754495080759185489776044879232766421623673792970137n;
export const CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE = 19558544958816189742429223939242700295084178455458336806004020892999n;
export const CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE = 1534834688047131268740281708431107902615560100979874281215533519862n;
export const MAX_PROTOCOL_CONTRACTS = 11;
export const CANONICAL_AUTH_REGISTRY_ADDRESS = 1;
export const CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
Expand All @@ -119,8 +114,7 @@ export const MULTI_CALL_ENTRYPOINT_ADDRESS = 4;
export const FEE_JUICE_ADDRESS = 5;
export const ROUTER_ADDRESS = 6;
export const SIDE_EFFECT_MASKING_ADDRESS = 12;
export const NULL_MSG_SENDER_CONTRACT_ADDRESS =
21888242871839275222246405745257275088548364400416034343698204186575808495616n;
export const NULL_MSG_SENDER_CONTRACT_ADDRESS = 21888242871839275222246405745257275088548364400416034343698204186575808495616n;
export const CONTRACT_CLASS_REGISTRY_BYTECODE_CAPSULE_SLOT = 79025834455612;
export const FEE_JUICE_BALANCES_SLOT = 1;
export const UPDATED_CLASS_IDS_SLOT = 1;
Expand Down Expand Up @@ -485,12 +479,10 @@ export const PROOF_TYPE_HN_TAIL = 8;
export const PROOF_TYPE_CHONK = 9;
export const TWO_POW_64 = 18446744073709551616n;
export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_HEIGHT = 6;
export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT =
18291678969210913367302010540259942201271604198321103848479209155223586227821n;
export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_ROOT = 18291678969210913367302010540259942201271604198321103848479209155223586227821n;
export const AVM_WRITTEN_PUBLIC_DATA_SLOTS_TREE_INITIAL_SIZE = 1;
export const AVM_RETRIEVED_BYTECODES_TREE_HEIGHT = 5;
export const AVM_RETRIEVED_BYTECODES_TREE_INITIAL_ROOT =
7257575663883662864904159007845791361042428565864275462740313586853981161757n;
export const AVM_RETRIEVED_BYTECODES_TREE_INITIAL_ROOT = 7257575663883662864904159007845791361042428565864275462740313586853981161757n;
export const AVM_RETRIEVED_BYTECODES_TREE_INITIAL_SIZE = 1;
export const TIMESTAMP_OF_CHANGE_BIT_SIZE = 32;
export const DEFAULT_UPDATE_DELAY = 86400;
Expand Down Expand Up @@ -542,4 +534,4 @@ export enum GeneratorIndex {
SECRET_HASH = 20,
TX_NULLIFIER = 32,
SIGNATURE_PAYLOAD = 34,
}
}
Loading