diff --git a/zkevm-circuits/src/evm_circuit/param.rs b/zkevm-circuits/src/evm_circuit/param.rs index c06b2a740e5..2b6e7a1bad1 100644 --- a/zkevm-circuits/src/evm_circuit/param.rs +++ b/zkevm-circuits/src/evm_circuit/param.rs @@ -128,8 +128,8 @@ pub(crate) const N_BYTES_BLOCK: usize = N_BYTES_COINBASE pub(crate) const N_BYTES_EXTRA_VALUE: usize = N_BYTES_WORD + N_BYTES_WORD; // Number of bytes that will be used for tx values -pub(crate) const N_BYTES_TX_NONCE: usize = N_BYTES_WORD; -pub(crate) const N_BYTES_TX_GAS_LIMIT: usize = N_BYTES_WORD; // gas limit type is U256, different with gas U64 +pub(crate) const N_BYTES_TX_NONCE: usize = N_BYTES_U64; +pub(crate) const N_BYTES_TX_GAS_LIMIT: usize = N_BYTES_U64; // gas limit type is U256, different with gas U64 pub(crate) const N_BYTES_TX_GASPRICE: usize = N_BYTES_WORD; pub(crate) const N_BYTES_TX_FROM: usize = N_BYTES_ACCOUNT_ADDRESS; pub(crate) const N_BYTES_TX_TO: usize = N_BYTES_ACCOUNT_ADDRESS; diff --git a/zkevm-circuits/src/instance.rs b/zkevm-circuits/src/instance.rs index b7c25860c83..39fd4b71042 100644 --- a/zkevm-circuits/src/instance.rs +++ b/zkevm-circuits/src/instance.rs @@ -40,9 +40,9 @@ pub struct BlockValues { #[derive(Default, Debug, Clone)] pub struct TxValues { /// nonce - pub nonce: Word, + pub nonce: u64, /// gas_limit - pub gas_limit: Word, + pub gas_limit: u64, /// gas_price pub gas_price: Word, /// from_addr @@ -139,9 +139,9 @@ impl PublicData { let mut msg_hash_le = [0u8; 32]; msg_hash_le.copy_from_slice(sign_data.msg_hash.to_bytes().as_slice()); tx_vals.push(TxValues { - nonce: tx.nonce, + nonce: tx.nonce.low_u64(), gas_price: tx.gas_price, - gas_limit: tx.gas_limit, + gas_limit: tx.gas_limit.low_u64(), from_addr: tx.from, to_addr: tx.to.unwrap_or_else(Address::zero), is_create: (tx.to.is_none() as u64),