From 705622c812728e6d5c0784c0d1ec8a92a71c352d Mon Sep 17 00:00:00 2001 From: Dream Wu Date: Wed, 29 May 2024 21:40:13 +0800 Subject: [PATCH] debug log --- bus-mapping/src/circuit_input_builder/transaction.rs | 12 ++++++++++++ .../src/evm_circuit/util/common_gadget/tx_l1_fee.rs | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index faf795af3c..e853069b59 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -524,6 +524,18 @@ impl TxL1Fee { + self.blob_scalar as u128 * tx_rlp_signed_len as u128 * self.l1_blob_basefee as u128; + log::debug!( + "tx_l1_fee {} commit_scalar {} base_fee {} blob_scalar {} + tx_rlp_signed_len {} l1_blob_basefee {} tx_quient {},reminder {}", + tx_l1_fee, + self.commit_scalar, + self.base_fee, + self.blob_scalar, + tx_rlp_signed_len, + self.l1_blob_basefee, + tx_l1_fee / TX_L1_FEE_PRECISION as u128, + tx_l1_fee % TX_L1_FEE_PRECISION as u128 + ); ( (tx_l1_fee / TX_L1_FEE_PRECISION as u128) as u64, (tx_l1_fee % TX_L1_FEE_PRECISION as u128) as u64, diff --git a/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_fee.rs b/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_fee.rs index 98c5de7f32..f6ea1b23ed 100644 --- a/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_fee.rs +++ b/zkevm-circuits/src/evm_circuit/util/common_gadget/tx_l1_fee.rs @@ -161,6 +161,13 @@ impl TxL1FeeGadget { tx_data_gas_cost: u64, tx_signed_length: u64, ) -> Result<(), Error> { + #[cfg(feature = "l1_fee_curie")] + log::debug!( + "assign: tx_l1_fee {:?} l1_fee_committed {:?} tx_signed_length {}", + l1_fee, + l1_fee_committed, + tx_signed_length + ); let (tx_l1_fee, remainder) = if cfg!(feature = "l1_fee_curie") { l1_fee.tx_l1_fee(tx_data_gas_cost, 0) } else {