Skip to content

Commit

Permalink
docs: solve TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
johntaiko committed Jul 31, 2023
1 parent 5c23399 commit 07b6c22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions zkevm-circuits/src/evm_circuit/execution/end_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub(crate) struct EndTxGadget<F> {
tx_caller_address: Cell<F>,
gas_fee_refund: UpdateBalanceGadget<F, 2, true>,
sub_gas_price_by_base_fee: AddWordsGadget<F, 2, true>,
add_base_fee_and_tip: AddWordsGadget<F, 2, true>,
add_tip_cap_and_base_fee: AddWordsGadget<F, 2, true>,
mul_effective_tip_by_gas_used: MulWordByU64Gadget<F>,
mul_base_fee_by_gas_used: MulWordByU64Gadget<F>,
coinbase: Cell<F>,
Expand Down Expand Up @@ -116,7 +116,7 @@ impl<F: Field> ExecutionGadget<F> for EndTxGadget<F> {

// check gas_price == min(base_fee + gas_tip_cap, gas_fee_cap)
let base_fee_plus_tip = cb.query_word_rlc();
let add_base_fee_and_tip =
let add_tip_cap_and_base_fee =
AddWordsGadget::construct(cb, [tx_gas_tip_cap, base_fee], base_fee_plus_tip.clone());
let effective_gas_price =
MinMaxWordGadget::construct(cb, &base_fee_plus_tip, &tx_gas_fee_cap).min();
Expand Down Expand Up @@ -229,7 +229,7 @@ impl<F: Field> ExecutionGadget<F> for EndTxGadget<F> {
tx_caller_address,
gas_fee_refund,
sub_gas_price_by_base_fee,
add_base_fee_and_tip,
add_tip_cap_and_base_fee,
mul_effective_tip_by_gas_used,
mul_base_fee_by_gas_used,
coinbase,
Expand Down Expand Up @@ -301,7 +301,7 @@ impl<F: Field> ExecutionGadget<F> for EndTxGadget<F> {
[effective_tip, block.context.base_fee],
tx.gas_price,
)?;
self.add_base_fee_and_tip.assign(
self.add_tip_cap_and_base_fee.assign(
region,
offset,
[tx.gas_tip_cap, block.context.base_fee],
Expand Down
1 change: 0 additions & 1 deletion zkevm-circuits/src/table/tx_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub enum TxFieldTag {
Nonce,
/// Gas
Gas,
// TODO: check in TxCircuit, gas_price == min(base_fee + gas_tip_cap, gas_fee_cap)
/// GasPrice
GasPrice,
/// GasTipCap
Expand Down

0 comments on commit 07b6c22

Please sign in to comment.