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

chore!: remove delegate call and "storage address" from public #8377

Closed
wants to merge 4 commits into from
Closed
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
4 changes: 0 additions & 4 deletions avm-transpiler/src/opcodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub enum AvmOpcode {
CAST,
// Execution environment
ADDRESS,
STORAGEADDRESS,
SENDER,
FUNCTIONSELECTOR,
TRANSACTIONFEE,
Expand Down Expand Up @@ -62,7 +61,6 @@ pub enum AvmOpcode {
// External calls
CALL,
STATICCALL,
DELEGATECALL,
RETURN,
REVERT,
// Misc
Expand Down Expand Up @@ -108,7 +106,6 @@ impl AvmOpcode {

// Execution Environment
AvmOpcode::ADDRESS => "ADDRESS",
AvmOpcode::STORAGEADDRESS => "STORAGEADDRESS",
AvmOpcode::SENDER => "SENDER",
AvmOpcode::FUNCTIONSELECTOR => "FUNCTIONSELECTOR",
AvmOpcode::TRANSACTIONFEE => "TRANSACTIONFEE",
Expand Down Expand Up @@ -157,7 +154,6 @@ impl AvmOpcode {
// Control Flow - Contract Calls
AvmOpcode::CALL => "CALL",
AvmOpcode::STATICCALL => "STATICCALL",
AvmOpcode::DELEGATECALL => "DELEGATECALL",
AvmOpcode::RETURN => "RETURN",
AvmOpcode::REVERT => "REVERT",

Expand Down
3 changes: 1 addition & 2 deletions avm-transpiler/src/transpile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ fn handle_send_l2_to_l1_msg(
/// This includes:
/// - Global variables
/// - Caller
/// - storage address
/// - Address
/// - ...
fn handle_getter_instruction(
avm_instrs: &mut Vec<AvmInstruction>,
Expand All @@ -639,7 +639,6 @@ fn handle_getter_instruction(

let opcode = match function {
"avmOpcodeAddress" => AvmOpcode::ADDRESS,
"avmOpcodeStorageAddress" => AvmOpcode::STORAGEADDRESS,
"avmOpcodeSender" => AvmOpcode::SENDER,
"avmOpcodeFeePerL2Gas" => AvmOpcode::FEEPERL2GAS,
"avmOpcodeFeePerDaGas" => AvmOpcode::FEEPERDAGAS,
Expand Down
1 change: 0 additions & 1 deletion barretenberg/cpp/pil/avm/constants_gen.pil
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace constants(256);
pol MAX_UNENCRYPTED_LOGS_PER_CALL = 4;
pol SENDER_SELECTOR = 0;
pol ADDRESS_SELECTOR = 1;
pol STORAGE_ADDRESS_SELECTOR = 1;
pol FUNCTION_SELECTOR_SELECTOR = 2;
pol START_GLOBAL_VARIABLES = 29;
pol CHAIN_ID_SELECTOR = 29;
Expand Down
5 changes: 1 addition & 4 deletions barretenberg/cpp/pil/avm/kernel.pil
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ namespace main(256);
#[ADDRESS_KERNEL]
sel_op_address * (kernel_in_offset - constants.ADDRESS_SELECTOR) = 0;

#[STORAGE_ADDRESS_KERNEL]
sel_op_storage_address * (kernel_in_offset - constants.STORAGE_ADDRESS_SELECTOR) = 0;

#[SENDER_KERNEL]
sel_op_sender * (kernel_in_offset - constants.SENDER_SELECTOR) = 0;

Expand Down Expand Up @@ -168,7 +165,7 @@ namespace main(256);
KERNEL_OUTPUT_SELECTORS * (side_effect_counter' - (side_effect_counter + 1)) = 0;

//===== LOOKUPS INTO THE PUBLIC INPUTS ===========================================
pol KERNEL_INPUT_SELECTORS = sel_op_address + sel_op_storage_address + sel_op_sender
pol KERNEL_INPUT_SELECTORS = sel_op_address + sel_op_sender
+ sel_op_function_selector + sel_op_transaction_fee + sel_op_chain_id
+ sel_op_version + sel_op_block_number + sel_op_coinbase + sel_op_timestamp
+ sel_op_fee_per_l2_gas + sel_op_fee_per_da_gas;
Expand Down
2 changes: 0 additions & 2 deletions barretenberg/cpp/pil/avm/main.pil
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ namespace main(256);

// CONTEXT - ENVIRONMENT
pol commit sel_op_address;
pol commit sel_op_storage_address;
pol commit sel_op_sender;
pol commit sel_op_function_selector;
pol commit sel_op_transaction_fee;
Expand Down Expand Up @@ -217,7 +216,6 @@ namespace main(256);
// TODO: Very likely, we can remove these constraints as the selectors should be derived during
// opcode decomposition.
sel_op_address * (1 - sel_op_address) = 0;
sel_op_storage_address * (1 - sel_op_storage_address) = 0;
sel_op_sender * (1 - sel_op_sender) = 0;
sel_op_function_selector * (1 - sel_op_function_selector) = 0;
sel_op_transaction_fee * (1 - sel_op_transaction_fee) = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ AvmCircuitBuilder::ProverPolynomials AvmCircuitBuilder::compute_polynomials() co
polys.main_sel_op_shr[i] = rows[i].main_sel_op_shr;
polys.main_sel_op_sload[i] = rows[i].main_sel_op_sload;
polys.main_sel_op_sstore[i] = rows[i].main_sel_op_sstore;
polys.main_sel_op_storage_address[i] = rows[i].main_sel_op_storage_address;
polys.main_sel_op_sub[i] = rows[i].main_sel_op_sub;
polys.main_sel_op_timestamp[i] = rows[i].main_sel_op_timestamp;
polys.main_sel_op_transaction_fee[i] = rows[i].main_sel_op_transaction_fee;
Expand Down
Loading
Loading