Skip to content

Commit

Permalink
6860: resolve conflicts after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmon committed Jun 4, 2024
1 parent 3153ceb commit 65367dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1018,45 +1018,7 @@ template <typename FF_> class avm_mainImpl {
{
Avm_DECLARE_VIEWS(88);

<<<<<<< HEAD
auto tmp = (avm_main_sel_internal_return * (avm_main_mem_op_a - FF(1)));
=======
auto tmp = (((avm_main_gas_cost_active -
((((((avm_main_sel_op_fdiv +
((((((((((avm_main_sel_op_add + avm_main_sel_op_sub) + avm_main_sel_op_mul) +
avm_main_sel_op_div) +
avm_main_sel_op_not) +
avm_main_sel_op_eq) +
avm_main_sel_op_lt) +
avm_main_sel_op_lte) +
avm_main_sel_op_shr) +
avm_main_sel_op_shl) +
avm_main_sel_op_cast)) +
((avm_main_sel_op_and + avm_main_sel_op_or) + avm_main_sel_op_xor)) +
(avm_main_sel_cmov + avm_main_sel_mov)) +
((((avm_main_sel_op_radix_le + avm_main_sel_op_sha256) + avm_main_sel_op_poseidon2) +
avm_main_sel_op_keccak) +
avm_main_sel_op_pedersen)) +
(((((((((avm_main_sel_op_sender + avm_main_sel_op_address) + avm_main_sel_op_chain_id) +
avm_main_sel_op_version) +
avm_main_sel_op_block_number) +
avm_main_sel_op_coinbase) +
avm_main_sel_op_timestamp) +
avm_main_sel_op_fee_per_l2_gas) +
avm_main_sel_op_fee_per_da_gas) +
avm_main_sel_op_transaction_fee)) +
((((((((avm_main_sel_op_note_hash_exists + avm_main_sel_op_emit_note_hash) +
avm_main_sel_op_nullifier_exists) +
avm_main_sel_op_emit_nullifier) +
avm_main_sel_op_l1_to_l2_msg_exists) +
avm_main_sel_op_emit_unencrypted_log) +
avm_main_sel_op_emit_l2_to_l1_msg) +
avm_main_sel_op_sload) +
avm_main_sel_op_sstore))) -
(((avm_main_sel_jump + avm_main_sel_jumpi) + avm_main_sel_internal_call) +
avm_main_sel_internal_return)) -
avm_main_mem_op_activate_gas);
>>>>>>> 8c22ccb127 (6860: gas alignments with simulator)
tmp *= scaling_factor;
std::get<88>(evals) += tmp;
}
Expand Down Expand Up @@ -1098,9 +1060,8 @@ template <typename FF_> class avm_mainImpl {
avm_main_sel_op_emit_l2_to_l1_msg) +
avm_main_sel_op_sload) +
avm_main_sel_op_sstore))) -
((((avm_main_sel_jump + avm_main_sel_jumpi) + avm_main_sel_internal_call) +
avm_main_sel_internal_return) +
avm_main_sel_external_call)) -
(((avm_main_sel_jump + avm_main_sel_jumpi) + avm_main_sel_internal_call) +
avm_main_sel_internal_return)) -
avm_main_mem_op_activate_gas);
tmp *= scaling_factor;
std::get<89>(evals) += tmp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ void AvmGasTraceBuilder::constrain_gas_lookup(uint32_t clk, OpCode opcode)

void AvmGasTraceBuilder::constrain_gas_for_external_call(uint32_t clk)
{
// Get the gas prices for this opcode
// Arbitrary constants for the moment
uint32_t l2_gas_cost = 6; // This will be hinted
uint32_t da_gas_cost = 23; // This wil be hinted
uint32_t da_gas_cost = 23; // This will be hinted

remaining_l2_gas -= l2_gas_cost;
remaining_da_gas -= da_gas_cost;
Expand Down

0 comments on commit 65367dc

Please sign in to comment.