From 4da9a362b1e89e70834e856808153b6725be3b2c Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 31 Jul 2023 10:40:05 +0000 Subject: [PATCH 01/55] feat: BeginTx and EndTx support taiko's 1559 --- bus-mapping/src/circuit_input_builder.rs | 6 ++ .../src/circuit_input_builder/block.rs | 5 ++ .../protocol_instance.rs | 44 +--------- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 19 +++++ bus-mapping/src/mock.rs | 1 + .../src/integration_test_circuits.rs | 4 +- integration-tests/src/lib.rs | 1 + zkevm-circuits/src/anchor_tx_circuit.rs | 3 +- zkevm-circuits/src/anchor_tx_circuit/dev.rs | 3 +- .../src/evm_circuit/execution/begin_tx.rs | 27 +++--- .../src/evm_circuit/execution/end_tx.rs | 82 +++++++++++++++---- zkevm-circuits/src/table/pi_table.rs | 11 +-- zkevm-circuits/src/table/tx_table.rs | 4 + zkevm-circuits/src/taiko_pi_circuit.rs | 2 +- zkevm-circuits/src/taiko_super_circuit.rs | 4 +- .../src/taiko_super_circuit/test.rs | 5 +- zkevm-circuits/src/witness.rs | 4 +- zkevm-circuits/src/witness/block.rs | 62 ++++++++++++-- zkevm-circuits/src/witness/tx.rs | 22 +++++ 19 files changed, 216 insertions(+), 93 deletions(-) rename {zkevm-circuits/src/witness => bus-mapping/src/circuit_input_builder}/protocol_instance.rs (75%) diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 0b4c0ae3a8..f94fa3f263 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -6,6 +6,7 @@ mod block; mod call; mod execution; mod input_state_ref; +mod protocol_instance; #[cfg(test)] mod tracer_tests; mod transaction; @@ -34,6 +35,7 @@ pub use execution::{ pub use input_state_ref::CircuitInputStateRef; use itertools::Itertools; use log::warn; +pub use protocol_instance::{left_shift, MetaHash, ProtocolInstance, ANCHOR_TX_METHOD_SIGNATURE}; use std::collections::HashMap; pub use transaction::{Transaction, TransactionContext}; @@ -409,6 +411,7 @@ pub struct BuilderClient { cli: GethClient

, chain_id: Word, circuits_params: CircuitsParams, + protocol_instance: ProtocolInstance, } /// Get State Accesses from TxExecTraces @@ -468,6 +471,7 @@ impl BuilderClient

{ pub async fn new( client: GethClient

, circuits_params: CircuitsParams, + protocol_instance: ProtocolInstance, ) -> Result { let chain_id = client.get_chain_id().await?; @@ -475,6 +479,7 @@ impl BuilderClient

{ cli: client, chain_id: chain_id.into(), circuits_params, + protocol_instance, }) } @@ -615,6 +620,7 @@ impl BuilderClient

{ prev_state_root, eth_block, self.circuits_params, + self.protocol_instance.clone(), )?; let mut builder = CircuitInputBuilder::new(sdb, code_db, block); builder.handle_block_with_anchor(eth_block, geth_traces, has_anchor_tx)?; diff --git a/bus-mapping/src/circuit_input_builder/block.rs b/bus-mapping/src/circuit_input_builder/block.rs index 650c7344bc..85ba424e8f 100644 --- a/bus-mapping/src/circuit_input_builder/block.rs +++ b/bus-mapping/src/circuit_input_builder/block.rs @@ -2,6 +2,7 @@ use super::{ execution::ExecState, transaction::Transaction, CircuitsParams, CopyEvent, ExecStep, ExpEvent, + ProtocolInstance, }; use crate::{ operation::{OperationContainer, RWCounter}, @@ -90,6 +91,8 @@ pub struct Block { pub circuits_params: CircuitsParams, /// Original block from geth pub eth_block: eth_types::Block, + /// Protocol instance from protocol + pub protocol_instance: ProtocolInstance, } impl Block { @@ -100,6 +103,7 @@ impl Block { prev_state_root: Word, eth_block: ð_types::Block, circuits_params: CircuitsParams, + protocol_instance: ProtocolInstance, ) -> Result { if eth_block.base_fee_per_gas.is_none() { // FIXME: resolve this once we have proper EIP-1559 support @@ -141,6 +145,7 @@ impl Block { sha3_inputs: Vec::new(), circuits_params, eth_block: eth_block.clone(), + protocol_instance, }) } diff --git a/zkevm-circuits/src/witness/protocol_instance.rs b/bus-mapping/src/circuit_input_builder/protocol_instance.rs similarity index 75% rename from zkevm-circuits/src/witness/protocol_instance.rs rename to bus-mapping/src/circuit_input_builder/protocol_instance.rs index c2b385859b..4feb3242f4 100644 --- a/zkevm-circuits/src/witness/protocol_instance.rs +++ b/bus-mapping/src/circuit_input_builder/protocol_instance.rs @@ -2,13 +2,11 @@ use std::iter; -use crate::{table::PiFieldTag, util::rlc_be_bytes}; -use eth_types::{Address, Bytes, Field, Hash, ToBigEndian, ToWord, Word, H256}; -use halo2_proofs::circuit::Value; +use eth_types::{Address, Bytes, Hash, ToBigEndian, ToWord, Word, H256}; use keccak256::plain::Keccak; -// hash(anchor) -const ANCHOR_TX_METHOD_SIGNATURE: u32 = 0xda69d3db; +/// hash(anchor) +pub const ANCHOR_TX_METHOD_SIGNATURE: u32 = 0xda69d3db; /// Taiko witness #[derive(Debug, Default, Clone)] @@ -129,42 +127,6 @@ impl ProtocolInstance { result.extend_from_slice(&(self.parent_gas_used as u64).to_word().to_be_bytes()); result.into() } - - /// Assignments for pi table - pub fn table_assignments(&self, randomness: Value) -> [[Value; 2]; 6] { - [ - [ - Value::known(F::from(PiFieldTag::Null as u64)), - Value::known(F::ZERO), - ], - [ - Value::known(F::from(PiFieldTag::MethodSign as u64)), - Value::known(F::from(ANCHOR_TX_METHOD_SIGNATURE as u64)), - ], - [ - Value::known(F::from(PiFieldTag::L1Hash as u64)), - rlc_be_bytes(&self.meta_hash.l1_hash.to_fixed_bytes(), randomness), - ], - [ - Value::known(F::from(PiFieldTag::L1SignalRoot as u64)), - rlc_be_bytes(&self.signal_root.to_fixed_bytes(), randomness), - ], - [ - Value::known(F::from(PiFieldTag::L1Height as u64)), - rlc_be_bytes( - &self.meta_hash.l1_height.to_word().to_be_bytes(), - randomness, - ), - ], - [ - Value::known(F::from(PiFieldTag::ParentGasUsed as u64)), - rlc_be_bytes( - &(self.parent_gas_used as u64).to_word().to_be_bytes(), - randomness, - ), - ], - ] - } } #[cfg(test)] diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index ba899d6ca0..597f09ae62 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -281,6 +281,25 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result coinbase_balance_prev, )?; + // add treasury account + let (found, treasury_account) = state + .sdb + .get_account(&state.block.protocol_instance.meta_hash.treasury); + if !found { + return Err(Error::AccountNotFound( + state.block.protocol_instance.meta_hash.treasury, + )); + } + let treasury_balance_prev = treasury_account.balance; + let treasury_balance = + treasury_balance_prev + state.block.base_fee * (state.tx.gas() - exec_step.gas_left.0); + state.account_write( + &mut exec_step, + state.block.coinbase, + AccountField::Balance, + treasury_balance, + treasury_balance_prev, + )?; // handle tx receipt tag state.tx_receipt_write( &mut exec_step, diff --git a/bus-mapping/src/mock.rs b/bus-mapping/src/mock.rs index 57ecae2475..8997a1a12f 100644 --- a/bus-mapping/src/mock.rs +++ b/bus-mapping/src/mock.rs @@ -40,6 +40,7 @@ impl BlockData { Word::default(), &self.eth_block, self.circuits_params, + Default::default(), ) .unwrap(), ) diff --git a/integration-tests/src/integration_test_circuits.rs b/integration-tests/src/integration_test_circuits.rs index 93ea7d1540..9d55758fbe 100644 --- a/integration-tests/src/integration_test_circuits.rs +++ b/integration-tests/src/integration_test_circuits.rs @@ -334,7 +334,9 @@ async fn gen_inputs( eth_types::Block, ) { let cli = get_client(); - let cli = BuilderClient::new(cli, CIRCUITS_PARAMS).await.unwrap(); + let cli = BuilderClient::new(cli, CIRCUITS_PARAMS, Default::default()) + .await + .unwrap(); cli.gen_inputs(block_num).await.unwrap() } diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 673c2ad2fa..8a814a1492 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -163,6 +163,7 @@ pub async fn build_circuit_input_builder_block(block_num: u64) { max_exp_steps: 1000, max_keccak_rows: 0, }, + Default::default(), ) .await .unwrap(); diff --git a/zkevm-circuits/src/anchor_tx_circuit.rs b/zkevm-circuits/src/anchor_tx_circuit.rs index c2c7f3e187..dde4015e5e 100644 --- a/zkevm-circuits/src/anchor_tx_circuit.rs +++ b/zkevm-circuits/src/anchor_tx_circuit.rs @@ -15,8 +15,9 @@ use crate::{ table::{byte_table::ByteTable, LookupTable, PiFieldTag, PiTable, TxFieldTag, TxTable}, tx_circuit::TX_LEN, util::{Challenges, SubCircuit, SubCircuitConfig}, - witness::{self, ProtocolInstance, Transaction}, + witness::{self, Transaction}, }; +use bus_mapping::circuit_input_builder::ProtocolInstance; use eth_types::{Field, ToScalar}; use gadgets::util::{select, Expr}; use halo2_proofs::{ diff --git a/zkevm-circuits/src/anchor_tx_circuit/dev.rs b/zkevm-circuits/src/anchor_tx_circuit/dev.rs index 3bcb061faa..4125783faa 100644 --- a/zkevm-circuits/src/anchor_tx_circuit/dev.rs +++ b/zkevm-circuits/src/anchor_tx_circuit/dev.rs @@ -3,8 +3,9 @@ use crate::{ anchor_tx_circuit::{AnchorTxCircuitConfig, AnchorTxCircuitConfigArgs}, table::{byte_table::ByteTable, PiTable, TxTable}, util::{Challenges, SubCircuit, SubCircuitConfig}, - witness::{self, ProtocolInstance}, + witness, }; +use bus_mapping::circuit_input_builder::ProtocolInstance; use eth_types::{Field, H256}; use halo2_proofs::{ circuit::{Layouter, SimpleFloorPlanner}, diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 39c404ce50..448f4dd7b6 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -59,6 +59,9 @@ impl ExecutionGadget for BeginTxGadget { const EXECUTION_STATE: ExecutionState = ExecutionState::BeginTx; fn configure(cb: &mut EVMConstraintBuilder) -> Self { + // additions for taiko's eip-1559 + // 1. no need update GOLDEN_TOUCH account for Anchor + // Use rw_counter of the step which triggers next call as its call_id. let call_id = cb.curr.state.rw_counter.clone(); @@ -177,17 +180,21 @@ impl ExecutionGadget for BeginTxGadget { ); // rwc_delta += 1 }); + let is_first_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); + // Transfer value from caller to callee, creating account if necessary. - let transfer_with_gas_fee = TransferWithGasFeeGadget::construct( - cb, - tx_caller_address.expr(), - tx_callee_address.expr(), - not::expr(callee_not_exists.expr()), - or::expr([tx_is_create.expr(), callee_not_exists.expr()]), - tx_value.clone(), - mul_gas_fee_by_gas.product().clone(), - &mut reversion_info, - ); + let transfer_with_gas_fee = cb.condition(1.expr() - is_first_tx.expr(), |cb| { + TransferWithGasFeeGadget::construct( + cb, + tx_caller_address.expr(), + tx_callee_address.expr(), + not::expr(callee_not_exists.expr()), + or::expr([tx_is_create.expr(), callee_not_exists.expr()]), + tx_value.clone(), + mul_gas_fee_by_gas.product().clone(), + &mut reversion_info, + ) + }); let caller_nonce_hash_bytes = array_init::array_init(|_| cb.query_byte()); let create = ContractCreateGadget::construct(cb); diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 5461f36ffc..f1afd0658d 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -37,8 +37,11 @@ pub(crate) struct EndTxGadget { gas_fee_refund: UpdateBalanceGadget, sub_gas_price_by_base_fee: AddWordsGadget, mul_effective_tip_by_gas_used: MulWordByU64Gadget, + mul_base_fee_by_gas_used: MulWordByU64Gadget, coinbase: Cell, coinbase_reward: UpdateBalanceGadget, + treasury: Cell, + treasury_reward: UpdateBalanceGadget, current_cumulative_gas_used: Cell, is_first_tx: IsEqualGadget, is_persistent: Cell, @@ -50,6 +53,12 @@ impl ExecutionGadget for EndTxGadget { const EXECUTION_STATE: ExecutionState = ExecutionState::EndTx; fn configure(cb: &mut EVMConstraintBuilder) -> Self { + // additions for taiko's eip-1559: + // 1. effective_gas_price = min(gas_tip_cap + base_fee, gas_fee_cap) + // a. gas_price == effective_gas_price + // 2. no need update GOLDEN_TOUCH account in Anchor(-effective_gas_price, +refund) + // 3. Anchor's gas_tip_cap == 0 + let tx_id = cb.call_context(None, CallContextFieldTag::TxId); let is_persistent = cb.call_context(None, CallContextFieldTag::IsPersistent); @@ -58,6 +67,8 @@ impl ExecutionGadget for EndTxGadget { .map(|field_tag| cb.tx_context(tx_id.expr(), field_tag, None)); let tx_gas_price = cb.tx_context_as_word(tx_id.expr(), TxContextFieldTag::GasPrice, None); + let is_first_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); + // Calculate effective gas to refund let gas_used = tx_gas.expr() - cb.curr.state.gas_left.expr(); let max_refund = ConstantDivisionGadget::construct( @@ -75,12 +86,6 @@ impl ExecutionGadget for EndTxGadget { tx_gas_price.clone(), effective_refund.min() + cb.curr.state.gas_left.expr(), ); - let gas_fee_refund = UpdateBalanceGadget::construct( - cb, - tx_caller_address.expr(), - vec![mul_gas_price_by_refund.product().clone()], - None, - ); // Add gas_used * effective_tip to coinbase's balance let coinbase = cb.query_cell(); @@ -93,16 +98,38 @@ impl ExecutionGadget for EndTxGadget { } let effective_tip = cb.query_word_rlc(); let sub_gas_price_by_base_fee = - AddWordsGadget::construct(cb, [effective_tip.clone(), base_fee], tx_gas_price); + AddWordsGadget::construct(cb, [effective_tip.clone(), base_fee.clone()], tx_gas_price); let mul_effective_tip_by_gas_used = MulWordByU64Gadget::construct(cb, effective_tip, gas_used.clone()); - let coinbase_reward = UpdateBalanceGadget::construct( - cb, - coinbase.expr(), - vec![mul_effective_tip_by_gas_used.product().clone()], - None, - ); + let mul_base_fee_by_gas_used = + MulWordByU64Gadget::construct(cb, base_fee, gas_used.clone()); + + // send base fee to treasury account + let treasury = cb.query_cell(); + let (gas_fee_refund, coinbase_reward, treasury_reward) = + cb.condition(1.expr() - is_first_tx.expr(), |cb| { + ( + UpdateBalanceGadget::construct( + cb, + tx_caller_address.expr(), + vec![mul_gas_price_by_refund.product().clone()], + None, + ), + UpdateBalanceGadget::construct( + cb, + coinbase.expr(), + vec![mul_effective_tip_by_gas_used.product().clone()], + None, + ), + UpdateBalanceGadget::construct( + cb, + treasury.expr(), + vec![mul_base_fee_by_gas_used.product().clone()], + None, + ), + ) + }); // constrain tx receipt fields cb.tx_receipt_lookup( 1.expr(), @@ -117,8 +144,6 @@ impl ExecutionGadget for EndTxGadget { cb.curr.state.log_id.expr(), ); - let is_first_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); - let current_cumulative_gas_used = cb.query_cell(); cb.condition(is_first_tx.expr(), |cb| { cb.require_zero( @@ -184,8 +209,11 @@ impl ExecutionGadget for EndTxGadget { gas_fee_refund, sub_gas_price_by_base_fee, mul_effective_tip_by_gas_used, + mul_base_fee_by_gas_used, coinbase, coinbase_reward, + treasury, + treasury_reward, current_cumulative_gas_used, is_first_tx, is_persistent, @@ -203,8 +231,8 @@ impl ExecutionGadget for EndTxGadget { ) -> Result<(), Error> { let gas_used = tx.gas - step.gas_left.0; let (refund, _) = block.get_rws(step, 2).tx_refund_value_pair(); - let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev)] = - [3, 4].map(|index| block.get_rws(step, index).account_value_pair()); + let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev), (treasury_balance, treasury_balance_prev)] = + [3, 4, 5].map(|index| block.get_rws(step, index).account_value_pair()); self.tx_id .assign(region, offset, Value::known(F::from(tx.id as u64)))?; @@ -276,7 +304,25 @@ impl ExecutionGadget for EndTxGadget { vec![effective_tip * gas_used], coinbase_balance, )?; - + self.treasury.assign( + region, + offset, + Value::known( + block + .protocol_instance + .meta_hash + .treasury + .to_scalar() + .expect("unexpected Address -> Scalar conversion failure"), + ), + )?; + self.treasury_reward.assign( + region, + offset, + treasury_balance_prev, + vec![block.context.base_fee * gas_used], + treasury_balance, + )?; let current_cumulative_gas_used: u64 = if tx.id == 1 { 0 } else { diff --git a/zkevm-circuits/src/table/pi_table.rs b/zkevm-circuits/src/table/pi_table.rs index b772160eb9..15f8ef1e30 100644 --- a/zkevm-circuits/src/table/pi_table.rs +++ b/zkevm-circuits/src/table/pi_table.rs @@ -1,4 +1,5 @@ -use crate::witness::ProtocolInstance; +use crate::witness::protocol_instance_table_assignments; +use bus_mapping::circuit_input_builder::ProtocolInstance; use super::*; @@ -40,10 +41,10 @@ impl PiTable { || "pi table", |mut region| { let randomness = challenges.evm_word(); - for (offset, [tag, value]) in protocol_instance - .table_assignments(randomness) - .into_iter() - .enumerate() + for (offset, [tag, value]) in + protocol_instance_table_assignments(protocol_instance, randomness) + .into_iter() + .enumerate() { region.assign_fixed(|| "tag", self.tag, offset, || tag)?; region.assign_advice(|| "value", self.value, offset, || value)?; diff --git a/zkevm-circuits/src/table/tx_table.rs b/zkevm-circuits/src/table/tx_table.rs index 9d7cb74c91..5ec120fbee 100644 --- a/zkevm-circuits/src/table/tx_table.rs +++ b/zkevm-circuits/src/table/tx_table.rs @@ -12,6 +12,10 @@ pub enum TxFieldTag { Gas, /// GasPrice GasPrice, + /// GasTipCap + GasTipCap, + /// GasFeeCap + GasFeeCap, /// CallerAddress CallerAddress, /// CalleeAddress diff --git a/zkevm-circuits/src/taiko_pi_circuit.rs b/zkevm-circuits/src/taiko_pi_circuit.rs index 125e35c1ff..a52300e8f0 100644 --- a/zkevm-circuits/src/taiko_pi_circuit.rs +++ b/zkevm-circuits/src/taiko_pi_circuit.rs @@ -121,7 +121,7 @@ impl PublicData { /// create PublicData from block and taiko pub fn new(block: &witness::Block) -> Self { - use witness::left_shift; + use bus_mapping::circuit_input_builder::left_shift; let field9 = left_shift(block.protocol_instance.prover, 96) + left_shift(block.protocol_instance.parent_gas_used as u64, 64) + left_shift(block.protocol_instance.gas_used as u64, 32); diff --git a/zkevm-circuits/src/taiko_super_circuit.rs b/zkevm-circuits/src/taiko_super_circuit.rs index 650700be56..cda3f42f38 100644 --- a/zkevm-circuits/src/taiko_super_circuit.rs +++ b/zkevm-circuits/src/taiko_super_circuit.rs @@ -9,10 +9,10 @@ use crate::{ table::{byte_table::ByteTable, BlockTable, KeccakTable, PiTable, TxTable}, taiko_pi_circuit::{TaikoPiCircuit, TaikoPiCircuitConfig, TaikoPiCircuitConfigArgs}, util::{log2_ceil, Challenges, SubCircuit, SubCircuitConfig}, - witness::{block_convert, Block, ProtocolInstance}, + witness::{block_convert, Block}, }; use bus_mapping::{ - circuit_input_builder::{CircuitInputBuilder, CircuitsParams}, + circuit_input_builder::{CircuitInputBuilder, CircuitsParams, ProtocolInstance}, mock::BlockData, }; use eth_types::{geth_types::GethData, Field}; diff --git a/zkevm-circuits/src/taiko_super_circuit/test.rs b/zkevm-circuits/src/taiko_super_circuit/test.rs index db1583294d..6b93af79bd 100644 --- a/zkevm-circuits/src/taiko_super_circuit/test.rs +++ b/zkevm-circuits/src/taiko_super_circuit/test.rs @@ -1,9 +1,6 @@ #![allow(unused_imports)] pub use super::*; -use crate::{ - anchor_tx_circuit::{add_anchor_accounts, add_anchor_tx, sign_tx}, - witness::MetaHash, -}; +use crate::anchor_tx_circuit::{add_anchor_accounts, add_anchor_tx, sign_tx}; use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; use log::error; diff --git a/zkevm-circuits/src/witness.rs b/zkevm-circuits/src/witness.rs index 5874e6bad2..850979549f 100644 --- a/zkevm-circuits/src/witness.rs +++ b/zkevm-circuits/src/witness.rs @@ -3,7 +3,7 @@ //! used to generate witnesses for circuits. mod block; -pub use block::{block_convert, Block, BlockContext}; +pub use block::{block_convert, protocol_instance_table_assignments, Block, BlockContext}; mod bytecode; pub use bytecode::Bytecode; mod mpt; @@ -14,5 +14,3 @@ pub use rw::{Rw, RwMap, RwRow}; mod tx; pub use bus_mapping::circuit_input_builder::Call; pub use tx::Transaction; -mod protocol_instance; -pub use protocol_instance::{left_shift, MetaHash, ProtocolInstance}; diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index 73c4e99c57..4d8d38e2f3 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -3,17 +3,19 @@ use std::collections::HashMap; use crate::{ evm_circuit::{detect_fixed_table_tags, util::rlc, EvmCircuit}, exp_circuit::param::OFFSET_INCREMENT, - table::BlockContextFieldTag, - util::{log2_ceil, SubCircuit}, + table::{BlockContextFieldTag, PiFieldTag}, + util::{log2_ceil, rlc_be_bytes, SubCircuit}, }; use bus_mapping::{ - circuit_input_builder::{self, CircuitsParams, CopyEvent, ExpEvent}, + circuit_input_builder::{ + self, CircuitsParams, CopyEvent, ExpEvent, ProtocolInstance, ANCHOR_TX_METHOD_SIGNATURE, + }, Error, }; -use eth_types::{Address, Field, ToLittleEndian, ToScalar, ToWord, Word}; +use eth_types::{Address, Field, ToBigEndian, ToLittleEndian, ToScalar, ToWord, Word}; use halo2_proofs::circuit::Value; -use super::{tx::tx_convert, Bytecode, ExecStep, ProtocolInstance, Rw, RwMap, Transaction}; +use super::{tx::tx_convert, Bytecode, ExecStep, Rw, RwMap, Transaction}; // TODO: Remove fields that are duplicated in`eth_block` /// Block is the struct used by all circuits, which contains all the needed @@ -55,6 +57,54 @@ pub struct Block { pub protocol_instance: ProtocolInstance, } +/// Assignments for pi table +pub fn protocol_instance_table_assignments( + protocol_instance: &ProtocolInstance, + randomness: Value, +) -> [[Value; 2]; 6] { + [ + [ + Value::known(F::from(PiFieldTag::Null as u64)), + Value::known(F::ZERO), + ], + [ + Value::known(F::from(PiFieldTag::MethodSign as u64)), + Value::known(F::from(ANCHOR_TX_METHOD_SIGNATURE as u64)), + ], + [ + Value::known(F::from(PiFieldTag::L1Hash as u64)), + rlc_be_bytes( + &protocol_instance.meta_hash.l1_hash.to_fixed_bytes(), + randomness, + ), + ], + [ + Value::known(F::from(PiFieldTag::L1SignalRoot as u64)), + rlc_be_bytes(&protocol_instance.signal_root.to_fixed_bytes(), randomness), + ], + [ + Value::known(F::from(PiFieldTag::L1Height as u64)), + rlc_be_bytes( + &protocol_instance + .meta_hash + .l1_height + .to_word() + .to_be_bytes(), + randomness, + ), + ], + [ + Value::known(F::from(PiFieldTag::ParentGasUsed as u64)), + rlc_be_bytes( + &(protocol_instance.parent_gas_used as u64) + .to_word() + .to_be_bytes(), + randomness, + ), + ], + ] +} + impl Block { /// Get a read-write record pub(crate) fn get_rws(&self, step: &ExecStep, index: usize) -> Rw { @@ -269,6 +319,6 @@ pub fn block_convert( // keccak_inputs: circuit_input_builder::keccak_inputs(block, code_db)?, keccak_inputs: block.sha3_inputs.clone(), eth_block: block.eth_block.clone(), - protocol_instance: ProtocolInstance::default(), + protocol_instance: block.protocol_instance.clone(), }) } diff --git a/zkevm-circuits/src/witness/tx.rs b/zkevm-circuits/src/witness/tx.rs index 80780aa94b..13f9b0d46c 100644 --- a/zkevm-circuits/src/witness/tx.rs +++ b/zkevm-circuits/src/witness/tx.rs @@ -23,6 +23,10 @@ pub struct Transaction { pub gas: u64, /// The gas price pub gas_price: Word, + /// The gas tip cap + pub gas_tip_cap: Word, + /// The gas fee cap + pub gas_fee_cap: Word, /// The caller address pub caller_address: Address, /// The callee address @@ -79,6 +83,22 @@ impl Transaction { .evm_word() .map(|challenge| rlc::value(&self.gas_price.to_le_bytes(), challenge)), ], + [ + Value::known(F::from(self.id as u64)), + Value::known(F::from(TxContextFieldTag::GasTipCap as u64)), + Value::known(F::ZERO), + challenges + .evm_word() + .map(|challenge| rlc::value(&self.gas_tip_cap.to_le_bytes(), challenge)), + ], + [ + Value::known(F::from(self.id as u64)), + Value::known(F::from(TxContextFieldTag::GasFeeCap as u64)), + Value::known(F::ZERO), + challenges + .evm_word() + .map(|challenge| rlc::value(&self.gas_fee_cap.to_le_bytes(), challenge)), + ], [ Value::known(F::from(self.id as u64)), Value::known(F::from(TxContextFieldTag::CallerAddress as u64)), @@ -176,6 +196,8 @@ pub(super) fn tx_convert( nonce: tx.tx.nonce.as_u64(), gas: tx.gas(), gas_price: tx.tx.gas_price, + gas_tip_cap: tx.tx.gas_tip_cap, + gas_fee_cap: tx.tx.gas_fee_cap, caller_address: tx.tx.from, callee_address: tx.tx.to_or_contract_addr(), is_create: tx.is_create(), From a7d04c384b71354d6a7656324fe9d72d83d04a1f Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 31 Jul 2023 10:51:12 +0000 Subject: [PATCH 02/55] chore: update gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 56eef1249b..c289d5a4b4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,8 @@ .vscode .idea /generated +*.srs +*.log +*.json +*.yul +*.sol From 9485602e918f08db2ee535af8fba85a7bb87691d Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 31 Jul 2023 10:59:56 +0000 Subject: [PATCH 03/55] chore: mark TODO --- zkevm-circuits/src/table/tx_table.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zkevm-circuits/src/table/tx_table.rs b/zkevm-circuits/src/table/tx_table.rs index 5ec120fbee..913265ba29 100644 --- a/zkevm-circuits/src/table/tx_table.rs +++ b/zkevm-circuits/src/table/tx_table.rs @@ -10,6 +10,7 @@ pub enum TxFieldTag { Nonce, /// Gas Gas, + // TODO: check in TxCircuit, gas_price == min(base_fee + gas_tip_cap, gas_fee_cap) /// GasPrice GasPrice, /// GasTipCap From 5c2339918cf30178f429806a59358220420ecd41 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 31 Jul 2023 14:51:01 +0000 Subject: [PATCH 04/55] feat: support effective gas price --- .../src/evm_circuit/execution/begin_tx.rs | 6 +- .../src/evm_circuit/execution/end_tx.rs | 38 +++- .../src/evm_circuit/util/math_gadget.rs | 2 + .../util/math_gadget/min_max_word.rs | 183 ++++++++++++++++++ .../src/taiko_super_circuit/test.rs | 1 + 5 files changed, 223 insertions(+), 7 deletions(-) create mode 100644 zkevm-circuits/src/evm_circuit/util/math_gadget/min_max_word.rs diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 448f4dd7b6..7b9c11c4b0 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -180,10 +180,12 @@ impl ExecutionGadget for BeginTxGadget { ); // rwc_delta += 1 }); - let is_first_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); + // Anchor is always the first tx of the list + let not_anchor_tx = not::expr(IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()).expr()); // Transfer value from caller to callee, creating account if necessary. - let transfer_with_gas_fee = cb.condition(1.expr() - is_first_tx.expr(), |cb| { + // only update caller and callee account when tx is not anchor + let transfer_with_gas_fee = cb.condition(not_anchor_tx, |cb| { TransferWithGasFeeGadget::construct( cb, tx_caller_address.expr(), diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index f1afd0658d..81f2c8b2ac 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -11,7 +11,7 @@ use crate::{ }, math_gadget::{ AddWordsGadget, ConstantDivisionGadget, IsEqualGadget, MinMaxGadget, - MulWordByU64Gadget, + MinMaxWordGadget, MulWordByU64Gadget, }, CachedRegion, Cell, }, @@ -36,6 +36,7 @@ pub(crate) struct EndTxGadget { tx_caller_address: Cell, gas_fee_refund: UpdateBalanceGadget, sub_gas_price_by_base_fee: AddWordsGadget, + add_base_fee_and_tip: AddWordsGadget, mul_effective_tip_by_gas_used: MulWordByU64Gadget, mul_base_fee_by_gas_used: MulWordByU64Gadget, coinbase: Cell, @@ -58,6 +59,7 @@ impl ExecutionGadget for EndTxGadget { // a. gas_price == effective_gas_price // 2. no need update GOLDEN_TOUCH account in Anchor(-effective_gas_price, +refund) // 3. Anchor's gas_tip_cap == 0 + // 4. check gas_price == min(gas_tip_cap + base_fee, gas_fee_cap) let tx_id = cb.call_context(None, CallContextFieldTag::TxId); let is_persistent = cb.call_context(None, CallContextFieldTag::IsPersistent); @@ -65,7 +67,12 @@ impl ExecutionGadget for EndTxGadget { let [tx_gas, tx_caller_address] = [TxContextFieldTag::Gas, TxContextFieldTag::CallerAddress] .map(|field_tag| cb.tx_context(tx_id.expr(), field_tag, None)); - let tx_gas_price = cb.tx_context_as_word(tx_id.expr(), TxContextFieldTag::GasPrice, None); + let [tx_gas_price, tx_gas_tip_cap, tx_gas_fee_cap] = [ + TxContextFieldTag::GasPrice, + TxContextFieldTag::GasTipCap, + TxContextFieldTag::GasFeeCap, + ] + .map(|field_tag| cb.tx_context_as_word(tx_id.expr(), field_tag, None)); let is_first_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); @@ -97,13 +104,27 @@ impl ExecutionGadget for EndTxGadget { cb.block_lookup(tag.expr(), None, value); } let effective_tip = cb.query_word_rlc(); - let sub_gas_price_by_base_fee = - AddWordsGadget::construct(cb, [effective_tip.clone(), base_fee.clone()], tx_gas_price); + let sub_gas_price_by_base_fee = AddWordsGadget::construct( + cb, + [effective_tip.clone(), base_fee.clone()], + tx_gas_price.clone(), + ); let mul_effective_tip_by_gas_used = MulWordByU64Gadget::construct(cb, effective_tip, gas_used.clone()); let mul_base_fee_by_gas_used = - MulWordByU64Gadget::construct(cb, base_fee, gas_used.clone()); + MulWordByU64Gadget::construct(cb, base_fee.clone(), gas_used.clone()); + // 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 = + 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(); + cb.require_equal( + "gas_price == min(gas_tip_cap + base_fee, gas_fee_cap)", + tx_gas_price.expr(), + effective_gas_price, + ); // send base fee to treasury account let treasury = cb.query_cell(); @@ -208,6 +229,7 @@ impl ExecutionGadget for EndTxGadget { tx_caller_address, gas_fee_refund, sub_gas_price_by_base_fee, + add_base_fee_and_tip, mul_effective_tip_by_gas_used, mul_base_fee_by_gas_used, coinbase, @@ -279,6 +301,12 @@ impl ExecutionGadget for EndTxGadget { [effective_tip, block.context.base_fee], tx.gas_price, )?; + self.add_base_fee_and_tip.assign( + region, + offset, + [tx.gas_tip_cap, block.context.base_fee], + tx.gas_tip_cap + block.context.base_fee, + )?; self.mul_effective_tip_by_gas_used.assign( region, offset, diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget.rs index f9e89543d9..909d7f1d02 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget.rs @@ -15,6 +15,7 @@ mod is_zero; mod lt; mod lt_word; mod min_max; +mod min_max_word; mod modulo; mod mul_add_words; mod mul_add_words512; @@ -36,6 +37,7 @@ pub(crate) use is_zero::IsZeroGadget; pub(crate) use lt::LtGadget; pub(crate) use lt_word::LtWordGadget; pub(crate) use min_max::MinMaxGadget; +pub(crate) use min_max_word::MinMaxWordGadget; pub(crate) use modulo::ModGadget; pub(crate) use mul_add_words::MulAddWordsGadget; pub(crate) use mul_add_words512::MulAddWords512Gadget; diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/min_max_word.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/min_max_word.rs new file mode 100644 index 0000000000..413eba708b --- /dev/null +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/min_max_word.rs @@ -0,0 +1,183 @@ +use crate::evm_circuit::util::{ + self, constraint_builder::EVMConstraintBuilder, math_gadget::*, select, CachedRegion, +}; +use eth_types::{Field, Word}; +use halo2_proofs::plonk::{Error, Expression}; + +/// Returns `rhs` when `lhs < rhs`, and returns `lhs` otherwise. +#[derive(Clone, Debug)] +pub struct MinMaxWordGadget { + lt: LtWordGadget, + min: Expression, + max: Expression, +} + +impl MinMaxWordGadget { + pub(crate) fn construct( + cb: &mut EVMConstraintBuilder, + lhs: &util::Word, + rhs: &util::Word, + ) -> Self { + let lt = LtWordGadget::construct(cb, lhs, rhs); + let max = select::expr(lt.expr(), rhs.expr(), lhs.expr()); + let min = select::expr(lt.expr(), lhs.expr(), rhs.expr()); + + Self { lt, min, max } + } + + pub(crate) fn min(&self) -> Expression { + self.min.clone() + } + + pub(crate) fn max(&self) -> Expression { + self.max.clone() + } + + pub(crate) fn assign( + &self, + region: &mut CachedRegion<'_, '_, F>, + offset: usize, + lhs: Word, + rhs: Word, + ) -> Result<(), Error> { + self.lt.assign(region, offset, lhs, rhs) + } +} + +#[cfg(test)] +mod tests { + use super::{test_util::*, *}; + use crate::evm_circuit::util::constraint_builder::ConstrainBuilderCommon; + use eth_types::{ToLittleEndian, Word}; + use halo2_proofs::{halo2curves::bn256::Fr, plonk::Error}; + + #[derive(Clone)] + /// MinMaxTestContainer: require(min(a, b) == (a if MIN_IS_A else b)) + struct MinMaxWordTestContainer { + minmax_word_gadget: MinMaxWordGadget, + a: util::Word, + b: util::Word, + } + + impl MathGadgetContainer + for MinMaxWordTestContainer + { + fn configure_gadget_container(cb: &mut EVMConstraintBuilder) -> Self { + let a = cb.query_word_rlc(); + let b = cb.query_word_rlc(); + let minmax_word_gadget = MinMaxWordGadget::::construct(cb, &a, &b); + + if MIN_IS_A { + cb.require_equal("min == a", minmax_word_gadget.min(), a.expr()); + cb.require_equal("max == b", minmax_word_gadget.max(), b.expr()); + } else { + cb.require_equal("min == b", minmax_word_gadget.min(), b.expr()); + cb.require_equal("max == a", minmax_word_gadget.max(), a.expr()); + } + + MinMaxWordTestContainer { + minmax_word_gadget, + a, + b, + } + } + + fn assign_gadget_container( + &self, + witnesses: &[Word], + region: &mut CachedRegion<'_, '_, F>, + ) -> Result<(), Error> { + let a = witnesses[0]; + let b = witnesses[1]; + let offset = 0; + + self.a.assign(region, offset, Some(a.to_le_bytes()))?; + self.b.assign(region, offset, Some(b.to_le_bytes()))?; + self.minmax_word_gadget.assign(region, offset, a, b)?; + + Ok(()) + } + } + + #[test] + fn test_minmax_eq() { + // a == b + try_test!( + MinMaxWordTestContainer, + vec![Word::from(0), Word::from(0)], + true, + ); + try_test!( + MinMaxWordTestContainer, + vec![Word::from(5), Word::from(5)], + true, + ); + try_test!( + MinMaxWordTestContainer, + vec![WORD_LOW_MAX, WORD_LOW_MAX], + true, + ); + } + + #[test] + fn test_minmax_expect_min_a() { + // min == a, max == b + try_test!( + MinMaxWordTestContainer, + vec![Word::from(0), Word::from(1)], + true, + ); + try_test!( + MinMaxWordTestContainer, + vec![Word::from(3), Word::from(5)], + true, + ); + try_test!( + MinMaxWordTestContainer, + vec![WORD_LOW_MAX, WORD_LOW_MAX], + true, + ); + } + + #[test] + fn test_minmax_unexpect_min_a() { + // min == b, max == a + try_test!( + MinMaxWordTestContainer, + vec![Word::from(1), Word::from(0)], + false, + ); + try_test!( + MinMaxWordTestContainer, + vec![Word::from(256), Word::from(3)], + false, + ); + try_test!( + MinMaxWordTestContainer, + vec![WORD_LOW_MAX, Word::from(123456)], + false, + ); + } + + #[test] + fn test_minmax_expect_min_b() { + // min == a, max == b + try_test!( + MinMaxWordTestContainer, + vec![Word::from(1), Word::from(0)], + true, + ); + + try_test!( + MinMaxWordTestContainer, + vec![Word::from(777), Word::from(44)], + true, + ); + + try_test!( + MinMaxWordTestContainer, + vec![WORD_LOW_MAX+1, WORD_LOW_MAX], + true, + ); + } +} diff --git a/zkevm-circuits/src/taiko_super_circuit/test.rs b/zkevm-circuits/src/taiko_super_circuit/test.rs index 6b93af79bd..395f9ed4eb 100644 --- a/zkevm-circuits/src/taiko_super_circuit/test.rs +++ b/zkevm-circuits/src/taiko_super_circuit/test.rs @@ -1,6 +1,7 @@ #![allow(unused_imports)] pub use super::*; use crate::anchor_tx_circuit::{add_anchor_accounts, add_anchor_tx, sign_tx}; +use bus_mapping::circuit_input_builder::MetaHash; use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; use log::error; From 07b6c22ca719916fdf7e26f4022bf0fb8c9fb39e Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 31 Jul 2023 14:56:39 +0000 Subject: [PATCH 05/55] docs: solve TODO --- zkevm-circuits/src/evm_circuit/execution/end_tx.rs | 8 ++++---- zkevm-circuits/src/table/tx_table.rs | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 81f2c8b2ac..a6e688cb0d 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -36,7 +36,7 @@ pub(crate) struct EndTxGadget { tx_caller_address: Cell, gas_fee_refund: UpdateBalanceGadget, sub_gas_price_by_base_fee: AddWordsGadget, - add_base_fee_and_tip: AddWordsGadget, + add_tip_cap_and_base_fee: AddWordsGadget, mul_effective_tip_by_gas_used: MulWordByU64Gadget, mul_base_fee_by_gas_used: MulWordByU64Gadget, coinbase: Cell, @@ -116,7 +116,7 @@ impl ExecutionGadget for EndTxGadget { // 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(); @@ -229,7 +229,7 @@ impl ExecutionGadget for EndTxGadget { 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, @@ -301,7 +301,7 @@ impl ExecutionGadget for EndTxGadget { [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], diff --git a/zkevm-circuits/src/table/tx_table.rs b/zkevm-circuits/src/table/tx_table.rs index 913265ba29..5ec120fbee 100644 --- a/zkevm-circuits/src/table/tx_table.rs +++ b/zkevm-circuits/src/table/tx_table.rs @@ -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 From 9752cdb3d3ac12eb963686f0a69bc51a8ce212b6 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 3 Aug 2023 09:10:07 +0000 Subject: [PATCH 06/55] feat: mock with 1559 support and anchor support --- Cargo.lock | 20 ++ Cargo.toml | 3 +- mock-taiko/.gitignore | 1 + mock-taiko/Cargo.toml | 24 +++ mock-taiko/src/account.rs | 84 ++++++++ mock-taiko/src/anchor.rs | 101 ++++++++++ mock-taiko/src/block.rs | 282 ++++++++++++++++++++++++++ mock-taiko/src/lib.rs | 169 ++++++++++++++++ mock-taiko/src/test_ctx.rs | 287 ++++++++++++++++++++++++++ mock-taiko/src/transaction.rs | 368 ++++++++++++++++++++++++++++++++++ 10 files changed, 1338 insertions(+), 1 deletion(-) create mode 100644 mock-taiko/.gitignore create mode 100644 mock-taiko/Cargo.toml create mode 100644 mock-taiko/src/account.rs create mode 100644 mock-taiko/src/anchor.rs create mode 100644 mock-taiko/src/block.rs create mode 100644 mock-taiko/src/lib.rs create mode 100644 mock-taiko/src/test_ctx.rs create mode 100644 mock-taiko/src/transaction.rs diff --git a/Cargo.lock b/Cargo.lock index d4746e56aa..f69b0d387d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2909,6 +2909,26 @@ dependencies = [ "rand_chacha", ] +[[package]] +name = "mock-taiko" +version = "0.1.0" +dependencies = [ + "eth-types", + "ethers-core", + "ethers-signers", + "external-tracer", + "halo2_proofs 0.2.0", + "itertools", + "lazy_static", + "libsecp256k1", + "num", + "num-bigint", + "once_cell", + "rand", + "rand_chacha", + "sha3 0.10.7", +] + [[package]] name = "new_debug_unreachable" version = "1.0.4" diff --git a/Cargo.toml b/Cargo.toml index be096fc2fb..c2d92a118e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,8 @@ members = [ "eth-types", "external-tracer", "mock", - "testool" + "mock-taiko", + "testool", ] [patch.crates-io] diff --git a/mock-taiko/.gitignore b/mock-taiko/.gitignore new file mode 100644 index 0000000000..ea8c4bf7f3 --- /dev/null +++ b/mock-taiko/.gitignore @@ -0,0 +1 @@ +/target diff --git a/mock-taiko/Cargo.toml b/mock-taiko/Cargo.toml new file mode 100644 index 0000000000..92a1a7265e --- /dev/null +++ b/mock-taiko/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "mock-taiko" +version = "0.1.0" +edition = "2021" +authors = ["The appliedzkp team"] +license = "MIT OR Apache-2.0" + +[dependencies] +halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", features = [ + "circuit-params", +], tag = "v2023_04_20" } +eth-types = { path = "../eth-types" } +external-tracer = { path = "../external-tracer" } +lazy_static = "1.4" +itertools = "0.10.3" +ethers-signers = "=2.0.0" +ethers-core = "=2.0.0" +rand_chacha = "0.3" +rand = "0.8" +sha3 = "0.10" +num-bigint = { version = "0.4" } +num = "0.4" +libsecp256k1 = "0.7" +once_cell = "1.17.1" diff --git a/mock-taiko/src/account.rs b/mock-taiko/src/account.rs new file mode 100644 index 0000000000..87abb710e8 --- /dev/null +++ b/mock-taiko/src/account.rs @@ -0,0 +1,84 @@ +//! Mock Account definition and builder related methods. + +use eth_types::{geth_types::Account, Address, Bytes, Word}; +use std::collections::HashMap; + +#[derive(Debug, Clone, Default)] +/// Mock structure which represents an Account and can be used for tests. +/// It contains all the builder-pattern methods required to be able to specify +/// any of its details. +pub struct MockAccount { + /// Address + pub address: Address, + /// nonce + pub nonce: u64, + /// Balance + pub balance: Word, + /// EVM Code + pub code: Bytes, + /// Storage + pub storage: HashMap, +} + +impl From for Account { + fn from(mock: MockAccount) -> Self { + Account { + address: mock.address, + nonce: mock.nonce.into(), + balance: mock.balance, + code: mock.code, + storage: mock.storage, + } + } +} + +impl MockAccount { + /// Set address field for the MockAccount. + pub fn address(&mut self, address: Address) -> &mut Self { + self.address = address; + self + } + + /// Set nonce field for the MockAccount. + pub fn nonce(&mut self, nonce: u64) -> &mut Self { + self.nonce = nonce; + self + } + + /// Set balance field for the MockAccount. + pub fn balance(&mut self, balance: Word) -> &mut Self { + self.balance = balance; + self + } + + /// Set code field for the MockAccount. + pub fn code>(&mut self, code: T) -> &mut Self { + self.code = code.into(); + self + } + + /// Add storage field for the MockAccount by passing an iterator over the + /// key-value tuples of type [(`Word`, `Word`)]. + pub fn storage>(&mut self, storage: I) -> &mut Self { + storage.for_each(|pair| { + assert!(self.storage.insert(pair.0, pair.1).is_none()); + }); + self + } + + /// Set all fields for the MockAccount based on their values in `account`. + pub fn account(&mut self, account: &Account) -> &mut Self { + self.address(account.address); + self.nonce(account.nonce.as_u64()); + self.balance(account.balance); + self.code(account.code.clone()); + self.storage(account.storage.iter().map(|(k, v)| (*k, *v))); + self + } + + /// Finalizes the current MockAccount under construction returning a new + /// instance to it. + pub fn build(&mut self) -> Self { + self.to_owned() + } +} diff --git a/mock-taiko/src/anchor.rs b/mock-taiko/src/anchor.rs new file mode 100644 index 0000000000..4b0ce8962c --- /dev/null +++ b/mock-taiko/src/anchor.rs @@ -0,0 +1,101 @@ +use crate::{ + MockTransaction, GOLDEN_TOUCH_PRIVATEKEY, MOCK_ANCHOR_L1_HASH, MOCK_ANCHOR_L1_HIGHT, + MOCK_ANCHOR_PARENT_GAS_USED, MOCK_ANCHOR_SIGNAL_ROOT, MOCK_CHAIN_ID, +}; +use eth_types::{ + geth_types::Transaction, + sign_types::{biguint_to_32bytes_le, ct_option_ok_or, sign as eth_sign, SignData, SECP256K1_Q}, + word, Bytes, ToBigEndian, ToLittleEndian, ToWord, Word, U256, +}; +use ethers_core::types::TransactionRequest; +use halo2_proofs::{ + arithmetic::Field as _, + halo2curves::{ + ff::PrimeField, + group::Curve, + secp256k1::{self, Secp256k1Affine}, + }, +}; +use num::Integer; +use num_bigint::BigUint; +use once_cell::sync::Lazy; +use sha3::{Digest, Keccak256}; + +static GX1: Lazy = + Lazy::new(|| word!("0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798")); +static GX2: Lazy = + Lazy::new(|| word!("0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5")); + +fn fixd_k_sign(anchor_tx: &Transaction, chain_id: u64) -> Result { + // msg = rlp([nonce, gasPrice, gas, to, value, data, sig_v, r, s]) + let req: TransactionRequest = anchor_tx.into(); + let msg = req.chain_id(chain_id).rlp(); + let msg_hash: [u8; 32] = Keccak256::digest(&msg) + .as_slice() + .to_vec() + .try_into() + .expect("hash length isn't 32 bytes"); + // msg_hash = msg_hash % q + let msg_hash = BigUint::from_bytes_be(msg_hash.as_slice()); + let msg_hash = msg_hash.mod_floor(&*SECP256K1_Q); + let msg_hash_le = biguint_to_32bytes_le(msg_hash); + let msg_hash = ct_option_ok_or( + secp256k1::Fq::from_repr(msg_hash_le), + libsecp256k1::Error::InvalidMessage, + )?; + let k1 = secp256k1::Fq::ONE; + let sk = ct_option_ok_or( + secp256k1::Fq::from_repr((*GOLDEN_TOUCH_PRIVATEKEY).to_le_bytes()), + libsecp256k1::Error::InvalidSecretKey, + )?; + let generator = Secp256k1Affine::generator(); + let pk = generator * sk; + let pk = pk.to_affine(); + let (mut sig_r, mut sig_s) = eth_sign(k1, sk, msg_hash); + let gx1 = ct_option_ok_or( + secp256k1::Fq::from_repr(GX1.to_le_bytes()), + libsecp256k1::Error::InvalidSignature, + )?; + assert!(sig_r == gx1); + if sig_s == secp256k1::Fq::ZERO { + let k2 = secp256k1::Fq::ONE + secp256k1::Fq::ONE; + (sig_r, sig_s) = eth_sign(k2, sk, msg_hash); + let gx2 = ct_option_ok_or( + secp256k1::Fq::from_repr(GX2.to_le_bytes()), + libsecp256k1::Error::InvalidSignature, + )?; + assert!(sig_r == gx2); + } + Ok(SignData { + signature: (sig_r, sig_s), + pk, + msg_hash, + }) +} + +/// The signature of anchor transaction +pub fn sign(tx: &mut MockTransaction) { + let chain_id = (*MOCK_CHAIN_ID).as_u64(); + let _tx: Transaction = tx.to_owned().into(); + let sig_data = fixd_k_sign(&_tx, chain_id).unwrap(); + let sig_r = U256::from_little_endian(sig_data.signature.0.to_bytes().as_slice()); + let sig_s = U256::from_little_endian(sig_data.signature.1.to_bytes().as_slice()); + tx.sig_data((2712, sig_r, sig_s)); +} + +/// gen anchor call +// anchor(l1_hash,signal_root,l1_height,parent_gas_used) +pub fn anchor_call() -> Bytes { + const METHOD_SIGNATURE: u32 = 0xda69d3db; + let mut result = Vec::new(); + result.extend_from_slice(&METHOD_SIGNATURE.to_be_bytes()); + result.extend_from_slice(&MOCK_ANCHOR_L1_HASH.to_fixed_bytes()); + result.extend_from_slice(&MOCK_ANCHOR_SIGNAL_ROOT.to_fixed_bytes()); + result.extend_from_slice(&MOCK_ANCHOR_L1_HIGHT.to_word().to_be_bytes()); + result.extend_from_slice( + &(*MOCK_ANCHOR_PARENT_GAS_USED as u64) + .to_word() + .to_be_bytes(), + ); + result.into() +} diff --git a/mock-taiko/src/block.rs b/mock-taiko/src/block.rs new file mode 100644 index 0000000000..4123312933 --- /dev/null +++ b/mock-taiko/src/block.rs @@ -0,0 +1,282 @@ +//! Mock Block definition and builder related methods. + +use crate::{MockTransaction, MOCK_BASEFEE, MOCK_CHAIN_ID, MOCK_DIFFICULTY, MOCK_GASLIMIT}; +use eth_types::{Address, Block, Bytes, Hash, Transaction, Word, H64, U64}; +use ethers_core::types::{Bloom, OtherFields}; + +#[derive(Clone, Debug)] +/// Mock structure which represents an Ethereum Block and can be used for tests. +/// It contains all the builder-pattern methods required to be able to specify +/// any of it's details. +pub struct MockBlock { + hash: Option, + parent_hash: Hash, + uncles_hash: Hash, + author: Address, + state_root: Hash, + transactions_root: Hash, + receipts_root: Hash, + number: U64, + gas_used: Word, + gas_limit: Word, + base_fee_per_gas: Word, + extra_data: Bytes, + logs_bloom: Option, + timestamp: Word, + difficulty: Word, + total_difficulty: Word, + seal_fields: Vec, + uncles: Vec, + pub(crate) transactions: Vec, + size: Word, + mix_hash: Hash, + nonce: H64, + // This field is handled here as we assume that all block txs have the same ChainId. + // Also, the field is stored in the block_table since we don't have a chain_config + // structure/table. + pub(crate) chain_id: Word, +} + +impl Default for MockBlock { + fn default() -> Self { + MockBlock { + hash: Some(Hash::zero()), + parent_hash: Hash::zero(), + uncles_hash: Hash::zero(), + author: Address::zero(), + state_root: Hash::zero(), + transactions_root: Hash::zero(), + receipts_root: Hash::zero(), + number: U64([0u64]), + gas_used: Word::zero(), + gas_limit: *MOCK_GASLIMIT, + base_fee_per_gas: *MOCK_BASEFEE, + extra_data: Bytes::default(), + logs_bloom: None, + timestamp: Word::from(123456789u64), + difficulty: *MOCK_DIFFICULTY, + total_difficulty: Word::zero(), + seal_fields: Vec::new(), + uncles: Vec::new(), + transactions: Vec::new(), + size: Word::zero(), + mix_hash: Hash::zero(), + nonce: H64::zero(), + chain_id: *MOCK_CHAIN_ID, + } + } +} + +impl From for Block { + fn from(mut mock: MockBlock) -> Self { + Block { + hash: mock.hash.or_else(|| Some(Hash::default())), + parent_hash: mock.parent_hash, + uncles_hash: mock.uncles_hash, + author: Some(mock.author), + state_root: mock.state_root, + transactions_root: mock.transactions_root, + receipts_root: mock.receipts_root, + number: Some(mock.number), + gas_used: mock.gas_used, + gas_limit: mock.gas_limit, + extra_data: mock.extra_data, + logs_bloom: mock.logs_bloom, + timestamp: mock.timestamp, + difficulty: mock.difficulty, + total_difficulty: Some(mock.total_difficulty), + seal_fields: mock.seal_fields, + uncles: mock.uncles, + transactions: mock + .transactions + .iter_mut() + .map(|mock_tx| (mock_tx.chain_id(mock.chain_id).to_owned()).into()) + .collect::>(), + size: Some(mock.size), + mix_hash: Some(mock.mix_hash), + nonce: Some(mock.nonce), + base_fee_per_gas: Some(mock.base_fee_per_gas), + other: OtherFields::default(), + } + } +} + +impl From for Block<()> { + fn from(mock: MockBlock) -> Self { + Block { + hash: mock.hash.or_else(|| Some(Hash::default())), + parent_hash: mock.parent_hash, + uncles_hash: mock.uncles_hash, + author: Some(mock.author), + state_root: mock.state_root, + transactions_root: mock.transactions_root, + receipts_root: mock.receipts_root, + number: Some(mock.number), + gas_used: mock.gas_used, + gas_limit: mock.gas_limit, + extra_data: mock.extra_data, + logs_bloom: mock.logs_bloom, + timestamp: mock.timestamp, + difficulty: mock.difficulty, + total_difficulty: Some(mock.total_difficulty), + seal_fields: mock.seal_fields, + uncles: mock.uncles, + transactions: vec![], + size: Some(mock.size), + mix_hash: Some(mock.mix_hash), + nonce: Some(mock.nonce), + base_fee_per_gas: Some(mock.base_fee_per_gas), + other: OtherFields::default(), + } + } +} + +impl MockBlock { + /// TODO: This should be computed based on the fields of the block by + /// default unless `Some(hash)` is specified on build process. + pub fn hash(&mut self, hash: Hash) -> &mut Self { + self.hash = Some(hash); + self + } + + /// Set parent_hash field for the MockBlock. + pub fn parent_hash(&mut self, parent_hash: Hash) -> &mut Self { + self.parent_hash = parent_hash; + self + } + + /// Set uncles_hash field for the MockBlock. + pub fn uncles_hash(&mut self, uncles_hash: Hash) -> &mut Self { + self.uncles_hash = uncles_hash; + self + } + + /// Set author field for the MockBlock. + pub fn author(&mut self, author: Address) -> &mut Self { + self.author = author; + self + } + + /// Set state_root field for the MockBlock. + pub fn state_root(&mut self, state_root: Hash) -> &mut Self { + self.state_root = state_root; + self + } + + /// Set transactions_root field for the MockBlock. + pub fn transactions_root(&mut self, transactions_root: Hash) -> &mut Self { + self.transactions_root = transactions_root; + self + } + + /// Set receipts_root field for the MockBlock. + pub fn receipts_root(&mut self, receipts_root: Hash) -> &mut Self { + self.receipts_root = receipts_root; + self + } + + /// Set number field for the MockBlock. + pub fn number(&mut self, number: u64) -> &mut Self { + self.number = U64::from(number); + self + } + + /// Set gas_used field for the MockBlock. + pub fn gas_used(&mut self, gas_used: Word) -> &mut Self { + self.gas_used = gas_used; + self + } + + /// Set gas_limit field for the MockBlock. + pub fn gas_limit(&mut self, gas_limit: Word) -> &mut Self { + self.gas_limit = gas_limit; + self + } + + /// Set base_fee_per_gas field for the MockBlock. + pub fn base_fee_per_gas(&mut self, base_fee_per_gas: Word) -> &mut Self { + self.base_fee_per_gas = base_fee_per_gas; + self + } + + /// Set extra_data field for the MockBlock. + pub fn extra_data(&mut self, extra_data: Bytes) -> &mut Self { + self.extra_data = extra_data; + self + } + + /// Set logs_bloom field for the MockBlock. + pub fn logs_bloom(&mut self, logs_bloom: Bloom) -> &mut Self { + self.logs_bloom = Some(logs_bloom); + self + } + + /// Set timestamp field for the MockBlock. + pub fn timestamp(&mut self, timestamp: Word) -> &mut Self { + self.timestamp = timestamp; + self + } + + /// Set difficulty field for the MockBlock. + pub fn difficulty(&mut self, difficulty: Word) -> &mut Self { + self.difficulty = difficulty; + self + } + + /// Set total_difficulty field for the MockBlock. + pub fn total_difficulty(&mut self, total_difficulty: Word) -> &mut Self { + self.total_difficulty = total_difficulty; + self + } + + /// Set seal_fields field for the MockBlock. + pub fn seal_fields(&mut self, seal_fields: Vec) -> &mut Self { + self.seal_fields = seal_fields; + self + } + + /// Set uncles field for the MockBlock. + pub fn uncles(&mut self, uncles: Vec) -> &mut Self { + self.uncles = uncles; + self + } + + /// Set transactions field for the MockBlock. + pub fn transactions>( + &mut self, + transactions: I, + ) -> &mut Self { + self.transactions.extend(transactions); + self + } + + /// Set size field for the MockBlock. + pub fn size(&mut self, size: Word) -> &mut Self { + self.size = size; + self + } + + /// Set mix_hash field for the MockBlock. + pub fn mix_hash(&mut self, mix_hash: Hash) -> &mut Self { + self.mix_hash = mix_hash; + self + } + + /// Set nonce field for the MockBlock. + pub fn nonce(&mut self, nonce: H64) -> &mut Self { + self.nonce = nonce; + self + } + + /// Set chain_id field for the MockBlock. + pub fn chain_id(&mut self, chain_id: Word) -> &mut Self { + self.chain_id = chain_id; + self + } + + /// Finalizes the current MockBlock under construction returning a new + /// instance to it. + pub fn build(&mut self) -> Self { + self.to_owned() + } +} diff --git a/mock-taiko/src/lib.rs b/mock-taiko/src/lib.rs new file mode 100644 index 0000000000..55407f588a --- /dev/null +++ b/mock-taiko/src/lib.rs @@ -0,0 +1,169 @@ +//! Mock types and functions to generate GethData used for tests + +use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Hash, Word}; +use ethers_signers::LocalWallet; +use lazy_static::lazy_static; +use rand::SeedableRng; +use rand_chacha::ChaCha20Rng; +mod account; +mod anchor; +mod block; +pub mod test_ctx; +mod transaction; + +pub use account::MockAccount; +pub(crate) use block::MockBlock; +pub use test_ctx::TestContext; +pub use transaction::{AddrOrWallet, MockTransaction, CORRECT_MOCK_TXS}; + +lazy_static! { + /// Mock 1 ETH + pub static ref MOCK_1_ETH: Word = eth(1); + /// Mock coinbase value + pub static ref MOCK_COINBASE: Address = + address!("0x00000000000000000000000000000000c014ba5e"); + /// Mock gasprice value + pub static ref MOCK_GASPRICE: Word = Word::from(2u8); + /// Mock BASEFEE value + pub static ref MOCK_BASEFEE: Word = Word::from(1u8); + /// Mock GASTIPCAP value + pub static ref MOCK_GASTIPCAP: Word = Word::from(1u8); + /// Mock GASFEECAP value + pub static ref MOCK_GASFEECAP: Word = Word::from(2u8); + /// Mock GASLIMIT value + pub static ref MOCK_GASLIMIT: Word = Word::from(0x2386f26fc10000u64); + /// Mock chain ID value + pub static ref MOCK_CHAIN_ID: Word = Word::from(1338u64); + /// Mock DIFFICULTY value + pub static ref MOCK_DIFFICULTY: Word = Word::from(0x200000u64); + /// Mock accounts loaded with ETH to use for test cases. + pub static ref MOCK_ACCOUNTS: Vec

= vec![ + address!("0x000000000000000000000000000000000cafe111"), + address!("0x000000000000000000000000000000000cafe222"), + address!("0x000000000000000000000000000000000cafe333"), + address!("0x000000000000000000000000000000000cafe444"), + address!("0x000000000000000000000000000000000cafe555"), + ]; + /// GOLDEN_TOUCH is Anchor's from address + pub static ref GOLDEN_TOUCH: Address = address!("0x0000777735367b36bC9B61C50022d9D0700dB4Ec"); + /// GOLDEN_TOUCH's private key + pub static ref GOLDEN_TOUCH_PRIVATEKEY: Word = word!("0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38"); + /// Taiko l2 contract address + pub static ref MOCK_TAIKO_L2_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe666"); + /// Mock anchor + pub static ref MOCK_ANCHOR_GAS_LIMIT: Word = Word::from(18000); + pub static ref MOCK_ANCHOR_GAS_PRICE: Word = Word::from(0); + pub static ref MOCK_ANCHOR_L1_HASH: Hash = Hash::from_slice(&[0u8; 32]); + pub static ref MOCK_ANCHOR_SIGNAL_ROOT: Hash = Hash::from_slice(&[0u8; 32]); + pub static ref MOCK_ANCHOR_L1_HIGHT: u64 = 0; + pub static ref MOCK_ANCHOR_PARENT_GAS_USED: u32 = 0; + pub static ref MOCK_ANCHOR_TX_VALUE: Word = Word::from(0); + + /// pub + /// Mock EVM codes to use for test cases. + pub static ref MOCK_CODES: Vec = vec![ + Bytes::from([0x60, 0x10, 0x00]), // PUSH1(0x10), STOP + Bytes::from([0x60, 0x01, 0x60, 0x02, 0x01, 0x00]), // PUSH1(1), PUSH1(2), ADD, STOP + Bytes::from([0x60, 0x01, 0x60, 0x02, 0x02, 0x00]), // PUSH1(1), PUSH1(2), MUL, STOP + Bytes::from([0x60, 0x02, 0x60, 0x01, 0x03, 0x00]), // PUSH1(2), PUSH1(1), SUB, STOP + Bytes::from([0x60, 0x09, 0x60, 0x03, 0x04, 0x00]), // PUSH1(9), PUSH1(3), DIV, STOP + Bytes::from([0x30; 256]), // ADDRESS * 256 + ]; + /// Mock wallets used to generate correctly signed and hashed Transactions. + pub static ref MOCK_WALLETS: Vec = { + let mut rng = ChaCha20Rng::seed_from_u64(2u64); + vec![ + LocalWallet::new(&mut rng), + LocalWallet::new(&mut rng), + LocalWallet::new(&mut rng), + ] + }; + /// Mock EVM bytecode for a deployed contract. + /// PUSH1 0x20 + /// PUSH1 0 + /// PUSH1 0 + /// CALLDATACOPY + /// PUSH1 0x20 + /// PUSH1 0 + /// RETURN + /// + /// bytecode: 0x6020600060003760206000F3 + /// + /// // constructor + /// PUSH12 0x6020600060003760206000F3 + /// PUSH1 0 + /// MSTORE + /// PUSH1 0xC + /// PUSH1 0x14 + /// RETURN + /// + /// bytecode: 0x6B6020600060003760206000F3600052600C6014F3 + pub static ref MOCK_DEPLOYED_CONTRACT_BYTECODE: Word = word!("6B6020600060003760206000F3600052600C6014F3"); +} + +/// Generate a [`Word`] which corresponds to a certain amount of ETH. +pub fn eth(x: u64) -> Word { + Word::from(x) * Word::from(10u64.pow(18)) +} + +/// Express an amount of ETH in GWei. +pub fn gwei(x: u64) -> Word { + Word::from(x) * Word::from(10u64.pow(9)) +} + +/// Holds the parameters for generating mock EVM bytecode for a contract call +pub struct MockCallBytecodeParams { + /// The address to call with the generated bytecode + pub address: Address, + /// The data to be passed as arguments to the contract function. + pub pushdata: Vec, + /// The offset in memory where the return data will be stored. + pub return_data_offset: usize, + /// The size of the return data. + pub return_data_size: usize, + /// The length of the call data. + pub call_data_length: usize, + /// The offset in memory where the call data will be stored. + pub call_data_offset: usize, + /// The amount of gas to be used for the contract call. + pub gas: u64, + /// The instructions to be executed after the contract call. + pub instructions_after_call: Bytecode, +} + +/// Set default parameters for MockCallBytecodeParams +impl Default for MockCallBytecodeParams { + fn default() -> Self { + MockCallBytecodeParams { + address: address!("0x0000000000000000000000000000000000000000"), + pushdata: Vec::new(), + return_data_offset: 0x00usize, + return_data_size: 0x00usize, + call_data_length: 0x00usize, + call_data_offset: 0x00usize, + gas: 0x1_0000u64, + instructions_after_call: Bytecode::default(), + } + } +} + +/// Generate mock EVM bytecode that performs a contract call +pub fn generate_mock_call_bytecode(params: MockCallBytecodeParams) -> Bytecode { + bytecode! { + .op_mstore( + 0u64, + Word::from_big_endian(¶ms.pushdata) + ) + .op_call( + params.gas, + params.address, + 0u64, + params.call_data_offset, + params.call_data_length, + params.return_data_size, + params.return_data_offset, + ) + .append(¶ms.instructions_after_call) + STOP + } +} diff --git a/mock-taiko/src/test_ctx.rs b/mock-taiko/src/test_ctx.rs new file mode 100644 index 0000000000..a7594eb385 --- /dev/null +++ b/mock-taiko/src/test_ctx.rs @@ -0,0 +1,287 @@ +//! Mock types and functions to generate Test enviroments for ZKEVM tests + +use crate::{eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH}; +use eth_types::{ + geth_types::{Account, BlockConstants, GethData}, + Block, Bytecode, Error, GethExecTrace, Transaction, Word, +}; +use external_tracer::{trace, TraceConfig}; +use helpers::*; +use itertools::Itertools; + +pub use external_tracer::LoggerConfig; + +/// TestContext is a type that contains all the information from a block +/// required to build the circuit inputs. +/// +/// It is specifically used to generate Test cases with very precise information +/// details about any specific part of a block. That includes of course, its +/// transactions too and the accounts involved in all of them. +/// +/// The intended way to interact with the structure is through the fn `new` +/// which is designed to return a [`GethData`] which then can be used to query +/// any specific part of the logs generated by the transactions executed within +/// this context. +/// +/// ## Example +/// ```rust +/// use eth_types::evm_types::{stack::Stack, Gas, OpcodeId}; +/// use eth_types::{address, bytecode, geth_types::GethData, word, Bytecode, ToWord, Word}; +/// use lazy_static::lazy_static; +/// use mock::test_ctx::{helpers::*, TestContext}; +/// // code_a calls code +/// // jump to 0x10 which is outside the code (and also not marked with +/// // JUMPDEST) +/// let code = bytecode! { +/// PUSH1(0x10) +/// JUMP +/// STOP +/// }; +/// let code_a = bytecode! { +/// PUSH1(0x0) // retLength +/// PUSH1(0x0) // retOffset +/// PUSH1(0x0) // argsLength +/// PUSH1(0x0) // argsOffset +/// PUSH32(address!("0x000000000000000000000000000000000cafe001").to_word()) // addr +/// PUSH32(0x1_0000) // gas +/// STATICCALL +/// PUSH2(0xaa) +/// }; +/// let index = 8; // JUMP +/// +/// // Get the execution steps from the external tracer +/// let block: GethData = TestContext::<3, 2>::new( +/// None, +/// |accs| { +/// accs[0] +/// .address(address!("0x0000000000000000000000000000000000000000")) +/// .code(code_a); +/// accs[1].address(address!("0x000000000000000000000000000000000cafe001")).code(code); +/// accs[2] +/// .address(address!("0x000000000000000000000000000000000cafe002")) +/// .balance(Word::from(1u64 << 30)); +/// }, +/// |mut txs, accs| { +/// txs[0].to(accs[0].address).from(accs[2].address); +/// txs[1] +/// .to(accs[1].address) +/// .from(accs[2].address) +/// .nonce(1); +/// }, +/// |block, _tx| block.number(0xcafeu64), +/// ) +/// .unwrap() +/// .into(); +/// +/// // Now we can start generating the traces and items we need to inspect +/// // the behaviour of the generated env. +/// ``` +#[derive(Debug)] +pub struct TestContext { + /// chain id + pub chain_id: Word, + /// Account list + pub accounts: [Account; NACC], + /// history hashes contains most recent 256 block hashes in history, where + /// the lastest one is at history_hashes[history_hashes.len() - 1]. + pub history_hashes: Vec, + /// Block from geth + pub eth_block: eth_types::Block, + /// Execution Trace from geth + pub geth_traces: Vec, +} + +impl From> for GethData { + fn from(ctx: TestContext) -> GethData { + GethData { + chain_id: ctx.chain_id, + history_hashes: ctx.history_hashes, + eth_block: ctx.eth_block, + geth_traces: ctx.geth_traces.to_vec(), + accounts: ctx.accounts.into(), + } + } +} + +impl TestContext { + pub fn new_with_logger_config( + history_hashes: Option>, + acc_fns: FAcc, + func_tx: FTx, + func_block: Fb, + logger_config: LoggerConfig, + ) -> Result + where + FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), + Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, + FAcc: FnOnce([&mut MockAccount; NACC]), + { + // add the GOLDEN_TOUCH account in the first position + let mut accounts: Vec = vec![MockAccount::default(); NACC + 1]; + accounts[0].address(*GOLDEN_TOUCH); + // Build Accounts modifiers + let account_refs = accounts + .iter_mut() + .skip(1) + .collect_vec() + .try_into() + .expect("Mismatched len err"); + acc_fns(account_refs); + let accounts: [MockAccount; NACC] = accounts + .iter_mut() + .skip(1) + .map(|acc| acc.build()) + .collect_vec() + .try_into() + .expect("Mismatched acc len"); + + // add the anchor transaction in the first position + let mut transactions = vec![MockTransaction::default(); NTX + 1]; + // By default, set the TxIndex and the Nonce values of the multiple transactions + // of the context correlative so that any Ok test passes by default. + // If the user decides to override these values, they'll then be set to whatever + // inputs were provided by the user. + transactions[0] = MockTransaction::new_anchor(); + transactions + .iter_mut() + .enumerate() + .skip(1) + .for_each(|(idx, tx)| { + let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); + tx.transaction_idx(idx).nonce(idx); + }); + let tx_refs = transactions.iter_mut().skip(1).collect(); + + // Build Tx modifiers. + func_tx(tx_refs, accounts.clone()); + let transactions: Vec = + transactions.iter_mut().map(|tx| tx.build()).collect(); + + // Build Block modifiers + let mut block = MockBlock::default(); + block.transactions.extend_from_slice(&transactions); + func_block(&mut block, transactions).build(); + + let chain_id = block.chain_id; + let block = Block::::from(block); + let accounts: [Account; NACC] = accounts + .iter() + .cloned() + .map(Account::from) + .collect_vec() + .try_into() + .expect("Mismatched acc len"); + + let geth_traces = gen_geth_traces( + chain_id, + block.clone(), + accounts.to_vec(), + history_hashes.clone(), + logger_config, + )?; + + Ok(Self { + chain_id, + accounts, + history_hashes: history_hashes.unwrap_or_default(), + eth_block: block, + geth_traces, + }) + } + + /// Create a new TestContext which starts with `NACC` default accounts and + /// `NTX` default transactions. Afterwards, we apply the `acc_fns` + /// function to the accounts, the `func_tx` to the transactions and + /// the `func_block` to the block, where each of these functions can + /// mutate their target using the builder pattern. Finally an + /// execution trace is generated of the resulting input block and state. + pub fn new( + history_hashes: Option>, + acc_fns: FAcc, + func_tx: FTx, + func_block: Fb, + ) -> Result + where + FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), + Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, + FAcc: FnOnce([&mut MockAccount; NACC]), + { + Self::new_with_logger_config( + history_hashes, + acc_fns, + func_tx, + func_block, + LoggerConfig::default(), + ) + } + + /// Returns a simple TestContext setup with a single tx executing the + /// bytecode passed as parameters. The balances of the 2 accounts and + /// addresses are the ones used in [`TestContext:: + /// account_0_code_account_1_no_code`]. Extra accounts, txs and/or block + /// configs are set as [`Default`]. + pub fn simple_ctx_with_bytecode(bytecode: Bytecode) -> Result, Error> { + TestContext::new( + None, + account_0_code_account_1_no_code(bytecode), + tx_from_1_to_0, + |block, _txs| block, + ) + } +} + +/// Generates execution traces for the transactions included in the provided +/// Block +pub fn gen_geth_traces( + chain_id: Word, + block: Block, + accounts: Vec, + history_hashes: Option>, + logger_config: LoggerConfig, +) -> Result, Error> { + let trace_config = TraceConfig { + chain_id, + history_hashes: history_hashes.unwrap_or_default(), + block_constants: BlockConstants::try_from(&block)?, + accounts: accounts + .iter() + .map(|account| (account.address, account.clone())) + .collect(), + transactions: block + .transactions + .iter() + .map(eth_types::geth_types::Transaction::from) + .collect(), + logger_config, + }; + let traces = trace(&trace_config)?; + Ok(traces) +} + +/// Collection of helper functions which contribute to specific rutines on the +/// builder pattern used to construct [`TestContext`]s. +pub mod helpers { + use super::*; + use crate::MOCK_ACCOUNTS; + + /// Generate a simple setup which adds balance to two default accounts from + /// [`static@MOCK_ACCOUNTS`]: + /// - 0x000000000000000000000000000000000cafe111 + /// - 0x000000000000000000000000000000000cafe222 + /// And injects the provided bytecode into the first one. + pub fn account_0_code_account_1_no_code(code: Bytecode) -> impl FnOnce([&mut MockAccount; 2]) { + |accs| { + accs[0] + .address(MOCK_ACCOUNTS[0]) + .balance(eth(10)) + .code(code); + accs[1].address(MOCK_ACCOUNTS[1]).balance(eth(10)); + } + } + + /// Generate a single transaction from the second account of the list to the + /// first one. + pub fn tx_from_1_to_0(mut txs: Vec<&mut MockTransaction>, accs: [MockAccount; 2]) { + txs[0].from(accs[1].address).to(accs[0].address); + } +} diff --git a/mock-taiko/src/transaction.rs b/mock-taiko/src/transaction.rs new file mode 100644 index 0000000000..55613dc22a --- /dev/null +++ b/mock-taiko/src/transaction.rs @@ -0,0 +1,368 @@ +//! Mock Transaction definition and builder related methods. + +use super::{ + GOLDEN_TOUCH, MOCK_ACCOUNTS, MOCK_ANCHOR_GAS_LIMIT, MOCK_ANCHOR_GAS_PRICE, + MOCK_ANCHOR_TX_VALUE, MOCK_CHAIN_ID, MOCK_GASFEECAP, MOCK_GASPRICE, MOCK_GASTIPCAP, + MOCK_TAIKO_L2_ADDRESS, +}; +use eth_types::{ + geth_types::Transaction as GethTransaction, word, AccessList, Address, Bytes, Hash, + Transaction, Word, U64, +}; +use ethers_core::{ + rand::{CryptoRng, RngCore}, + types::{OtherFields, TransactionRequest}, +}; +use ethers_signers::{LocalWallet, Signer}; +use lazy_static::lazy_static; +use rand::SeedableRng; +use rand_chacha::ChaCha20Rng; + +lazy_static! { + /// Collection of correctly hashed and signed Transactions which can be used to test circuits or opcodes that have to check integrity of the Tx itself. + /// Some of the parameters of the Tx are hardcoded such as `nonce`, `value`, `gas_price` etc... + pub static ref CORRECT_MOCK_TXS: Vec = { + let mut rng = ChaCha20Rng::seed_from_u64(2u64); + + vec![MockTransaction::default() + .from(AddrOrWallet::random(&mut rng)) + .to(MOCK_ACCOUNTS[0]) + .nonce(0x103u64) + .value(word!("0x3e8")) + .gas_price(word!("0x4d2")) + .input(Bytes::from(b"hello")) + .build(), + MockTransaction::default() + .from(AddrOrWallet::random(&mut rng)) + .to(MOCK_ACCOUNTS[1]) + .nonce(0x104u64) + .value(word!("0x3e8")) + .gas_price(word!("0x4d2")) + .input(Bytes::from(b"hello")) + .build(), + MockTransaction::default() + .from(AddrOrWallet::random(&mut rng)) + .to(MOCK_ACCOUNTS[2]) + .nonce(0x105u64) + .value(word!("0x3e8")) + .gas_price(word!("0x4d2")) + .input(Bytes::from(b"hello")) + .build(), + MockTransaction::default() + .from(AddrOrWallet::random(&mut rng)) + .to(MOCK_ACCOUNTS[0]) + .nonce(0x106u64) + .value(word!("0x3e8")) + .gas_price(word!("0x4d2")) + .input(Bytes::from(b"hello")) + .build(),] + }; +} + +#[derive(Debug, Clone)] +pub enum AddrOrWallet { + Addr(Address), + Wallet(LocalWallet), +} + +impl Default for AddrOrWallet { + fn default() -> Self { + AddrOrWallet::Addr(Address::default()) + } +} + +impl From
for AddrOrWallet { + fn from(addr: Address) -> Self { + AddrOrWallet::Addr(addr) + } +} + +impl From for AddrOrWallet { + fn from(wallet: LocalWallet) -> Self { + AddrOrWallet::Wallet(wallet) + } +} + +impl AddrOrWallet { + /// Generates a random Wallet from a random secpk256 keypair + pub fn random(rng: &mut R) -> Self { + AddrOrWallet::Wallet(LocalWallet::new(rng)) + } +} + +impl AddrOrWallet { + /// Returns the underlying address associated to the `AddrOrWallet` enum. + pub fn address(&self) -> Address { + match self { + Self::Addr(addr) => *addr, + Self::Wallet(wallet) => wallet.address(), + } + } + + /// Returns true if the enum variant of `self` corresponds to a + /// [`LocalWallet`] structure and not simply and [`Address`]. + const fn is_wallet(&self) -> bool { + matches!(self, Self::Wallet(_)) + } + + /// Returns the underlying wallet stored in the enum. + /// # Panics + /// This function will panic if the enum does not contain a [`LocalWallet`] + /// and instead contains the [`Address`] variant. + pub fn as_wallet(&self) -> LocalWallet { + match self { + Self::Wallet(wallet) => wallet.to_owned(), + _ => panic!("Broken AddrOrWallet invariant"), + } + } +} + +#[derive(Debug, Clone)] +/// Mock structure which represents a Transaction and can be used for tests. +/// It contains all the builder-pattern methods required to be able to specify +/// any of it's details. +pub struct MockTransaction { + pub hash: Option, + pub nonce: u64, + pub block_hash: Hash, + pub block_number: U64, + pub transaction_index: U64, + pub from: AddrOrWallet, + pub to: Option, + pub value: Word, + // gas_price == min(max_fee_per_gas, max_priority_fee_per_gas + base_fee_per_gas) + pub gas_price: Word, + pub gas: Word, + pub input: Bytes, + pub v: Option, + pub r: Option, + pub s: Option, + pub transaction_type: U64, + pub access_list: AccessList, + pub max_priority_fee_per_gas: Word, + pub max_fee_per_gas: Word, + pub chain_id: Word, +} + +impl Default for MockTransaction { + fn default() -> Self { + MockTransaction { + hash: None, + nonce: 0, + block_hash: Hash::zero(), + block_number: U64::zero(), + transaction_index: U64::zero(), + from: AddrOrWallet::Addr(MOCK_ACCOUNTS[0]), + to: None, + value: Word::zero(), + gas_price: *MOCK_GASPRICE, + gas: Word::from(1_000_000u64), + input: Bytes::default(), + v: None, + r: None, + s: None, + transaction_type: U64::zero(), + access_list: AccessList::default(), + max_priority_fee_per_gas: *MOCK_GASTIPCAP, + max_fee_per_gas: *MOCK_GASFEECAP, + chain_id: *MOCK_CHAIN_ID, + } + } +} + +impl From for Transaction { + fn from(mock: MockTransaction) -> Self { + Transaction { + hash: mock.hash.unwrap_or_default(), + nonce: mock.nonce.into(), + block_hash: Some(mock.block_hash), + block_number: Some(mock.block_number), + transaction_index: Some(mock.transaction_index), + from: mock.from.address(), + to: mock.to.map(|addr| addr.address()), + value: mock.value, + gas_price: Some(mock.gas_price), + gas: mock.gas, + input: mock.input, + v: mock.v.unwrap_or_default(), + r: mock.r.unwrap_or_default(), + s: mock.s.unwrap_or_default(), + transaction_type: Some(mock.transaction_type), + access_list: Some(mock.access_list), + max_priority_fee_per_gas: Some(mock.max_priority_fee_per_gas), + max_fee_per_gas: Some(mock.max_fee_per_gas), + chain_id: Some(mock.chain_id), + other: OtherFields::default(), + } + } +} + +impl From for GethTransaction { + fn from(mock: MockTransaction) -> Self { + GethTransaction::from(&Transaction::from(mock)) + } +} + +impl MockTransaction { + /// create a mock anchor transaction + pub fn new_anchor() -> Self { + let mut tx = MockTransaction::default(); + tx.from(*GOLDEN_TOUCH); + tx.to(*MOCK_TAIKO_L2_ADDRESS); + tx.gas(*MOCK_ANCHOR_GAS_LIMIT) + .gas_price(*MOCK_ANCHOR_GAS_PRICE) + .from(*GOLDEN_TOUCH) + .to(*MOCK_TAIKO_L2_ADDRESS) + .input(crate::anchor::anchor_call()) + .nonce(0) + .value(*MOCK_ANCHOR_TX_VALUE); + crate::anchor::sign(&mut tx); + tx + } +} + +impl MockTransaction { + /// Tx Hash computed based on the fields of the Tx by + /// default unless `Some(hash)` is specified on build process. + pub fn hash(&mut self, hash: Hash) -> &mut Self { + self.hash = Some(hash); + self + } + + /// Set nonce field for the MockTransaction. + pub fn nonce(&mut self, nonce: u64) -> &mut Self { + self.nonce = nonce; + self + } + + /// Set block_hash field for the MockTransaction. + pub fn block_hash(&mut self, block_hash: Hash) -> &mut Self { + self.block_hash = block_hash; + self + } + + /// Set block_number field for the MockTransaction. + pub fn block_number(&mut self, block_number: u64) -> &mut Self { + self.block_number = U64::from(block_number); + self + } + + /// Set transaction_idx field for the MockTransaction. + pub fn transaction_idx(&mut self, transaction_idx: u64) -> &mut Self { + self.transaction_index = U64::from(transaction_idx); + self + } + + /// Set from field for the MockTransaction. + pub fn from>(&mut self, from: T) -> &mut Self { + self.from = from.into(); + self + } + + /// Set to field for the MockTransaction. + pub fn to>(&mut self, to: T) -> &mut Self { + self.to = Some(to.into()); + self + } + + /// Set value field for the MockTransaction. + pub fn value(&mut self, value: Word) -> &mut Self { + self.value = value; + self + } + + /// Set gas_price field for the MockTransaction. + pub fn gas_price(&mut self, gas_price: Word) -> &mut Self { + self.gas_price = gas_price; + self + } + + /// Set gas field for the MockTransaction. + pub fn gas(&mut self, gas: Word) -> &mut Self { + self.gas = gas; + self + } + + /// Set input field for the MockTransaction. + pub fn input(&mut self, input: Bytes) -> &mut Self { + self.input = input; + self + } + + /// Set sig_data field for the MockTransaction. + pub fn sig_data(&mut self, data: (u64, Word, Word)) -> &mut Self { + self.v = Some(U64::from(data.0)); + self.r = Some(data.1); + self.s = Some(data.2); + self + } + + /// Set transaction_type field for the MockTransaction. + pub fn transaction_type(&mut self, transaction_type: u64) -> &mut Self { + self.transaction_type = U64::from(transaction_type); + self + } + + /// Set access_list field for the MockTransaction. + pub fn access_list(&mut self, access_list: AccessList) -> &mut Self { + self.access_list = access_list; + self + } + + /// Set max_priority_fee_per_gas field for the MockTransaction. + pub fn max_priority_fee_per_gas(&mut self, max_priority_fee_per_gas: Word) -> &mut Self { + self.max_priority_fee_per_gas = max_priority_fee_per_gas; + self + } + + /// Set max_fee_per_gas field for the MockTransaction. + pub fn max_fee_per_gas(&mut self, max_fee_per_gas: Word) -> &mut Self { + self.max_fee_per_gas = max_fee_per_gas; + self + } + + /// Set chain_id field for the MockTransaction. + pub(crate) fn chain_id(&mut self, chain_id: Word) -> &mut Self { + self.chain_id = chain_id; + self + } + + /// Consumes the mutable ref to the MockTransaction returning the structure + /// by value. + pub fn build(&mut self) -> Self { + let tx = TransactionRequest::new() + .from(self.from.address()) + .to(self.to.clone().unwrap_or_default().address()) + .nonce(self.nonce) + .value(self.value) + .data(self.input.clone()) + .gas(self.gas) + .gas_price(self.gas_price) + .chain_id(self.chain_id.low_u64()); + + match (self.v, self.r, self.s) { + (None, None, None) => { + // Compute sig params and set them in case we have a wallet as `from` attr. + if self.from.is_wallet() && self.hash.is_none() { + let sig = self + .from + .as_wallet() + .with_chain_id(self.chain_id.low_u64()) + .sign_transaction_sync(&tx.into()); + // Set sig parameters + self.sig_data((sig.v, sig.r, sig.s)); + } + } + (Some(_), Some(_), Some(_)) => (), + _ => panic!("Either all or none of the SigData params have to be set"), + } + + // Compute tx hash in case is not already set + if self.hash.is_none() { + let tmp_tx = Transaction::from(self.to_owned()); + self.hash(tmp_tx.hash()); + } + + self.to_owned() + } +} From c973c782c08fc43899c40add42f350ca89a75041 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 3 Aug 2023 09:16:10 +0000 Subject: [PATCH 07/55] fix: add l2 contract address into mock data --- mock-taiko/src/test_ctx.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mock-taiko/src/test_ctx.rs b/mock-taiko/src/test_ctx.rs index a7594eb385..2e3f33e24d 100644 --- a/mock-taiko/src/test_ctx.rs +++ b/mock-taiko/src/test_ctx.rs @@ -1,6 +1,6 @@ //! Mock types and functions to generate Test enviroments for ZKEVM tests -use crate::{eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH}; +use crate::{eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_TAIKO_L2_ADDRESS}; use eth_types::{ geth_types::{Account, BlockConstants, GethData}, Block, Bytecode, Error, GethExecTrace, Transaction, Word, @@ -116,31 +116,34 @@ impl TestContext { Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, FAcc: FnOnce([&mut MockAccount; NACC]), { + let mut accounts: Vec = vec![MockAccount::default(); NACC + 2]; // add the GOLDEN_TOUCH account in the first position - let mut accounts: Vec = vec![MockAccount::default(); NACC + 1]; accounts[0].address(*GOLDEN_TOUCH); + // add the l2 contract account in the second position + accounts[1].address(*MOCK_TAIKO_L2_ADDRESS); // Build Accounts modifiers let account_refs = accounts .iter_mut() - .skip(1) + .skip(2) .collect_vec() .try_into() .expect("Mismatched len err"); acc_fns(account_refs); let accounts: [MockAccount; NACC] = accounts .iter_mut() - .skip(1) + .skip(2) .map(|acc| acc.build()) .collect_vec() .try_into() .expect("Mismatched acc len"); - // add the anchor transaction in the first position let mut transactions = vec![MockTransaction::default(); NTX + 1]; // By default, set the TxIndex and the Nonce values of the multiple transactions // of the context correlative so that any Ok test passes by default. // If the user decides to override these values, they'll then be set to whatever // inputs were provided by the user. + + // add the anchor transaction in the first position transactions[0] = MockTransaction::new_anchor(); transactions .iter_mut() From 61798cd9f3573e05eedff57b79cef366537ecd3f Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 7 Aug 2023 09:48:16 +0000 Subject: [PATCH 08/55] feat: use taiko-geth for evm execution --- Cargo.lock | 60 +- Cargo.toml | 4 +- .../.gitignore | 0 taiko-external-tracer/Cargo.toml | 12 + taiko-external-tracer/src/lib.rs | 77 + taiko-geth-utils/Cargo.toml | 10 + taiko-geth-utils/README.md | 29 + taiko-geth-utils/build.rs | 51 + taiko-geth-utils/example/add_sub.go | 31 + taiko-geth-utils/example/msize.go | 31 + taiko-geth-utils/example/mstore_mload.go | 31 + taiko-geth-utils/example/sstore_sload.go | 31 + taiko-geth-utils/gethutil/asm.go | 231 +++ taiko-geth-utils/gethutil/trace.go | 238 +++ taiko-geth-utils/gethutil/util.go | 85 + taiko-geth-utils/go.mod | 13 + taiko-geth-utils/go.sum | 1388 +++++++++++++++++ taiko-geth-utils/lib/lib.go | 42 + taiko-geth-utils/src/lib.rs | 156 ++ taiko-mock/.gitignore | 1 + {mock-taiko => taiko-mock}/Cargo.toml | 4 +- {mock-taiko => taiko-mock}/src/account.rs | 0 {mock-taiko => taiko-mock}/src/anchor.rs | 0 {mock-taiko => taiko-mock}/src/block.rs | 0 {mock-taiko => taiko-mock}/src/lib.rs | 5 +- {mock-taiko => taiko-mock}/src/test_ctx.rs | 26 +- {mock-taiko => taiko-mock}/src/transaction.rs | 0 zkevm-circuits/Cargo.toml | 1 + .../src/evm_circuit/execution/begin_tx.rs | 4 +- zkevm-circuits/src/lib.rs | 3 + zkevm-circuits/src/taiko_test_util.rs | 236 +++ 31 files changed, 2756 insertions(+), 44 deletions(-) rename {mock-taiko => taiko-external-tracer}/.gitignore (100%) create mode 100644 taiko-external-tracer/Cargo.toml create mode 100644 taiko-external-tracer/src/lib.rs create mode 100644 taiko-geth-utils/Cargo.toml create mode 100644 taiko-geth-utils/README.md create mode 100644 taiko-geth-utils/build.rs create mode 100644 taiko-geth-utils/example/add_sub.go create mode 100644 taiko-geth-utils/example/msize.go create mode 100644 taiko-geth-utils/example/mstore_mload.go create mode 100644 taiko-geth-utils/example/sstore_sload.go create mode 100644 taiko-geth-utils/gethutil/asm.go create mode 100644 taiko-geth-utils/gethutil/trace.go create mode 100644 taiko-geth-utils/gethutil/util.go create mode 100644 taiko-geth-utils/go.mod create mode 100644 taiko-geth-utils/go.sum create mode 100644 taiko-geth-utils/lib/lib.go create mode 100644 taiko-geth-utils/src/lib.rs create mode 100644 taiko-mock/.gitignore rename {mock-taiko => taiko-mock}/Cargo.toml (86%) rename {mock-taiko => taiko-mock}/src/account.rs (100%) rename {mock-taiko => taiko-mock}/src/anchor.rs (100%) rename {mock-taiko => taiko-mock}/src/block.rs (100%) rename {mock-taiko => taiko-mock}/src/lib.rs (98%) rename {mock-taiko => taiko-mock}/src/test_ctx.rs (94%) rename {mock-taiko => taiko-mock}/src/transaction.rs (100%) create mode 100644 zkevm-circuits/src/taiko_test_util.rs diff --git a/Cargo.lock b/Cargo.lock index f69b0d387d..03ec375d6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2909,26 +2909,6 @@ dependencies = [ "rand_chacha", ] -[[package]] -name = "mock-taiko" -version = "0.1.0" -dependencies = [ - "eth-types", - "ethers-core", - "ethers-signers", - "external-tracer", - "halo2_proofs 0.2.0", - "itertools", - "lazy_static", - "libsecp256k1", - "num", - "num-bigint", - "once_cell", - "rand", - "rand_chacha", - "sha3 0.10.7", -] - [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -4583,6 +4563,45 @@ dependencies = [ "regex", ] +[[package]] +name = "taiko-external-tracer" +version = "0.1.0" +dependencies = [ + "eth-types", + "serde", + "serde_json", + "taiko-geth-utils", +] + +[[package]] +name = "taiko-geth-utils" +version = "0.1.0" +dependencies = [ + "env_logger", + "gobuild", + "log", +] + +[[package]] +name = "taiko-mock" +version = "0.1.0" +dependencies = [ + "eth-types", + "ethers-core", + "ethers-signers", + "halo2_proofs 0.2.0", + "itertools", + "lazy_static", + "libsecp256k1", + "num", + "num-bigint", + "once_cell", + "rand", + "rand_chacha", + "sha3 0.10.7", + "taiko-external-tracer", +] + [[package]] name = "tap" version = "1.0.1" @@ -5449,4 +5468,5 @@ dependencies = [ "snark-verifier-sdk", "strum", "strum_macros", + "taiko-mock", ] diff --git a/Cargo.toml b/Cargo.toml index c2d92a118e..f5da9fb836 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,14 +3,16 @@ members = [ "zkevm-circuits", "bus-mapping", "geth-utils", + "taiko-geth-utils", "keccak256", "gadgets", "integration-tests", "circuit-benchmarks", "eth-types", "external-tracer", + "taiko-external-tracer", "mock", - "mock-taiko", + "taiko-mock", "testool", ] diff --git a/mock-taiko/.gitignore b/taiko-external-tracer/.gitignore similarity index 100% rename from mock-taiko/.gitignore rename to taiko-external-tracer/.gitignore diff --git a/taiko-external-tracer/Cargo.toml b/taiko-external-tracer/Cargo.toml new file mode 100644 index 0000000000..c4e0e3db17 --- /dev/null +++ b/taiko-external-tracer/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "taiko-external-tracer" +version = "0.1.0" +edition = "2021" +authors = ["The appliedzkp team"] +license = "MIT OR Apache-2.0" + +[dependencies] +eth-types = { path = "../eth-types" } +taiko-geth-utils = { path = "../taiko-geth-utils" } +serde = { version = "1.0.130", features = ["derive"] } +serde_json = "1.0.66" diff --git a/taiko-external-tracer/src/lib.rs b/taiko-external-tracer/src/lib.rs new file mode 100644 index 0000000000..9fb9d4fde2 --- /dev/null +++ b/taiko-external-tracer/src/lib.rs @@ -0,0 +1,77 @@ +//! This module generates traces by connecting to an external tracer + +use eth_types::{ + geth_types::{Account, BlockConstants, Transaction}, + Address, Error, GethExecTrace, Word, +}; +use serde::Serialize; +use std::collections::HashMap; + +/// Configuration structure for `geth_utlis::trace` +#[derive(Debug, Default, Clone, Serialize)] +pub struct TraceConfig { + /// chain id + pub chain_id: Word, + /// history hashes contains most recent 256 block hashes in history, where + /// the lastest one is at history_hashes[history_hashes.len() - 1]. + pub history_hashes: Vec, + /// block constants + pub block_constants: BlockConstants, + /// accounts + pub accounts: HashMap, + /// transaction + pub transactions: Vec, + /// logger + pub logger_config: LoggerConfig, +} + +/// Configuration structure for `logger.Config` +#[derive(Debug, Clone, Serialize)] +pub struct LoggerConfig { + /// enable memory capture + #[serde(rename = "EnableMemory")] + pub enable_memory: bool, + /// disable stack capture + #[serde(rename = "DisableStack")] + pub disable_stack: bool, + /// disable storage capture + #[serde(rename = "DisableStorage")] + pub disable_storage: bool, + /// enable return data capture + #[serde(rename = "EnableReturnData")] + pub enable_return_data: bool, +} + +impl Default for LoggerConfig { + fn default() -> Self { + Self { + enable_memory: false, + disable_stack: false, + disable_storage: false, + enable_return_data: true, + } + } +} + +impl LoggerConfig { + pub fn enable_memory() -> Self { + Self { + enable_memory: true, + ..Self::default() + } + } +} + +/// Creates a trace for the specified config +pub fn trace(config: &TraceConfig) -> Result, Error> { + // Get the trace + let trace_string = + taiko_geth_utils::trace(&serde_json::to_string(&config).unwrap()).map_err(|error| { + match error { + taiko_geth_utils::Error::TracingError(error) => Error::TracingError(error), + } + })?; + + let trace = serde_json::from_str(&trace_string).map_err(Error::SerdeError)?; + Ok(trace) +} diff --git a/taiko-geth-utils/Cargo.toml b/taiko-geth-utils/Cargo.toml new file mode 100644 index 0000000000..cbd583195d --- /dev/null +++ b/taiko-geth-utils/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "taiko-geth-utils" +version = "0.1.0" +edition = "2021" +license = "MIT OR Apache-2.0" + +[build-dependencies] +gobuild = "0.1.0-alpha.1" +log = "0.4.14" +env_logger = "0.9" diff --git a/taiko-geth-utils/README.md b/taiko-geth-utils/README.md new file mode 100644 index 0000000000..91e2040dba --- /dev/null +++ b/taiko-geth-utils/README.md @@ -0,0 +1,29 @@ +# Go Ethereum Utility + +The module `gethutil` tried to provide identical output from APIs `debug_trace*` of latest `geth` as test vectors for [`zkevm-circuits`](https://github.com/privacy-scaling-explorations/zkevm-circuits). + +## Usage + + + + +### Library Usage + +For [`./example/mstore_mload.go`](./example/mstore_mload.go) as an example, it defines bytecode directly by builder `asm`, then write the logs produced by `TraceTx` to stdout. To reproduce the logs, run: + +```bash +go run ./example/mstore_mload.go > ./mstore_mload.json +``` + +### Debugging + +The execution traces returned by geth omit some information like execution +errors in some situations. Moreover you may want to inspect some intermediate +values of the EVM execution for debugging purposes. + +Print debugging can be easily achieved by replacing the dependency of `go-ethereum` by a local copy of the repository. Just clone `go-ethereum` into a folder next to the `zkevm-circuits` repository, and uncomment the following line in `go.mod`: +``` +replace github.com/ethereum/go-ethereum => ../../go-ethereum +``` + +Now you can add print logs in your `go-ethereum` copy as necessary. diff --git a/taiko-geth-utils/build.rs b/taiko-geth-utils/build.rs new file mode 100644 index 0000000000..7bf64f596a --- /dev/null +++ b/taiko-geth-utils/build.rs @@ -0,0 +1,51 @@ +use std::{ + env, + io::{self, Write}, +}; + +fn main() { + let lib_name = "go-geth-utils"; + let out_dir = env::var("OUT_DIR").unwrap(); + + // Build + if let Err(e) = gobuild::Build::new() + .file("./lib/lib.go") + .try_compile(lib_name) + { + // The error type is private so have to check the error string + if format!("{}", e).starts_with("Failed to find tool.") { + fail( + " Failed to find Go. Please install Go 1.16 or later \ + following the instructions at https://golang.org/doc/install. + On linux it is also likely available as a package." + .to_string(), + ); + } else { + fail(format!("{}", e)); + } + } + + // Files the lib depends on that should recompile the lib + let dep_files = vec![ + "./gethutil/asm.go", + "./gethutil/trace.go", + "./gethutil/util.go", + "./go.mod", + ]; + for file in dep_files { + println!("cargo:rerun-if-changed={}", file); + } + + // Link + println!("cargo:rustc-link-search=native={}", out_dir); + println!("cargo:rustc-link-lib=static={}", lib_name); +} + +fn fail(message: String) { + let _ = writeln!( + io::stderr(), + "\n\nError while building geth-utils: {}\n\n", + message + ); + std::process::exit(1); +} diff --git a/taiko-geth-utils/example/add_sub.go b/taiko-geth-utils/example/add_sub.go new file mode 100644 index 0000000000..d58a3e033a --- /dev/null +++ b/taiko-geth-utils/example/add_sub.go @@ -0,0 +1,31 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + "github.com/ethereum/go-ethereum/common" + + "main/gethutil" +) + +func main() { + address := common.BytesToAddress([]byte{0xff}) + assembly := gethutil.NewAssembly().Add(0xdeadbeef, 0xcafeb0ba).Sub(0xfaceb00c, 0xb0bacafe) + + accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} + tx := gethutil.Transaction{To: &address, GasLimit: 21100} + + result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) + if err != nil { + fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) + } + + bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") + if err != nil { + fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) + } + + fmt.Fprintln(os.Stdout, string(bytes)) +} diff --git a/taiko-geth-utils/example/msize.go b/taiko-geth-utils/example/msize.go new file mode 100644 index 0000000000..9c13f85d76 --- /dev/null +++ b/taiko-geth-utils/example/msize.go @@ -0,0 +1,31 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + "github.com/ethereum/go-ethereum/common" + + "main/gethutil" +) + +func main() { + address := common.BytesToAddress([]byte{0xff}) + assembly := gethutil.NewAssembly().MStore(0x40, 0x80).MSize().Stop() + + accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} + tx := gethutil.Transaction{To: &address, GasLimit: 21100} + + result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) + if err != nil { + fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) + } + + bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") + if err != nil { + fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) + } + + fmt.Fprintln(os.Stdout, string(bytes)) +} diff --git a/taiko-geth-utils/example/mstore_mload.go b/taiko-geth-utils/example/mstore_mload.go new file mode 100644 index 0000000000..ecfc6d91b5 --- /dev/null +++ b/taiko-geth-utils/example/mstore_mload.go @@ -0,0 +1,31 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + "github.com/ethereum/go-ethereum/common" + + "main/gethutil" +) + +func main() { + address := common.BytesToAddress([]byte{0xff}) + assembly := gethutil.NewAssembly().MStore(0x40, 0x80).MLoad(0x40) + + accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} + tx := gethutil.Transaction{To: &address, GasLimit: 21100} + + result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) + if err != nil { + fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) + } + + bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") + if err != nil { + fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) + } + + fmt.Fprintln(os.Stdout, string(bytes)) +} diff --git a/taiko-geth-utils/example/sstore_sload.go b/taiko-geth-utils/example/sstore_sload.go new file mode 100644 index 0000000000..b3bc8a672e --- /dev/null +++ b/taiko-geth-utils/example/sstore_sload.go @@ -0,0 +1,31 @@ +package main + +import ( + "encoding/json" + "fmt" + "os" + + "github.com/ethereum/go-ethereum/common" + + "main/gethutil" +) + +func main() { + address := common.BytesToAddress([]byte{0xff}) + assembly := gethutil.NewAssembly().SStore(0, 0xcafeb0ba).SLoad(0).SStore(0, 0xdeabbeef).SLoad(0) + + accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} + tx := gethutil.Transaction{To: &address, GasLimit: 46000} + + result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) + if err != nil { + fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) + } + + bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") + if err != nil { + fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) + } + + fmt.Fprintln(os.Stdout, string(bytes)) +} diff --git a/taiko-geth-utils/gethutil/asm.go b/taiko-geth-utils/gethutil/asm.go new file mode 100644 index 0000000000..b5546f876a --- /dev/null +++ b/taiko-geth-utils/gethutil/asm.go @@ -0,0 +1,231 @@ +package gethutil + +import ( + "fmt" + "io" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum/core/vm" +) + +type Asm struct { + bytecode []byte + labelMap map[string]int + pendingLabelsMap map[string][]int +} + +func NewAssembly() *Asm { + return &Asm{ + labelMap: make(map[string]int), + pendingLabelsMap: make(map[string][]int), + } +} + +func (a *Asm) Bytecode() []byte { + if len(a.pendingLabelsMap) > 0 { + pendingLabels := make([]string, 0, len(a.pendingLabelsMap)) + for pendingLabel := range a.pendingLabelsMap { + pendingLabels = append(pendingLabels, pendingLabel) + } + panic(fmt.Sprintf("pending labels are not defined yet: %v", strings.Join(pendingLabels, ", "))) + } + return a.bytecode +} + +func (a *Asm) PrintMnemonics(out io.Writer) { + for idx := 0; idx < len(a.bytecode); { + code := vm.OpCode(a.bytecode[idx]) + if code.IsPush() { + n := int(code) - int(vm.PUSH1) + 1 + fmt.Fprintf(out, "%02d\t%s\t0x%x\n", idx, code.String(), a.bytecode[idx+1:idx+1+n]) + idx += n + 1 + } else { + fmt.Fprintf(out, "%02d\t%s\n", idx, code.String()) + idx++ + } + } +} + +// 0x0 range +func (a *Asm) Stop() *Asm { return a.appendByte(vm.STOP) } +func (a *Asm) Add(v ...interface{}) *Asm { return a.opWithPush(vm.ADD, v...) } +func (a *Asm) Mul(v ...interface{}) *Asm { return a.opWithPush(vm.MUL, v...) } +func (a *Asm) Sub(v ...interface{}) *Asm { return a.opWithPush(vm.SUB, v...) } +func (a *Asm) Div(v ...interface{}) *Asm { return a.opWithPush(vm.DIV, v...) } +func (a *Asm) SDiv(v ...interface{}) *Asm { return a.opWithPush(vm.SDIV, v...) } +func (a *Asm) Mod(v ...interface{}) *Asm { return a.opWithPush(vm.MOD, v...) } +func (a *Asm) SMod(v ...interface{}) *Asm { return a.opWithPush(vm.SMOD, v...) } +func (a *Asm) AddMod(v ...interface{}) *Asm { return a.opWithPush(vm.ADDMOD, v...) } +func (a *Asm) MulMod(v ...interface{}) *Asm { return a.opWithPush(vm.MULMOD, v...) } +func (a *Asm) Exp(v ...interface{}) *Asm { return a.opWithPush(vm.EXP, v...) } +func (a *Asm) SignExtend(v ...interface{}) *Asm { return a.opWithPush(vm.SIGNEXTEND, v...) } + +// 0x10 range +func (a *Asm) Lt(v ...interface{}) *Asm { return a.opWithPush(vm.LT, v...) } +func (a *Asm) Gt(v ...interface{}) *Asm { return a.opWithPush(vm.GT, v...) } +func (a *Asm) SLt(v ...interface{}) *Asm { return a.opWithPush(vm.SLT, v...) } +func (a *Asm) SGt(v ...interface{}) *Asm { return a.opWithPush(vm.SGT, v...) } +func (a *Asm) Eq(v ...interface{}) *Asm { return a.opWithPush(vm.EQ, v...) } +func (a *Asm) IsZero(v ...interface{}) *Asm { return a.opWithPush(vm.ISZERO, v...) } +func (a *Asm) And(v ...interface{}) *Asm { return a.opWithPush(vm.AND, v...) } +func (a *Asm) Or(v ...interface{}) *Asm { return a.opWithPush(vm.OR, v...) } +func (a *Asm) Xor(v ...interface{}) *Asm { return a.opWithPush(vm.XOR, v...) } +func (a *Asm) Not(v ...interface{}) *Asm { return a.opWithPush(vm.NOT, v...) } +func (a *Asm) Byte(v ...interface{}) *Asm { return a.opWithPush(vm.BYTE, v...) } +func (a *Asm) Shl(v ...interface{}) *Asm { return a.opWithPush(vm.SHL, v...) } +func (a *Asm) Shr(v ...interface{}) *Asm { return a.opWithPush(vm.SHR, v...) } +func (a *Asm) Sar(v ...interface{}) *Asm { return a.opWithPush(vm.SAR, v...) } +func (a *Asm) Sha3(v ...interface{}) *Asm { return a.opWithPush(vm.KECCAK256, v...) } + +// 0x30 range +func (a *Asm) Address() *Asm { return a.appendByte(vm.ADDRESS) } +func (a *Asm) Balance(v ...interface{}) *Asm { return a.opWithPush(vm.BALANCE, v...) } +func (a *Asm) Origin() *Asm { return a.appendByte(vm.ORIGIN) } +func (a *Asm) Caller() *Asm { return a.appendByte(vm.CALLER) } +func (a *Asm) CallValue() *Asm { return a.appendByte(vm.CALLVALUE) } +func (a *Asm) CallDataLoad(v ...interface{}) *Asm { return a.opWithPush(vm.CALLDATALOAD, v...) } +func (a *Asm) CallDataSize() *Asm { return a.appendByte(vm.CALLDATASIZE) } +func (a *Asm) CallDataCopy(v ...interface{}) *Asm { return a.opWithPush(vm.CALLDATACOPY, v...) } +func (a *Asm) CodeSize() *Asm { return a.appendByte(vm.CODESIZE) } +func (a *Asm) CodeCopy(v ...interface{}) *Asm { return a.opWithPush(vm.CODECOPY, v...) } +func (a *Asm) GasPrice() *Asm { return a.appendByte(vm.GASPRICE) } +func (a *Asm) ExtCodeSize(v ...interface{}) *Asm { return a.opWithPush(vm.EXTCODESIZE, v...) } +func (a *Asm) ExtCodeCopy(v ...interface{}) *Asm { return a.opWithPush(vm.EXTCODECOPY, v...) } +func (a *Asm) ReturnDataSize() *Asm { return a.appendByte(vm.RETURNDATASIZE) } +func (a *Asm) ReturnDataCopy(v ...interface{}) *Asm { return a.opWithPush(vm.RETURNDATACOPY, v...) } +func (a *Asm) ExtCodeHash(v ...interface{}) *Asm { return a.opWithPush(vm.EXTCODEHASH, v...) } + +// 0x40 range +func (a *Asm) BlockHash(v ...interface{}) *Asm { return a.opWithPush(vm.BLOCKHASH, v...) } +func (a *Asm) Coinbase() *Asm { return a.appendByte(vm.COINBASE) } +func (a *Asm) Timestamp() *Asm { return a.appendByte(vm.TIMESTAMP) } +func (a *Asm) Number() *Asm { return a.appendByte(vm.NUMBER) } +func (a *Asm) Difficulty() *Asm { return a.appendByte(vm.DIFFICULTY) } +func (a *Asm) GasLimit() *Asm { return a.appendByte(vm.GASLIMIT) } +func (a *Asm) ChainID() *Asm { return a.appendByte(vm.CHAINID) } +func (a *Asm) SelfBalance() *Asm { return a.appendByte(vm.SELFBALANCE) } +func (a *Asm) BaseFee() *Asm { return a.appendByte(vm.BASEFEE) } + +// 0x50 range +func (a *Asm) Pop() *Asm { return a.appendByte(vm.POP) } +func (a *Asm) MLoad(v ...interface{}) *Asm { return a.opWithPush(vm.MLOAD, v...) } +func (a *Asm) MStore(v ...interface{}) *Asm { return a.opWithPush(vm.MSTORE, v...) } +func (a *Asm) MStore8(v ...interface{}) *Asm { return a.opWithPush(vm.MSTORE8, v...) } +func (a *Asm) SLoad(v ...interface{}) *Asm { return a.opWithPush(vm.SLOAD, v...) } +func (a *Asm) SStore(v ...interface{}) *Asm { return a.opWithPush(vm.SSTORE, v...) } +func (a *Asm) Jump(label ...string) *Asm { return a.jump(vm.JUMP, label...) } +func (a *Asm) JumpI(label ...string) *Asm { return a.jump(vm.JUMPI, label...) } +func (a *Asm) PC() *Asm { return a.appendByte(vm.PC) } +func (a *Asm) MSize() *Asm { return a.appendByte(vm.MSIZE) } +func (a *Asm) Gas() *Asm { return a.appendByte(vm.GAS) } +func (a *Asm) JumpDest(label ...string) *Asm { return a.jumpDest(label...) } + +// 0x60 range +func (a *Asm) PushX(val interface{}) *Asm { return a.push(val) } +func (a *Asm) DupX(x int) *Asm { + rangeCheck(x, 1, 16, "X") + return a.appendByte(int(vm.DUP1) + x - 1) +} +func (a *Asm) SwapX(x int) *Asm { + rangeCheck(x, 1, 16, "X") + return a.appendByte(int(vm.SWAP1) + x - 1) +} + +// 0xa0 range +func (a *Asm) LogX(x int) *Asm { + rangeCheck(x, 0, 5, "X") + return a.appendByte(int(vm.LOG0) + x) +} + +// 0xf0 range +func (a *Asm) Create(v ...interface{}) *Asm { return a.opWithPush(vm.CREATE, v...) } +func (a *Asm) Call(v ...interface{}) *Asm { return a.opWithPush(vm.CALL, v...) } +func (a *Asm) CallCode(v ...interface{}) *Asm { return a.opWithPush(vm.CALLCODE, v...) } +func (a *Asm) Return(v ...interface{}) *Asm { return a.opWithPush(vm.RETURN, v...) } +func (a *Asm) DelegateCall(v ...interface{}) *Asm { return a.opWithPush(vm.DELEGATECALL, v...) } +func (a *Asm) Create2(v ...interface{}) *Asm { return a.opWithPush(vm.CREATE2, v...) } +func (a *Asm) StaticCall(v ...interface{}) *Asm { return a.opWithPush(vm.STATICCALL, v...) } +func (a *Asm) Revert(v ...interface{}) *Asm { return a.opWithPush(vm.REVERT, v...) } +func (a *Asm) SelfDestruct() *Asm { return a.appendByte(vm.SELFDESTRUCT) } + +func (a *Asm) jump(op vm.OpCode, label ...string) *Asm { + if len(label) > 0 { + rangeCheck(len(label), 1, 1, "len(label)") + + if pos, ok := a.labelMap[label[0]]; ok { + a.PushX(pos) + } else { + a.pendingLabelsMap[label[0]] = append(a.pendingLabelsMap[label[0]], len(a.bytecode)) + a.PushX([]byte{0, 0, 0}) + } + } + + return a.appendByte(op) +} + +func (a *Asm) jumpDest(label ...string) *Asm { + a.appendByte(vm.JUMPDEST) + + if len(label) > 0 { + rangeCheck(len(label), 1, 1, "len(label)") + + if _, ok := a.labelMap[label[0]]; ok { + panic("label already defined") + } + + a.labelMap[label[0]] = len(a.bytecode) + + pos := big.NewInt(int64(len(a.bytecode) - 1)).Bytes() + if len(pos) < 3 { + pos = append(make([]byte, 3-len(pos)), pos...) + } + for _, pendingLabel := range a.pendingLabelsMap[label[0]] { + copy(a.bytecode[pendingLabel+1:pendingLabel+4], pos) + } + + delete(a.pendingLabelsMap, label[0]) + } + + return a +} + +func (a *Asm) opWithPush(op vm.OpCode, v ...interface{}) *Asm { + opPushRangeCheck(op, len(v)) + return a.pushRev(v...).appendByte(op) +} + +func (a *Asm) push(v ...interface{}) *Asm { + for _, v := range v { + bytes := toBytes(v) + + rangeCheck(len(bytes), 1, 32, "len(bytes)") + a.appendByte(int(vm.PUSH1) + len(bytes) - 1) + + for _, b := range bytes { + a.appendByte(b) + } + } + + return a +} + +func (a *Asm) pushRev(v ...interface{}) *Asm { + reverse(v) + return a.push(v...) +} + +func (a *Asm) appendByte(v interface{}) *Asm { + switch v := v.(type) { + case vm.OpCode: + a.bytecode = append(a.bytecode, byte(v)) + case byte: + a.bytecode = append(a.bytecode, v) + case int: + a.bytecode = append(a.bytecode, byte(v)) + default: + panic(fmt.Sprintf("unexpected appendByte type %T", v)) + } + + return a +} diff --git a/taiko-geth-utils/gethutil/trace.go b/taiko-geth-utils/gethutil/trace.go new file mode 100644 index 0000000000..d421362d3c --- /dev/null +++ b/taiko-geth-utils/gethutil/trace.go @@ -0,0 +1,238 @@ +package gethutil + +import ( + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/ethereum/go-ethereum/eth/tracers/logger" + "github.com/ethereum/go-ethereum/params" +) + +// Copied from github.com/ethereum/go-ethereum/internal/ethapi.ExecutionResult +// ExecutionResult groups all structured logs emitted by the EVM +// while replaying a transaction in debug mode as well as transaction +// execution status, the amount of gas used and the return value +type ExecutionResult struct { + Gas uint64 `json:"gas"` + Failed bool `json:"failed"` + ReturnValue string `json:"returnValue"` + StructLogs []StructLogRes `json:"structLogs"` +} + +// StructLogRes stores a structured log emitted by the EVM while replaying a +// transaction in debug mode +// Copied from github.com/ethereum/go-ethereum/internal/ethapi.StructLogRes +type StructLogRes struct { + Pc uint64 `json:"pc"` + Op string `json:"op"` + Gas uint64 `json:"gas"` + GasCost uint64 `json:"gasCost"` + Depth int `json:"depth"` + Error string `json:"error,omitempty"` + Stack *[]string `json:"stack,omitempty"` + Memory *[]string `json:"memory,omitempty"` + Storage *map[string]string `json:"storage,omitempty"` + RefundCounter uint64 `json:"refund,omitempty"` +} + +// Copied from github.com/ethereum/go-ethereum/internal/ethapi.FormatLogs +// FormatLogs formats EVM returned structured logs for json output +func FormatLogs(logs []logger.StructLog) []StructLogRes { + formatted := make([]StructLogRes, len(logs)) + for index, trace := range logs { + formatted[index] = StructLogRes{ + Pc: trace.Pc, + Op: trace.Op.String(), + Gas: trace.Gas, + GasCost: trace.GasCost, + Depth: trace.Depth, + Error: trace.ErrorString(), + RefundCounter: trace.RefundCounter, + } + if trace.Stack != nil { + stack := make([]string, len(trace.Stack)) + for i, stackValue := range trace.Stack { + stack[i] = stackValue.Hex() + } + formatted[index].Stack = &stack + } + if trace.Memory != nil { + memory := make([]string, 0, (len(trace.Memory)+31)/32) + for i := 0; i+32 <= len(trace.Memory); i += 32 { + memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32])) + } + formatted[index].Memory = &memory + } + if trace.Storage != nil { + storage := make(map[string]string) + for i, storageValue := range trace.Storage { + storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue) + } + formatted[index].Storage = &storage + } + } + return formatted +} + +type Block struct { + Coinbase common.Address `json:"coinbase"` + Timestamp *hexutil.Big `json:"timestamp"` + Number *hexutil.Big `json:"number"` + Difficulty *hexutil.Big `json:"difficulty"` + GasLimit *hexutil.Big `json:"gas_limit"` + BaseFee *hexutil.Big `json:"base_fee"` +} + +type Account struct { + Nonce hexutil.Uint64 `json:"nonce"` + Balance *hexutil.Big `json:"balance"` + Code hexutil.Bytes `json:"code"` + Storage map[common.Hash]common.Hash `json:"storage"` +} + +type Transaction struct { + From common.Address `json:"from"` + To *common.Address `json:"to"` + Nonce hexutil.Uint64 `json:"nonce"` + Value *hexutil.Big `json:"value"` + GasLimit hexutil.Uint64 `json:"gas_limit"` + GasPrice *hexutil.Big `json:"gas_price"` + GasFeeCap *hexutil.Big `json:"gas_fee_cap"` + GasTipCap *hexutil.Big `json:"gas_tip_cap"` + CallData hexutil.Bytes `json:"call_data"` + AccessList []struct { + Address common.Address `json:"address"` + StorageKeys []common.Hash `json:"storage_keys"` + } `json:"access_list"` +} + +type TraceConfig struct { + ChainID *hexutil.Big `json:"chain_id"` + // HistoryHashes contains most recent 256 block hashes in history, + // where the lastest one is at HistoryHashes[len(HistoryHashes)-1]. + HistoryHashes []*hexutil.Big `json:"history_hashes"` + Block Block `json:"block_constants"` + Accounts map[common.Address]Account `json:"accounts"` + Transactions []Transaction `json:"transactions"` + LoggerConfig *logger.Config `json:"logger_config"` +} + +func newUint64(val uint64) *uint64 { return &val } + +func Trace(config TraceConfig) ([]*ExecutionResult, error) { + chainConfig := params.ChainConfig{ + ChainID: toBigInt(config.ChainID), + HomesteadBlock: big.NewInt(0), + DAOForkBlock: big.NewInt(0), + DAOForkSupport: true, + EIP150Block: big.NewInt(0), + EIP150Hash: common.Hash{}, + EIP155Block: big.NewInt(0), + EIP158Block: big.NewInt(0), + ByzantiumBlock: big.NewInt(0), + ConstantinopleBlock: big.NewInt(0), + PetersburgBlock: big.NewInt(0), + IstanbulBlock: big.NewInt(0), + MuirGlacierBlock: big.NewInt(0), + BerlinBlock: big.NewInt(0), + LondonBlock: big.NewInt(0), + Taiko: true, + } + + var txsGasLimit uint64 + blockGasLimit := toBigInt(config.Block.GasLimit).Uint64() + messages := make([]core.Message, len(config.Transactions)) + for i, tx := range config.Transactions { + // If gas price is specified directly, the tx is treated as legacy type. + if tx.GasPrice != nil { + tx.GasFeeCap = tx.GasPrice + tx.GasTipCap = tx.GasPrice + } + + txAccessList := make(types.AccessList, len(tx.AccessList)) + for i, accessList := range tx.AccessList { + txAccessList[i].Address = accessList.Address + txAccessList[i].StorageKeys = accessList.StorageKeys + } + messages[i] = core.Message{ + From: tx.From, + To: tx.To, + Nonce: uint64(tx.Nonce), + Value: toBigInt(tx.Value), + GasLimit: uint64(tx.GasLimit), + GasPrice: toBigInt(tx.GasPrice), + GasFeeCap: toBigInt(tx.GasFeeCap), + GasTipCap: toBigInt(tx.GasTipCap), + Data: tx.CallData, + AccessList: txAccessList, + SkipAccountChecks: false, + } + + txsGasLimit += uint64(tx.GasLimit) + } + if txsGasLimit > blockGasLimit { + return nil, fmt.Errorf("txs total gas: %d Exceeds block gas limit: %d", txsGasLimit, blockGasLimit) + } + + blockCtx := vm.BlockContext{ + CanTransfer: core.CanTransfer, + Transfer: core.Transfer, + GetHash: func(n uint64) common.Hash { + number := config.Block.Number.ToInt().Uint64() + if number > n && number-n <= 256 { + index := uint64(len(config.HistoryHashes)) - number + n + return common.BigToHash(toBigInt(config.HistoryHashes[index])) + } + return common.Hash{} + }, + Coinbase: config.Block.Coinbase, + BlockNumber: toBigInt(config.Block.Number), + Time: toBigInt(config.Block.Timestamp).Uint64(), + Difficulty: toBigInt(config.Block.Difficulty), + BaseFee: toBigInt(config.Block.BaseFee), + GasLimit: blockGasLimit, + } + + // Setup state db with accounts from argument + stateDB, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) + for address, account := range config.Accounts { + stateDB.SetNonce(address, uint64(account.Nonce)) + stateDB.SetCode(address, account.Code) + if account.Balance != nil { + stateDB.SetBalance(address, toBigInt(account.Balance)) + } + for key, value := range account.Storage { + stateDB.SetState(address, key, value) + } + } + stateDB.Finalise(true) + + // Run the transactions with tracing enabled. + executionResults := make([]*ExecutionResult, len(config.Transactions)) + for i, message := range messages { + tracer := logger.NewStructLogger(config.LoggerConfig) + evm := vm.NewEVM(blockCtx, core.NewEVMTxContext(&message), stateDB, &chainConfig, vm.Config{Debug: true, Tracer: tracer, NoBaseFee: true}) + + result, err := core.ApplyMessage(evm, &message, new(core.GasPool).AddGas(message.GasLimit)) + if err != nil { + return nil, fmt.Errorf("Failed to apply config.Transactions[%d]: %w", i, err) + } + stateDB.Finalise(true) + + executionResults[i] = &ExecutionResult{ + Gas: result.UsedGas, + Failed: result.Failed(), + ReturnValue: fmt.Sprintf("%x", result.ReturnData), + StructLogs: FormatLogs(tracer.StructLogs()), + } + } + + return executionResults, nil +} diff --git a/taiko-geth-utils/gethutil/util.go b/taiko-geth-utils/gethutil/util.go new file mode 100644 index 0000000000..374c9fa529 --- /dev/null +++ b/taiko-geth-utils/gethutil/util.go @@ -0,0 +1,85 @@ +package gethutil + +import ( + "fmt" + "math/big" + "unsafe" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core/vm" + "github.com/holiman/uint256" +) + +var ( + minStackPtrOffset = 3 * unsafe.Sizeof(int(0)) + longonInstructionSet = newLondonInstructionSet() +) + +//go:linkname newLondonInstructionSet github.com/ethereum/go-ethereum/core/vm.newLondonInstructionSet +func newLondonInstructionSet() vm.JumpTable + +func opPushRangeCheck(op vm.OpCode, n int) { + opPtr := unsafe.Pointer(longonInstructionSet[op]) + minStack := *(*int)(unsafe.Pointer(uintptr(opPtr) + minStackPtrOffset)) + rangeCheck(n, 0, minStack, fmt.Sprintf("len(vals) of %s", op.String())) +} + +func rangeCheck(n, l, h int, name string) { + if n < l || n > h { + if l == h { + panic(fmt.Sprintf("%s should be %d, but got %d", name, h, n)) + } else { + panic(fmt.Sprintf("%s should be in range [%d, %d], but got %d", name, l, h, n)) + } + } +} + +func reverse(vals []interface{}) { + for i, j := 0, len(vals)-1; i < j; i, j = i+1, j-1 { + vals[i], vals[j] = vals[j], vals[i] + } +} + +func toBytes(value interface{}) []byte { + var bytes []byte + + switch value := value.(type) { + case string: + u256, err := uint256.FromHex(value) + if err != nil { + panic(err) + } + bytes = u256.Bytes() + case int: + for value > 0 { + bytes = append([]byte{byte(value & 0xff)}, bytes...) + value >>= 8 + } + case []byte: + bytes = value + case common.Address: + bytes = value.Bytes() + case common.Hash: + bytes = value.Bytes() + case *uint256.Int: + bytes = value.Bytes() + case *big.Int: + bytes = value.Bytes() + default: + panic(fmt.Errorf("Unsupported type %T", value)) + } + + if len(bytes) == 0 { + bytes = []byte{0} + } + + return bytes +} + +func toBigInt(value *hexutil.Big) *big.Int { + if value != nil { + return value.ToInt() + } + return big.NewInt(0) +} diff --git a/taiko-geth-utils/go.mod b/taiko-geth-utils/go.mod new file mode 100644 index 0000000000..983a14077a --- /dev/null +++ b/taiko-geth-utils/go.mod @@ -0,0 +1,13 @@ +module main + +go 1.16 + +require ( + github.com/ethereum/go-ethereum v1.11.5 + github.com/holiman/uint256 v1.2.0 +) + +replace github.com/ethereum/go-ethereum => github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b + +// Uncomment for debugging +// replace github.com/ethereum/go-ethereum => ../../go-ethereum diff --git a/taiko-geth-utils/go.sum b/taiko-geth-utils/go.sum new file mode 100644 index 0000000000..373453b0be --- /dev/null +++ b/taiko-geth-utils/go.sum @@ -0,0 +1,1388 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= +github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/CloudyKit/jet/v6 v6.1.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= +github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= +github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= +github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= +github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= +github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= +github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= +github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= +github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.9.1-0.20230105202408-1a7a29904a7c/go.mod h1:CkbdF9hbRidRJYMRzmfX8TMOr95I2pYXRHF18MzRrvA= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/crate-crypto/go-ipa v0.0.0-20220523130400-f11357ae11c7/go.mod h1:gFnFS95y8HstDP6P9pPwzrxOOC5TRDkwbM+ao15ChAI= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= +github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= +github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= +github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= +github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= +github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gballet/go-verkle v0.0.0-20220902153445-097bd83b7732/go.mod h1:o/XfIXWi4/GqbQirfRm5uTbXMG5NpqxkxblnbZ+QM9I= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= +github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= +github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= +github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= +github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= +github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= +github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/httpexpect/v2 v2.3.1/go.mod h1:ICTf89VBKSD3KB0fsyyHviKF8G8hyepP0dOXJPWz3T0= +github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= +github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= +github.com/iris-contrib/jade v1.1.4/go.mod h1:EDqR+ur9piDl6DUgs6qRrlfzmlx/D5UybogqrXvJTBE= +github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= +github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kataras/blocks v0.0.6/go.mod h1:UK+Iwk0Oxpc0GdoJja7sEildotAUKK1LYeYcVF0COWc= +github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= +github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= +github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= +github.com/kataras/golog v0.1.7/go.mod h1:jOSQ+C5fUqsNSwurB/oAHq1IFSb0KI3l6GMa7xB6dZA= +github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= +github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= +github.com/kataras/iris/v12 v12.2.0-beta5/go.mod h1:q26aoWJ0Knx/00iPKg5iizDK7oQQSPjbD8np0XDh6dc= +github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= +github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= +github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= +github.com/kataras/neffos v0.0.20/go.mod h1:srdvC/Uo8mgrApWW0AYtiiLgMbyNPf69qPsd2FhE6MQ= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= +github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= +github.com/kataras/pio v0.0.10/go.mod h1:gS3ui9xSD+lAUpbYnjOGiQyY7sUMJO+EHpiRzhtZ5no= +github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= +github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= +github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= +github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= +github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailgun/raymond/v2 v2.0.46/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= +github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= +github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/mediocregopher/radix/v3 v3.8.0/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/microcosm-cc/bluemonday v1.0.20/go.mod h1:yfBmMi8mxvaZut3Yytv+jTXRY8mxyjJ0/kQBTElld50= +github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt/v2 v2.2.1-0.20220330180145-442af02fd36a/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= +github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= +github.com/nats-io/nats-server/v2 v2.8.4/go.mod h1:8zZa+Al3WsESfmgSs98Fi06dRWLH5Bnq90m5bKD/eT4= +github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.15.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nats.go v1.16.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= +github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= +github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v3 v3.22.8/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI= +github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= +github.com/smartystreets/assertions v1.13.0/go.mod h1:wDmR7qL282YbGsPy6H/yAsesrxfxaaSlJazyFLYVFx8= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/supranational/blst v0.3.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b h1:vtNEoKn0R8YSk79cO+19XoO8Pf22Ql0xbImY45vOyg0= +github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/tdewolff/minify/v2 v2.12.1/go.mod h1:p5pwbvNs1ghbFED/ZW1towGsnnWwzvM8iz8l0eURi9g= +github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= +github.com/tdewolff/parse/v2 v2.6.3/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= +github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= +github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= +github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= +golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191126055441-b0650ceb63d9/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/taiko-geth-utils/lib/lib.go b/taiko-geth-utils/lib/lib.go new file mode 100644 index 0000000000..5f428c3583 --- /dev/null +++ b/taiko-geth-utils/lib/lib.go @@ -0,0 +1,42 @@ +package main + +/* + #include +*/ +import "C" +import ( + "encoding/json" + "fmt" + "main/gethutil" + "unsafe" +) + +// TODO: Add proper error handling. For example, return an int, where 0 means +// ok, and !=0 means error. +//export CreateTrace +func CreateTrace(configStr *C.char) *C.char { + var config gethutil.TraceConfig + err := json.Unmarshal([]byte(C.GoString(configStr)), &config) + if err != nil { + return C.CString(fmt.Sprintf("Failed to unmarshal config, err: %v", err)) + } + + executionResults, err := gethutil.Trace(config) + if err != nil { + return C.CString(fmt.Sprintf("Failed to run Trace, err: %v", err)) + } + + bytes, err := json.MarshalIndent(executionResults, "", " ") + if err != nil { + return C.CString(fmt.Sprintf("Failed to marshal []ExecutionResult, err: %v", err)) + } + + return C.CString(string(bytes)) +} + +//export FreeString +func FreeString(str *C.char) { + C.free(unsafe.Pointer(str)) +} + +func main() {} diff --git a/taiko-geth-utils/src/lib.rs b/taiko-geth-utils/src/lib.rs new file mode 100644 index 0000000000..60a237164f --- /dev/null +++ b/taiko-geth-utils/src/lib.rs @@ -0,0 +1,156 @@ +//! Connection to external EVM tracer. + +use core::fmt::{Display, Formatter, Result as FmtResult}; +use std::{ + ffi::{CStr, CString}, + os::raw::c_char, +}; + +extern "C" { + fn CreateTrace(str: *const c_char) -> *const c_char; + fn FreeString(str: *const c_char); +} + +/// Creates the trace +pub fn trace(config: &str) -> Result { + // Create a string we can pass into Go + let c_config = CString::new(config).expect("invalid config"); + + // Generate the trace externally + let result = unsafe { CreateTrace(c_config.as_ptr()) }; + + // Convert the returned string to something we can use in Rust again. + // Also make sure the returned data is copied to rust managed memory. + let c_result = unsafe { CStr::from_ptr(result) }; + let result = c_result + .to_str() + .expect("Error translating EVM trace from library") + .to_string(); + + // We can now free the returned string (memory managed by Go) + unsafe { FreeString(c_result.as_ptr()) }; + + // Return the trace + match result.is_empty() || result.starts_with("Failed") { + true => Err(Error::TracingError(result)), + false => Ok(result), + } +} + +/// Error type for any geth-utils related failure. +#[derive(Debug, Clone)] +pub enum Error { + /// Error while tracing. + TracingError(String), +} + +impl Display for Error { + fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { + write!(f, "{:?}", self) + } +} + +#[cfg(test)] +mod test { + use crate::trace; + + #[test] + fn valid_tx() { + for config in [ + // Minimal call tx with gas_limit = 21000 + r#"{ + "block_constants": { + "gas_limit": "0x52080" + }, + "transactions": [ + { + "from": "0x00000000000000000000000000000000000000fe", + "to": "0x00000000000000000000000000000000000000ff", + "gas_limit": "0x5208" + } + ] + }"#, + // Minimal creation tx with gas_limit = 53000 + r#"{ + "block_constants": { + "gas_limit": "0xcf080" + }, + "transactions": [ + { + "from": "0x00000000000000000000000000000000000000fe", + "gas_limit": "0xcf08" + } + ] + }"#, + // Normal call tx with gas_limit = 21000 and gas_price = 2 Gwei + r#"{ + "block_constants": { + "gas_limit": "0x52080" + }, + "accounts": { + "0x00000000000000000000000000000000000000fe": { + "balance": "0x2632e314a000" + } + }, + "transactions": [ + { + "from": "0x00000000000000000000000000000000000000fe", + "to": "0x00000000000000000000000000000000000000ff", + "gas_limit": "0x5208", + "gas_price": "0x77359400" + } + ] + }"#, + ] { + assert!(trace(config).is_ok()); + } + } + + #[test] + fn invalid_tx() { + for config in [ + // Insufficient gas for intrinsic usage + r#"{ + "block_constants": { + "gas_limit": "0xcf080" + }, + "transactions": [ + { + "from": "0x00000000000000000000000000000000000000fe", + "to": "0x00000000000000000000000000000000000000ff" + } + ] + }"#, + // Insufficient balance to buy gas + r#"{ + "block_constants": { + "gas_limit": "0x52080" + }, + "transactions": [ + { + "from": "0x00000000000000000000000000000000000000fe", + "to": "0x00000000000000000000000000000000000000ff", + "gas_limit": "0x5208", + "gas_price": "0x1111" + } + ] + }"#, + // Insufficient balance to do the first transfer + r#"{ + "block_constants": { + "gas_limit": "0x52080" + }, + "transactions": [ + { + "from": "0x00000000000000000000000000000000000000fe", + "to": "0x00000000000000000000000000000000000000ff", + "value": "0x100", + "gas_limit": "0x5208" + } + ] + }"#, + ] { + assert!(trace(config).is_err()) + } + } +} diff --git a/taiko-mock/.gitignore b/taiko-mock/.gitignore new file mode 100644 index 0000000000..ea8c4bf7f3 --- /dev/null +++ b/taiko-mock/.gitignore @@ -0,0 +1 @@ +/target diff --git a/mock-taiko/Cargo.toml b/taiko-mock/Cargo.toml similarity index 86% rename from mock-taiko/Cargo.toml rename to taiko-mock/Cargo.toml index 92a1a7265e..a385e47d11 100644 --- a/mock-taiko/Cargo.toml +++ b/taiko-mock/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "mock-taiko" +name = "taiko-mock" version = "0.1.0" edition = "2021" authors = ["The appliedzkp team"] @@ -10,7 +10,7 @@ halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.gi "circuit-params", ], tag = "v2023_04_20" } eth-types = { path = "../eth-types" } -external-tracer = { path = "../external-tracer" } +taiko-external-tracer = { path = "../taiko-external-tracer" } lazy_static = "1.4" itertools = "0.10.3" ethers-signers = "=2.0.0" diff --git a/mock-taiko/src/account.rs b/taiko-mock/src/account.rs similarity index 100% rename from mock-taiko/src/account.rs rename to taiko-mock/src/account.rs diff --git a/mock-taiko/src/anchor.rs b/taiko-mock/src/anchor.rs similarity index 100% rename from mock-taiko/src/anchor.rs rename to taiko-mock/src/anchor.rs diff --git a/mock-taiko/src/block.rs b/taiko-mock/src/block.rs similarity index 100% rename from mock-taiko/src/block.rs rename to taiko-mock/src/block.rs diff --git a/mock-taiko/src/lib.rs b/taiko-mock/src/lib.rs similarity index 98% rename from mock-taiko/src/lib.rs rename to taiko-mock/src/lib.rs index 55407f588a..05cdb02e9d 100644 --- a/mock-taiko/src/lib.rs +++ b/taiko-mock/src/lib.rs @@ -1,5 +1,4 @@ //! Mock types and functions to generate GethData used for tests - use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Hash, Word}; use ethers_signers::LocalWallet; use lazy_static::lazy_static; @@ -51,8 +50,8 @@ lazy_static! { /// Taiko l2 contract address pub static ref MOCK_TAIKO_L2_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe666"); /// Mock anchor - pub static ref MOCK_ANCHOR_GAS_LIMIT: Word = Word::from(18000); - pub static ref MOCK_ANCHOR_GAS_PRICE: Word = Word::from(0); + pub static ref MOCK_ANCHOR_GAS_LIMIT: Word = Word::from(180000); + pub static ref MOCK_ANCHOR_GAS_PRICE: Word = *MOCK_BASEFEE; pub static ref MOCK_ANCHOR_L1_HASH: Hash = Hash::from_slice(&[0u8; 32]); pub static ref MOCK_ANCHOR_SIGNAL_ROOT: Hash = Hash::from_slice(&[0u8; 32]); pub static ref MOCK_ANCHOR_L1_HIGHT: u64 = 0; diff --git a/mock-taiko/src/test_ctx.rs b/taiko-mock/src/test_ctx.rs similarity index 94% rename from mock-taiko/src/test_ctx.rs rename to taiko-mock/src/test_ctx.rs index 2e3f33e24d..06b56b3852 100644 --- a/mock-taiko/src/test_ctx.rs +++ b/taiko-mock/src/test_ctx.rs @@ -5,11 +5,11 @@ use eth_types::{ geth_types::{Account, BlockConstants, GethData}, Block, Bytecode, Error, GethExecTrace, Transaction, Word, }; -use external_tracer::{trace, TraceConfig}; use helpers::*; use itertools::Itertools; +use taiko_external_tracer::{trace, TraceConfig}; -pub use external_tracer::LoggerConfig; +pub use taiko_external_tracer::LoggerConfig; /// TestContext is a type that contains all the information from a block /// required to build the circuit inputs. @@ -81,7 +81,7 @@ pub struct TestContext { /// chain id pub chain_id: Word, /// Account list - pub accounts: [Account; NACC], + pub accounts: Vec, /// history hashes contains most recent 256 block hashes in history, where /// the lastest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, @@ -98,7 +98,7 @@ impl From> for GethD history_hashes: ctx.history_hashes, eth_block: ctx.eth_block, geth_traces: ctx.geth_traces.to_vec(), - accounts: ctx.accounts.into(), + accounts: ctx.accounts, } } } @@ -129,7 +129,7 @@ impl TestContext { .try_into() .expect("Mismatched len err"); acc_fns(account_refs); - let accounts: [MockAccount; NACC] = accounts + let accounts_cloned: [MockAccount; NACC] = accounts .iter_mut() .skip(2) .map(|acc| acc.build()) @@ -151,12 +151,12 @@ impl TestContext { .skip(1) .for_each(|(idx, tx)| { let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); - tx.transaction_idx(idx).nonce(idx); + tx.transaction_idx(idx).nonce(idx - 1); }); let tx_refs = transactions.iter_mut().skip(1).collect(); // Build Tx modifiers. - func_tx(tx_refs, accounts.clone()); + func_tx(tx_refs, accounts_cloned); let transactions: Vec = transactions.iter_mut().map(|tx| tx.build()).collect(); @@ -167,18 +167,12 @@ impl TestContext { let chain_id = block.chain_id; let block = Block::::from(block); - let accounts: [Account; NACC] = accounts - .iter() - .cloned() - .map(Account::from) - .collect_vec() - .try_into() - .expect("Mismatched acc len"); + let accounts = accounts.iter().cloned().map(Account::from).collect_vec(); let geth_traces = gen_geth_traces( chain_id, block.clone(), - accounts.to_vec(), + accounts.clone(), history_hashes.clone(), logger_config, )?; @@ -224,7 +218,7 @@ impl TestContext { /// account_0_code_account_1_no_code`]. Extra accounts, txs and/or block /// configs are set as [`Default`]. pub fn simple_ctx_with_bytecode(bytecode: Bytecode) -> Result, Error> { - TestContext::new( + TestContext::<2, 1>::new( None, account_0_code_account_1_no_code(bytecode), tx_from_1_to_0, diff --git a/mock-taiko/src/transaction.rs b/taiko-mock/src/transaction.rs similarity index 100% rename from mock-taiko/src/transaction.rs rename to taiko-mock/src/transaction.rs diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index 6eee0266c5..c4175f0ccb 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -18,6 +18,7 @@ gadgets = { path = "../gadgets" } ethers-core = "=2.0.0" ethers-signers = { version = "=2.0.0", optional = true } mock = { path = "../mock", optional = true } +taiko-mock = { path = "../taiko-mock", optional = true } strum = "0.24" strum_macros = "0.24" rand_xorshift = "0.3" diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 7b9c11c4b0..25e356f78c 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -574,11 +574,11 @@ impl ExecutionGadget for BeginTxGadget { mod test { use std::vec; - use crate::{evm_circuit::test::rand_bytes, test_util::CircuitTestBuilder}; + use crate::{evm_circuit::test::rand_bytes, taiko_test_util::CircuitTestBuilder}; use bus_mapping::evm::OpcodeId; use eth_types::{self, bytecode, evm_types::GasCost, word, Bytecode, Word}; - use mock::{eth, gwei, MockTransaction, TestContext, MOCK_ACCOUNTS}; + use taiko_mock::{eth, gwei, MockTransaction, TestContext, MOCK_ACCOUNTS}; fn gas(call_data: &[u8]) -> Word { Word::from( diff --git a/zkevm-circuits/src/lib.rs b/zkevm-circuits/src/lib.rs index 62c796821d..8d750e94c6 100644 --- a/zkevm-circuits/src/lib.rs +++ b/zkevm-circuits/src/lib.rs @@ -33,6 +33,9 @@ pub mod taiko_super_circuit; #[cfg(any(feature = "test", test))] pub mod test_util; +#[cfg(any(feature = "test", test))] +pub mod taiko_test_util; + pub mod anchor_tx_circuit; pub mod tx_circuit; pub mod util; diff --git a/zkevm-circuits/src/taiko_test_util.rs b/zkevm-circuits/src/taiko_test_util.rs new file mode 100644 index 0000000000..0d1c8b5b5d --- /dev/null +++ b/zkevm-circuits/src/taiko_test_util.rs @@ -0,0 +1,236 @@ +//! Testing utilities + +use crate::{ + evm_circuit::{cached::EvmCircuitCached, EvmCircuit}, + state_circuit::StateCircuit, + util::SubCircuit, + witness::{Block, Rw}, +}; +use bus_mapping::{circuit_input_builder::CircuitsParams, mock::BlockData}; +use eth_types::geth_types::GethData; +use std::cmp; + +use crate::util::log2_ceil; +use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; +use taiko_mock::TestContext; + +const NUM_BLINDING_ROWS: usize = 64; + +#[allow(clippy::type_complexity)] +/// Struct used to easily generate tests for EVM &| State circuits being able to +/// customize all of the steps involved in the testing itself. +/// +/// By default, the tests run through `prover.assert_satisfied_par()` but the +/// builder pattern provides functions that allow to pass different functions +/// that the prover should execute when verifying the CTB correctness. +/// +/// The CTB also includes a mechanism to recieve calls that will modify the +/// block produced from the [`TestContext`] and apply them before starting to +/// compute the proof. +/// +/// ## Example: +/// ```rust, no_run +/// use eth_types::geth_types::Account; +/// use eth_types::{address, bytecode, Address, Bytecode, ToWord, Word, U256, word}; +/// use mock::{TestContext, MOCK_ACCOUNTS, gwei, eth}; +/// use zkevm_circuits::test_util::CircuitTestBuilder; +/// let code = bytecode! { +/// // [ADDRESS, STOP] +/// PUSH32(word!(" +/// 3000000000000000000000000000000000000000000000000000000000000000")) +/// PUSH1(0) +/// MSTORE +/// +/// PUSH1(2) +/// PUSH1(0) +/// RETURN +/// }; +/// let ctx = TestContext::<1, 1>::new( +/// None, +/// |accs| { +/// accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); +/// }, +/// |mut txs, _accs| { +/// txs[0] +/// .from(MOCK_ACCOUNTS[0]) +/// .gas_price(gwei(2)) +/// .gas(Word::from(0x10000)) +/// .value(eth(2)) +/// .input(code.into()); +/// }, +/// |block, _tx| block.number(0xcafeu64), +/// ) +/// .unwrap(); +/// +/// CircuitTestBuilder::new_from_test_ctx(ctx) +/// .block_modifier(Box::new(|block| block.circuits_params.max_evm_rows = (1 << 18) - 100)) +/// .state_checks(Box::new(|prover, evm_rows, lookup_rows| assert!(prover.verify_at_rows_par(evm_rows.iter().cloned(), lookup_rows.iter().cloned()).is_err()))) +/// .run(); +/// ``` +pub struct CircuitTestBuilder { + test_ctx: Option>, + circuits_params: Option, + block: Option>, + evm_checks: Box, &Vec, &Vec)>, + state_checks: Box, &Vec, &Vec)>, + block_modifiers: Vec)>>, +} + +impl CircuitTestBuilder { + /// Generates an empty/set to default `CircuitTestBuilder`. + fn empty() -> Self { + CircuitTestBuilder { + test_ctx: None, + circuits_params: None, + block: None, + evm_checks: Box::new(|prover, gate_rows, lookup_rows| { + prover.assert_satisfied_at_rows_par( + gate_rows.iter().cloned(), + lookup_rows.iter().cloned(), + ) + }), + state_checks: Box::new(|prover, gate_rows, lookup_rows| { + prover.assert_satisfied_at_rows_par( + gate_rows.iter().cloned(), + lookup_rows.iter().cloned(), + ) + }), + block_modifiers: vec![], + } + } + + /// Generates a CTBC from a [`TestContext`] passed with all the other fields + /// set to [`Default`]. + pub fn new_from_test_ctx(ctx: TestContext) -> Self { + Self::empty().test_ctx(ctx) + } + + /// Generates a CTBC from a [`Block`] passed with all the other fields + /// set to [`Default`]. + pub fn new_from_block(block: Block) -> Self { + Self::empty().block(block) + } + + /// Allows to produce a [`TestContext`] which will serve as the generator of + /// the Block. + pub fn test_ctx(mut self, ctx: TestContext) -> Self { + self.test_ctx = Some(ctx); + self + } + + /// Allows to pass a non-default [`CircuitsParams`] to the builder. + /// This means that we can increase for example, the `max_rws` or `max_txs`. + pub fn params(mut self, params: CircuitsParams) -> Self { + assert!( + self.block.is_none(), + "circuit_params already provided in the block" + ); + self.circuits_params = Some(params); + self + } + + /// Allows to pass a [`Block`] already built to the constructor. + pub fn block(mut self, block: Block) -> Self { + self.block = Some(block); + self + } + + #[allow(clippy::type_complexity)] + /// Allows to provide checks different than the default ones for the State + /// Circuit verification. + pub fn state_checks( + mut self, + state_checks: Box, &Vec, &Vec)>, + ) -> Self { + self.state_checks = state_checks; + self + } + + #[allow(clippy::type_complexity)] + /// Allows to provide checks different than the default ones for the EVM + /// Circuit verification. + pub fn evm_checks( + mut self, + evm_checks: Box, &Vec, &Vec)>, + ) -> Self { + self.evm_checks = evm_checks; + self + } + + #[allow(clippy::type_complexity)] + /// Allows to provide modifier functions for the [`Block`] that will be + /// generated within this builder. + /// + /// That removes the need in a lot of tests to build the block outside of + /// the builder because they need to modify something particular. + pub fn block_modifier(mut self, modifier: Box)>) -> Self { + self.block_modifiers.push(modifier); + self + } +} + +impl CircuitTestBuilder { + /// Triggers the `CircuitTestBuilder` to convert the [`TestContext`] if any, + /// into a [`Block`] and apply the default or provided block_modifiers or + /// circuit checks to the provers generated for the State and EVM circuits. + pub fn run(self) { + let params = if let Some(block) = self.block.as_ref() { + block.circuits_params + } else { + self.circuits_params.unwrap_or_default() + }; + + let block: Block = if self.block.is_some() { + self.block.unwrap() + } else if self.test_ctx.is_some() { + let block: GethData = self.test_ctx.unwrap().into(); + let mut builder = BlockData::new_from_geth_data_with_params(block.clone(), params) + .new_circuit_input_builder(); + builder + .handle_block(&block.eth_block, &block.geth_traces) + .unwrap(); + // Build a witness block from trace result. + let mut block = + crate::witness::block_convert(&builder.block, &builder.code_db).unwrap(); + + for modifier_fn in self.block_modifiers { + modifier_fn.as_ref()(&mut block); + } + block + } else { + panic!("No attribute to build a block was passed to the CircuitTestBuilder") + }; + + // Run evm circuit test + { + let k = block.get_test_degree(); + + let (active_gate_rows, active_lookup_rows) = EvmCircuit::::get_active_rows(&block); + + let circuit = EvmCircuitCached::get_test_cicuit_from_block(block.clone()); + let prover = MockProver::::run(k, &circuit, vec![]).unwrap(); + + self.evm_checks.as_ref()(prover, &active_gate_rows, &active_lookup_rows) + } + + // Run state circuit test + // TODO: use randomness as one of the circuit public input, since randomness in + // state circuit and evm circuit must be same + { + let rows_needed = StateCircuit::::min_num_rows_block(&block).1; + let k = cmp::max(log2_ceil(rows_needed + NUM_BLINDING_ROWS), 18); + let state_circuit = StateCircuit::::new(block.rws, params.max_rws); + let instance = state_circuit.instance(); + let prover = MockProver::::run(k, &state_circuit, instance).unwrap(); + // Skip verification of Start rows to accelerate testing + let non_start_rows_len = state_circuit + .rows + .iter() + .filter(|rw| !matches!(rw, Rw::Start { .. })) + .count(); + let rows = (params.max_rws - non_start_rows_len..params.max_rws).collect(); + + self.state_checks.as_ref()(prover, &rows, &rows); + } + } +} From d8800abb752aeb5ddc82a7199801a4c0e0cb05a7 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 7 Aug 2023 09:55:40 +0000 Subject: [PATCH 09/55] fix: duplicate symbol --- taiko-geth-utils/build.rs | 2 +- taiko-geth-utils/lib/lib.go | 9 +++++---- taiko-geth-utils/src/lib.rs | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/taiko-geth-utils/build.rs b/taiko-geth-utils/build.rs index 7bf64f596a..70575ae7c8 100644 --- a/taiko-geth-utils/build.rs +++ b/taiko-geth-utils/build.rs @@ -4,7 +4,7 @@ use std::{ }; fn main() { - let lib_name = "go-geth-utils"; + let lib_name = "go-taiko-geth-utils"; let out_dir = env::var("OUT_DIR").unwrap(); // Build diff --git a/taiko-geth-utils/lib/lib.go b/taiko-geth-utils/lib/lib.go index 5f428c3583..477f835bd0 100644 --- a/taiko-geth-utils/lib/lib.go +++ b/taiko-geth-utils/lib/lib.go @@ -13,8 +13,9 @@ import ( // TODO: Add proper error handling. For example, return an int, where 0 means // ok, and !=0 means error. -//export CreateTrace -func CreateTrace(configStr *C.char) *C.char { +// +//export TaikoCreateTrace +func TaikoCreateTrace(configStr *C.char) *C.char { var config gethutil.TraceConfig err := json.Unmarshal([]byte(C.GoString(configStr)), &config) if err != nil { @@ -34,8 +35,8 @@ func CreateTrace(configStr *C.char) *C.char { return C.CString(string(bytes)) } -//export FreeString -func FreeString(str *C.char) { +//export TaikoFreeString +func TaikoFreeString(str *C.char) { C.free(unsafe.Pointer(str)) } diff --git a/taiko-geth-utils/src/lib.rs b/taiko-geth-utils/src/lib.rs index 60a237164f..a8f708a0ce 100644 --- a/taiko-geth-utils/src/lib.rs +++ b/taiko-geth-utils/src/lib.rs @@ -7,8 +7,8 @@ use std::{ }; extern "C" { - fn CreateTrace(str: *const c_char) -> *const c_char; - fn FreeString(str: *const c_char); + fn TaikoCreateTrace(str: *const c_char) -> *const c_char; + fn TaikoFreeString(str: *const c_char); } /// Creates the trace @@ -17,7 +17,7 @@ pub fn trace(config: &str) -> Result { let c_config = CString::new(config).expect("invalid config"); // Generate the trace externally - let result = unsafe { CreateTrace(c_config.as_ptr()) }; + let result = unsafe { TaikoCreateTrace(c_config.as_ptr()) }; // Convert the returned string to something we can use in Rust again. // Also make sure the returned data is copied to rust managed memory. @@ -28,7 +28,7 @@ pub fn trace(config: &str) -> Result { .to_string(); // We can now free the returned string (memory managed by Go) - unsafe { FreeString(c_result.as_ptr()) }; + unsafe { TaikoFreeString(c_result.as_ptr()) }; // Return the trace match result.is_empty() || result.starts_with("Failed") { From 5e9573c84681e80c35c3933004f8103e07ad5ae6 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 7 Aug 2023 11:11:43 +0000 Subject: [PATCH 10/55] fix: use taiko-geth --- Cargo.lock | 21 +- Cargo.toml | 2 - external-tracer/src/lib.rs | 4 + geth-utils/gethutil/trace.go | 25 +- geth-utils/go.mod | 1 + geth-utils/go.sum | 19 +- mock/src/test_ctx.rs | 1 + taiko-external-tracer/.gitignore | 1 - taiko-external-tracer/Cargo.toml | 12 - taiko-external-tracer/src/lib.rs | 77 -- taiko-geth-utils/Cargo.toml | 10 - taiko-geth-utils/README.md | 29 - taiko-geth-utils/build.rs | 51 - taiko-geth-utils/example/add_sub.go | 31 - taiko-geth-utils/example/msize.go | 31 - taiko-geth-utils/example/mstore_mload.go | 31 - taiko-geth-utils/example/sstore_sload.go | 31 - taiko-geth-utils/gethutil/asm.go | 231 ---- taiko-geth-utils/gethutil/trace.go | 238 ---- taiko-geth-utils/gethutil/util.go | 85 -- taiko-geth-utils/go.mod | 13 - taiko-geth-utils/go.sum | 1388 ---------------------- taiko-geth-utils/lib/lib.go | 43 - taiko-geth-utils/src/lib.rs | 156 --- taiko-mock/Cargo.toml | 2 +- taiko-mock/src/lib.rs | 1 + taiko-mock/src/test_ctx.rs | 12 +- zkevm-circuits/src/taiko_test_util.rs | 2 +- 28 files changed, 35 insertions(+), 2513 deletions(-) delete mode 100644 taiko-external-tracer/.gitignore delete mode 100644 taiko-external-tracer/Cargo.toml delete mode 100644 taiko-external-tracer/src/lib.rs delete mode 100644 taiko-geth-utils/Cargo.toml delete mode 100644 taiko-geth-utils/README.md delete mode 100644 taiko-geth-utils/build.rs delete mode 100644 taiko-geth-utils/example/add_sub.go delete mode 100644 taiko-geth-utils/example/msize.go delete mode 100644 taiko-geth-utils/example/mstore_mload.go delete mode 100644 taiko-geth-utils/example/sstore_sload.go delete mode 100644 taiko-geth-utils/gethutil/asm.go delete mode 100644 taiko-geth-utils/gethutil/trace.go delete mode 100644 taiko-geth-utils/gethutil/util.go delete mode 100644 taiko-geth-utils/go.mod delete mode 100644 taiko-geth-utils/go.sum delete mode 100644 taiko-geth-utils/lib/lib.go delete mode 100644 taiko-geth-utils/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 03ec375d6d..a8395e98a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4563,25 +4563,6 @@ dependencies = [ "regex", ] -[[package]] -name = "taiko-external-tracer" -version = "0.1.0" -dependencies = [ - "eth-types", - "serde", - "serde_json", - "taiko-geth-utils", -] - -[[package]] -name = "taiko-geth-utils" -version = "0.1.0" -dependencies = [ - "env_logger", - "gobuild", - "log", -] - [[package]] name = "taiko-mock" version = "0.1.0" @@ -4589,6 +4570,7 @@ dependencies = [ "eth-types", "ethers-core", "ethers-signers", + "external-tracer", "halo2_proofs 0.2.0", "itertools", "lazy_static", @@ -4599,7 +4581,6 @@ dependencies = [ "rand", "rand_chacha", "sha3 0.10.7", - "taiko-external-tracer", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f5da9fb836..65d85a051c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,14 +3,12 @@ members = [ "zkevm-circuits", "bus-mapping", "geth-utils", - "taiko-geth-utils", "keccak256", "gadgets", "integration-tests", "circuit-benchmarks", "eth-types", "external-tracer", - "taiko-external-tracer", "mock", "taiko-mock", "testool", diff --git a/external-tracer/src/lib.rs b/external-tracer/src/lib.rs index 678bc21e33..fcc440b7cc 100644 --- a/external-tracer/src/lib.rs +++ b/external-tracer/src/lib.rs @@ -23,6 +23,10 @@ pub struct TraceConfig { pub transactions: Vec, /// logger pub logger_config: LoggerConfig, + /// taiko + pub taiko: bool, + /// treasury + pub treasury: Address, } /// Configuration structure for `logger.Config` diff --git a/geth-utils/gethutil/trace.go b/geth-utils/gethutil/trace.go index 744ce01d40..465cecdc88 100644 --- a/geth-utils/gethutil/trace.go +++ b/geth-utils/gethutil/trace.go @@ -122,6 +122,8 @@ type TraceConfig struct { Accounts map[common.Address]Account `json:"accounts"` Transactions []Transaction `json:"transactions"` LoggerConfig *logger.Config `json:"logger_config"` + Taiko bool `json:"taiko"` + Treasury common.Address `json:"treasury"` } func newUint64(val uint64) *uint64 { return &val } @@ -143,6 +145,8 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), + Taiko: config.Taiko, + Treasury: config.Treasury, } var txsGasLimit uint64 @@ -161,17 +165,18 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { txAccessList[i].StorageKeys = accessList.StorageKeys } messages[i] = core.Message{ - From: tx.From, - To: tx.To, - Nonce: uint64(tx.Nonce), - Value: toBigInt(tx.Value), - GasLimit: uint64(tx.GasLimit), - GasPrice: toBigInt(tx.GasPrice), - GasFeeCap: toBigInt(tx.GasFeeCap), - GasTipCap: toBigInt(tx.GasTipCap), - Data: tx.CallData, - AccessList: txAccessList, + From: tx.From, + To: tx.To, + Nonce: uint64(tx.Nonce), + Value: toBigInt(tx.Value), + GasLimit: uint64(tx.GasLimit), + GasPrice: toBigInt(tx.GasPrice), + GasFeeCap: toBigInt(tx.GasFeeCap), + GasTipCap: toBigInt(tx.GasTipCap), + Data: tx.CallData, + AccessList: txAccessList, SkipAccountChecks: false, + IsFirstTx: i == 0, } txsGasLimit += uint64(tx.GasLimit) diff --git a/geth-utils/go.mod b/geth-utils/go.mod index 2892aa855f..d2ae504dc5 100644 --- a/geth-utils/go.mod +++ b/geth-utils/go.mod @@ -9,3 +9,4 @@ require ( // Uncomment for debugging // replace github.com/ethereum/go-ethereum => ../../go-ethereum +replace github.com/ethereum/go-ethereum => github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b diff --git a/geth-utils/go.sum b/geth-utils/go.sum index 62c668a662..373453b0be 100644 --- a/geth-utils/go.sum +++ b/geth-utils/go.sum @@ -146,9 +146,7 @@ github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5w github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/consensys/gnark-crypto v0.9.1-0.20230105202408-1a7a29904a7c/go.mod h1:CkbdF9hbRidRJYMRzmfX8TMOr95I2pYXRHF18MzRrvA= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -169,8 +167,6 @@ github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= -github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= @@ -194,7 +190,6 @@ github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/ github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= @@ -211,9 +206,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= -github.com/ethereum/go-ethereum v1.11.5 h1:3M1uan+LAUvdn+7wCEFrcMM4LJTeuxDrPTg/f31a5QQ= -github.com/ethereum/go-ethereum v1.11.5/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= @@ -381,7 +373,6 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -417,7 +408,6 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -709,7 +699,6 @@ github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJf github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -768,7 +757,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -789,6 +777,8 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/supranational/blst v0.3.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b h1:vtNEoKn0R8YSk79cO+19XoO8Pf22Ql0xbImY45vOyg0= +github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= github.com/tdewolff/minify/v2 v2.12.1/go.mod h1:p5pwbvNs1ghbFED/ZW1towGsnnWwzvM8iz8l0eURi9g= github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= github.com/tdewolff/parse/v2 v2.6.3/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= @@ -802,7 +792,6 @@ github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZF github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -811,7 +800,6 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= @@ -995,7 +983,6 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= @@ -1103,7 +1090,6 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1394,7 +1380,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index befff9f3e0..4cdcfe0570 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -247,6 +247,7 @@ pub fn gen_geth_traces( .map(eth_types::geth_types::Transaction::from) .collect(), logger_config, + ..Default::default() }; let traces = trace(&trace_config)?; Ok(traces) diff --git a/taiko-external-tracer/.gitignore b/taiko-external-tracer/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/taiko-external-tracer/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/taiko-external-tracer/Cargo.toml b/taiko-external-tracer/Cargo.toml deleted file mode 100644 index c4e0e3db17..0000000000 --- a/taiko-external-tracer/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "taiko-external-tracer" -version = "0.1.0" -edition = "2021" -authors = ["The appliedzkp team"] -license = "MIT OR Apache-2.0" - -[dependencies] -eth-types = { path = "../eth-types" } -taiko-geth-utils = { path = "../taiko-geth-utils" } -serde = { version = "1.0.130", features = ["derive"] } -serde_json = "1.0.66" diff --git a/taiko-external-tracer/src/lib.rs b/taiko-external-tracer/src/lib.rs deleted file mode 100644 index 9fb9d4fde2..0000000000 --- a/taiko-external-tracer/src/lib.rs +++ /dev/null @@ -1,77 +0,0 @@ -//! This module generates traces by connecting to an external tracer - -use eth_types::{ - geth_types::{Account, BlockConstants, Transaction}, - Address, Error, GethExecTrace, Word, -}; -use serde::Serialize; -use std::collections::HashMap; - -/// Configuration structure for `geth_utlis::trace` -#[derive(Debug, Default, Clone, Serialize)] -pub struct TraceConfig { - /// chain id - pub chain_id: Word, - /// history hashes contains most recent 256 block hashes in history, where - /// the lastest one is at history_hashes[history_hashes.len() - 1]. - pub history_hashes: Vec, - /// block constants - pub block_constants: BlockConstants, - /// accounts - pub accounts: HashMap, - /// transaction - pub transactions: Vec, - /// logger - pub logger_config: LoggerConfig, -} - -/// Configuration structure for `logger.Config` -#[derive(Debug, Clone, Serialize)] -pub struct LoggerConfig { - /// enable memory capture - #[serde(rename = "EnableMemory")] - pub enable_memory: bool, - /// disable stack capture - #[serde(rename = "DisableStack")] - pub disable_stack: bool, - /// disable storage capture - #[serde(rename = "DisableStorage")] - pub disable_storage: bool, - /// enable return data capture - #[serde(rename = "EnableReturnData")] - pub enable_return_data: bool, -} - -impl Default for LoggerConfig { - fn default() -> Self { - Self { - enable_memory: false, - disable_stack: false, - disable_storage: false, - enable_return_data: true, - } - } -} - -impl LoggerConfig { - pub fn enable_memory() -> Self { - Self { - enable_memory: true, - ..Self::default() - } - } -} - -/// Creates a trace for the specified config -pub fn trace(config: &TraceConfig) -> Result, Error> { - // Get the trace - let trace_string = - taiko_geth_utils::trace(&serde_json::to_string(&config).unwrap()).map_err(|error| { - match error { - taiko_geth_utils::Error::TracingError(error) => Error::TracingError(error), - } - })?; - - let trace = serde_json::from_str(&trace_string).map_err(Error::SerdeError)?; - Ok(trace) -} diff --git a/taiko-geth-utils/Cargo.toml b/taiko-geth-utils/Cargo.toml deleted file mode 100644 index cbd583195d..0000000000 --- a/taiko-geth-utils/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "taiko-geth-utils" -version = "0.1.0" -edition = "2021" -license = "MIT OR Apache-2.0" - -[build-dependencies] -gobuild = "0.1.0-alpha.1" -log = "0.4.14" -env_logger = "0.9" diff --git a/taiko-geth-utils/README.md b/taiko-geth-utils/README.md deleted file mode 100644 index 91e2040dba..0000000000 --- a/taiko-geth-utils/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Go Ethereum Utility - -The module `gethutil` tried to provide identical output from APIs `debug_trace*` of latest `geth` as test vectors for [`zkevm-circuits`](https://github.com/privacy-scaling-explorations/zkevm-circuits). - -## Usage - - - - -### Library Usage - -For [`./example/mstore_mload.go`](./example/mstore_mload.go) as an example, it defines bytecode directly by builder `asm`, then write the logs produced by `TraceTx` to stdout. To reproduce the logs, run: - -```bash -go run ./example/mstore_mload.go > ./mstore_mload.json -``` - -### Debugging - -The execution traces returned by geth omit some information like execution -errors in some situations. Moreover you may want to inspect some intermediate -values of the EVM execution for debugging purposes. - -Print debugging can be easily achieved by replacing the dependency of `go-ethereum` by a local copy of the repository. Just clone `go-ethereum` into a folder next to the `zkevm-circuits` repository, and uncomment the following line in `go.mod`: -``` -replace github.com/ethereum/go-ethereum => ../../go-ethereum -``` - -Now you can add print logs in your `go-ethereum` copy as necessary. diff --git a/taiko-geth-utils/build.rs b/taiko-geth-utils/build.rs deleted file mode 100644 index 70575ae7c8..0000000000 --- a/taiko-geth-utils/build.rs +++ /dev/null @@ -1,51 +0,0 @@ -use std::{ - env, - io::{self, Write}, -}; - -fn main() { - let lib_name = "go-taiko-geth-utils"; - let out_dir = env::var("OUT_DIR").unwrap(); - - // Build - if let Err(e) = gobuild::Build::new() - .file("./lib/lib.go") - .try_compile(lib_name) - { - // The error type is private so have to check the error string - if format!("{}", e).starts_with("Failed to find tool.") { - fail( - " Failed to find Go. Please install Go 1.16 or later \ - following the instructions at https://golang.org/doc/install. - On linux it is also likely available as a package." - .to_string(), - ); - } else { - fail(format!("{}", e)); - } - } - - // Files the lib depends on that should recompile the lib - let dep_files = vec![ - "./gethutil/asm.go", - "./gethutil/trace.go", - "./gethutil/util.go", - "./go.mod", - ]; - for file in dep_files { - println!("cargo:rerun-if-changed={}", file); - } - - // Link - println!("cargo:rustc-link-search=native={}", out_dir); - println!("cargo:rustc-link-lib=static={}", lib_name); -} - -fn fail(message: String) { - let _ = writeln!( - io::stderr(), - "\n\nError while building geth-utils: {}\n\n", - message - ); - std::process::exit(1); -} diff --git a/taiko-geth-utils/example/add_sub.go b/taiko-geth-utils/example/add_sub.go deleted file mode 100644 index d58a3e033a..0000000000 --- a/taiko-geth-utils/example/add_sub.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - - "github.com/ethereum/go-ethereum/common" - - "main/gethutil" -) - -func main() { - address := common.BytesToAddress([]byte{0xff}) - assembly := gethutil.NewAssembly().Add(0xdeadbeef, 0xcafeb0ba).Sub(0xfaceb00c, 0xb0bacafe) - - accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} - tx := gethutil.Transaction{To: &address, GasLimit: 21100} - - result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) - } - - bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") - if err != nil { - fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) - } - - fmt.Fprintln(os.Stdout, string(bytes)) -} diff --git a/taiko-geth-utils/example/msize.go b/taiko-geth-utils/example/msize.go deleted file mode 100644 index 9c13f85d76..0000000000 --- a/taiko-geth-utils/example/msize.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - - "github.com/ethereum/go-ethereum/common" - - "main/gethutil" -) - -func main() { - address := common.BytesToAddress([]byte{0xff}) - assembly := gethutil.NewAssembly().MStore(0x40, 0x80).MSize().Stop() - - accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} - tx := gethutil.Transaction{To: &address, GasLimit: 21100} - - result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) - } - - bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") - if err != nil { - fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) - } - - fmt.Fprintln(os.Stdout, string(bytes)) -} diff --git a/taiko-geth-utils/example/mstore_mload.go b/taiko-geth-utils/example/mstore_mload.go deleted file mode 100644 index ecfc6d91b5..0000000000 --- a/taiko-geth-utils/example/mstore_mload.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - - "github.com/ethereum/go-ethereum/common" - - "main/gethutil" -) - -func main() { - address := common.BytesToAddress([]byte{0xff}) - assembly := gethutil.NewAssembly().MStore(0x40, 0x80).MLoad(0x40) - - accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} - tx := gethutil.Transaction{To: &address, GasLimit: 21100} - - result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) - } - - bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") - if err != nil { - fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) - } - - fmt.Fprintln(os.Stdout, string(bytes)) -} diff --git a/taiko-geth-utils/example/sstore_sload.go b/taiko-geth-utils/example/sstore_sload.go deleted file mode 100644 index b3bc8a672e..0000000000 --- a/taiko-geth-utils/example/sstore_sload.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - - "github.com/ethereum/go-ethereum/common" - - "main/gethutil" -) - -func main() { - address := common.BytesToAddress([]byte{0xff}) - assembly := gethutil.NewAssembly().SStore(0, 0xcafeb0ba).SLoad(0).SStore(0, 0xdeabbeef).SLoad(0) - - accounts := map[common.Address]gethutil.Account{address: {Code: assembly.Bytecode()}} - tx := gethutil.Transaction{To: &address, GasLimit: 46000} - - result, err := gethutil.Trace(gethutil.TraceConfig{Accounts: accounts, Transactions: []gethutil.Transaction{tx}}) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to trace tx, err: %v\n", err) - } - - bytes, err := json.MarshalIndent(result[0].StructLogs, "", " ") - if err != nil { - fmt.Fprintf(os.Stderr, "failed to marshal logs, err: %v\n", err) - } - - fmt.Fprintln(os.Stdout, string(bytes)) -} diff --git a/taiko-geth-utils/gethutil/asm.go b/taiko-geth-utils/gethutil/asm.go deleted file mode 100644 index b5546f876a..0000000000 --- a/taiko-geth-utils/gethutil/asm.go +++ /dev/null @@ -1,231 +0,0 @@ -package gethutil - -import ( - "fmt" - "io" - "math/big" - "strings" - - "github.com/ethereum/go-ethereum/core/vm" -) - -type Asm struct { - bytecode []byte - labelMap map[string]int - pendingLabelsMap map[string][]int -} - -func NewAssembly() *Asm { - return &Asm{ - labelMap: make(map[string]int), - pendingLabelsMap: make(map[string][]int), - } -} - -func (a *Asm) Bytecode() []byte { - if len(a.pendingLabelsMap) > 0 { - pendingLabels := make([]string, 0, len(a.pendingLabelsMap)) - for pendingLabel := range a.pendingLabelsMap { - pendingLabels = append(pendingLabels, pendingLabel) - } - panic(fmt.Sprintf("pending labels are not defined yet: %v", strings.Join(pendingLabels, ", "))) - } - return a.bytecode -} - -func (a *Asm) PrintMnemonics(out io.Writer) { - for idx := 0; idx < len(a.bytecode); { - code := vm.OpCode(a.bytecode[idx]) - if code.IsPush() { - n := int(code) - int(vm.PUSH1) + 1 - fmt.Fprintf(out, "%02d\t%s\t0x%x\n", idx, code.String(), a.bytecode[idx+1:idx+1+n]) - idx += n + 1 - } else { - fmt.Fprintf(out, "%02d\t%s\n", idx, code.String()) - idx++ - } - } -} - -// 0x0 range -func (a *Asm) Stop() *Asm { return a.appendByte(vm.STOP) } -func (a *Asm) Add(v ...interface{}) *Asm { return a.opWithPush(vm.ADD, v...) } -func (a *Asm) Mul(v ...interface{}) *Asm { return a.opWithPush(vm.MUL, v...) } -func (a *Asm) Sub(v ...interface{}) *Asm { return a.opWithPush(vm.SUB, v...) } -func (a *Asm) Div(v ...interface{}) *Asm { return a.opWithPush(vm.DIV, v...) } -func (a *Asm) SDiv(v ...interface{}) *Asm { return a.opWithPush(vm.SDIV, v...) } -func (a *Asm) Mod(v ...interface{}) *Asm { return a.opWithPush(vm.MOD, v...) } -func (a *Asm) SMod(v ...interface{}) *Asm { return a.opWithPush(vm.SMOD, v...) } -func (a *Asm) AddMod(v ...interface{}) *Asm { return a.opWithPush(vm.ADDMOD, v...) } -func (a *Asm) MulMod(v ...interface{}) *Asm { return a.opWithPush(vm.MULMOD, v...) } -func (a *Asm) Exp(v ...interface{}) *Asm { return a.opWithPush(vm.EXP, v...) } -func (a *Asm) SignExtend(v ...interface{}) *Asm { return a.opWithPush(vm.SIGNEXTEND, v...) } - -// 0x10 range -func (a *Asm) Lt(v ...interface{}) *Asm { return a.opWithPush(vm.LT, v...) } -func (a *Asm) Gt(v ...interface{}) *Asm { return a.opWithPush(vm.GT, v...) } -func (a *Asm) SLt(v ...interface{}) *Asm { return a.opWithPush(vm.SLT, v...) } -func (a *Asm) SGt(v ...interface{}) *Asm { return a.opWithPush(vm.SGT, v...) } -func (a *Asm) Eq(v ...interface{}) *Asm { return a.opWithPush(vm.EQ, v...) } -func (a *Asm) IsZero(v ...interface{}) *Asm { return a.opWithPush(vm.ISZERO, v...) } -func (a *Asm) And(v ...interface{}) *Asm { return a.opWithPush(vm.AND, v...) } -func (a *Asm) Or(v ...interface{}) *Asm { return a.opWithPush(vm.OR, v...) } -func (a *Asm) Xor(v ...interface{}) *Asm { return a.opWithPush(vm.XOR, v...) } -func (a *Asm) Not(v ...interface{}) *Asm { return a.opWithPush(vm.NOT, v...) } -func (a *Asm) Byte(v ...interface{}) *Asm { return a.opWithPush(vm.BYTE, v...) } -func (a *Asm) Shl(v ...interface{}) *Asm { return a.opWithPush(vm.SHL, v...) } -func (a *Asm) Shr(v ...interface{}) *Asm { return a.opWithPush(vm.SHR, v...) } -func (a *Asm) Sar(v ...interface{}) *Asm { return a.opWithPush(vm.SAR, v...) } -func (a *Asm) Sha3(v ...interface{}) *Asm { return a.opWithPush(vm.KECCAK256, v...) } - -// 0x30 range -func (a *Asm) Address() *Asm { return a.appendByte(vm.ADDRESS) } -func (a *Asm) Balance(v ...interface{}) *Asm { return a.opWithPush(vm.BALANCE, v...) } -func (a *Asm) Origin() *Asm { return a.appendByte(vm.ORIGIN) } -func (a *Asm) Caller() *Asm { return a.appendByte(vm.CALLER) } -func (a *Asm) CallValue() *Asm { return a.appendByte(vm.CALLVALUE) } -func (a *Asm) CallDataLoad(v ...interface{}) *Asm { return a.opWithPush(vm.CALLDATALOAD, v...) } -func (a *Asm) CallDataSize() *Asm { return a.appendByte(vm.CALLDATASIZE) } -func (a *Asm) CallDataCopy(v ...interface{}) *Asm { return a.opWithPush(vm.CALLDATACOPY, v...) } -func (a *Asm) CodeSize() *Asm { return a.appendByte(vm.CODESIZE) } -func (a *Asm) CodeCopy(v ...interface{}) *Asm { return a.opWithPush(vm.CODECOPY, v...) } -func (a *Asm) GasPrice() *Asm { return a.appendByte(vm.GASPRICE) } -func (a *Asm) ExtCodeSize(v ...interface{}) *Asm { return a.opWithPush(vm.EXTCODESIZE, v...) } -func (a *Asm) ExtCodeCopy(v ...interface{}) *Asm { return a.opWithPush(vm.EXTCODECOPY, v...) } -func (a *Asm) ReturnDataSize() *Asm { return a.appendByte(vm.RETURNDATASIZE) } -func (a *Asm) ReturnDataCopy(v ...interface{}) *Asm { return a.opWithPush(vm.RETURNDATACOPY, v...) } -func (a *Asm) ExtCodeHash(v ...interface{}) *Asm { return a.opWithPush(vm.EXTCODEHASH, v...) } - -// 0x40 range -func (a *Asm) BlockHash(v ...interface{}) *Asm { return a.opWithPush(vm.BLOCKHASH, v...) } -func (a *Asm) Coinbase() *Asm { return a.appendByte(vm.COINBASE) } -func (a *Asm) Timestamp() *Asm { return a.appendByte(vm.TIMESTAMP) } -func (a *Asm) Number() *Asm { return a.appendByte(vm.NUMBER) } -func (a *Asm) Difficulty() *Asm { return a.appendByte(vm.DIFFICULTY) } -func (a *Asm) GasLimit() *Asm { return a.appendByte(vm.GASLIMIT) } -func (a *Asm) ChainID() *Asm { return a.appendByte(vm.CHAINID) } -func (a *Asm) SelfBalance() *Asm { return a.appendByte(vm.SELFBALANCE) } -func (a *Asm) BaseFee() *Asm { return a.appendByte(vm.BASEFEE) } - -// 0x50 range -func (a *Asm) Pop() *Asm { return a.appendByte(vm.POP) } -func (a *Asm) MLoad(v ...interface{}) *Asm { return a.opWithPush(vm.MLOAD, v...) } -func (a *Asm) MStore(v ...interface{}) *Asm { return a.opWithPush(vm.MSTORE, v...) } -func (a *Asm) MStore8(v ...interface{}) *Asm { return a.opWithPush(vm.MSTORE8, v...) } -func (a *Asm) SLoad(v ...interface{}) *Asm { return a.opWithPush(vm.SLOAD, v...) } -func (a *Asm) SStore(v ...interface{}) *Asm { return a.opWithPush(vm.SSTORE, v...) } -func (a *Asm) Jump(label ...string) *Asm { return a.jump(vm.JUMP, label...) } -func (a *Asm) JumpI(label ...string) *Asm { return a.jump(vm.JUMPI, label...) } -func (a *Asm) PC() *Asm { return a.appendByte(vm.PC) } -func (a *Asm) MSize() *Asm { return a.appendByte(vm.MSIZE) } -func (a *Asm) Gas() *Asm { return a.appendByte(vm.GAS) } -func (a *Asm) JumpDest(label ...string) *Asm { return a.jumpDest(label...) } - -// 0x60 range -func (a *Asm) PushX(val interface{}) *Asm { return a.push(val) } -func (a *Asm) DupX(x int) *Asm { - rangeCheck(x, 1, 16, "X") - return a.appendByte(int(vm.DUP1) + x - 1) -} -func (a *Asm) SwapX(x int) *Asm { - rangeCheck(x, 1, 16, "X") - return a.appendByte(int(vm.SWAP1) + x - 1) -} - -// 0xa0 range -func (a *Asm) LogX(x int) *Asm { - rangeCheck(x, 0, 5, "X") - return a.appendByte(int(vm.LOG0) + x) -} - -// 0xf0 range -func (a *Asm) Create(v ...interface{}) *Asm { return a.opWithPush(vm.CREATE, v...) } -func (a *Asm) Call(v ...interface{}) *Asm { return a.opWithPush(vm.CALL, v...) } -func (a *Asm) CallCode(v ...interface{}) *Asm { return a.opWithPush(vm.CALLCODE, v...) } -func (a *Asm) Return(v ...interface{}) *Asm { return a.opWithPush(vm.RETURN, v...) } -func (a *Asm) DelegateCall(v ...interface{}) *Asm { return a.opWithPush(vm.DELEGATECALL, v...) } -func (a *Asm) Create2(v ...interface{}) *Asm { return a.opWithPush(vm.CREATE2, v...) } -func (a *Asm) StaticCall(v ...interface{}) *Asm { return a.opWithPush(vm.STATICCALL, v...) } -func (a *Asm) Revert(v ...interface{}) *Asm { return a.opWithPush(vm.REVERT, v...) } -func (a *Asm) SelfDestruct() *Asm { return a.appendByte(vm.SELFDESTRUCT) } - -func (a *Asm) jump(op vm.OpCode, label ...string) *Asm { - if len(label) > 0 { - rangeCheck(len(label), 1, 1, "len(label)") - - if pos, ok := a.labelMap[label[0]]; ok { - a.PushX(pos) - } else { - a.pendingLabelsMap[label[0]] = append(a.pendingLabelsMap[label[0]], len(a.bytecode)) - a.PushX([]byte{0, 0, 0}) - } - } - - return a.appendByte(op) -} - -func (a *Asm) jumpDest(label ...string) *Asm { - a.appendByte(vm.JUMPDEST) - - if len(label) > 0 { - rangeCheck(len(label), 1, 1, "len(label)") - - if _, ok := a.labelMap[label[0]]; ok { - panic("label already defined") - } - - a.labelMap[label[0]] = len(a.bytecode) - - pos := big.NewInt(int64(len(a.bytecode) - 1)).Bytes() - if len(pos) < 3 { - pos = append(make([]byte, 3-len(pos)), pos...) - } - for _, pendingLabel := range a.pendingLabelsMap[label[0]] { - copy(a.bytecode[pendingLabel+1:pendingLabel+4], pos) - } - - delete(a.pendingLabelsMap, label[0]) - } - - return a -} - -func (a *Asm) opWithPush(op vm.OpCode, v ...interface{}) *Asm { - opPushRangeCheck(op, len(v)) - return a.pushRev(v...).appendByte(op) -} - -func (a *Asm) push(v ...interface{}) *Asm { - for _, v := range v { - bytes := toBytes(v) - - rangeCheck(len(bytes), 1, 32, "len(bytes)") - a.appendByte(int(vm.PUSH1) + len(bytes) - 1) - - for _, b := range bytes { - a.appendByte(b) - } - } - - return a -} - -func (a *Asm) pushRev(v ...interface{}) *Asm { - reverse(v) - return a.push(v...) -} - -func (a *Asm) appendByte(v interface{}) *Asm { - switch v := v.(type) { - case vm.OpCode: - a.bytecode = append(a.bytecode, byte(v)) - case byte: - a.bytecode = append(a.bytecode, v) - case int: - a.bytecode = append(a.bytecode, byte(v)) - default: - panic(fmt.Sprintf("unexpected appendByte type %T", v)) - } - - return a -} diff --git a/taiko-geth-utils/gethutil/trace.go b/taiko-geth-utils/gethutil/trace.go deleted file mode 100644 index d421362d3c..0000000000 --- a/taiko-geth-utils/gethutil/trace.go +++ /dev/null @@ -1,238 +0,0 @@ -package gethutil - -import ( - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/ethereum/go-ethereum/eth/tracers/logger" - "github.com/ethereum/go-ethereum/params" -) - -// Copied from github.com/ethereum/go-ethereum/internal/ethapi.ExecutionResult -// ExecutionResult groups all structured logs emitted by the EVM -// while replaying a transaction in debug mode as well as transaction -// execution status, the amount of gas used and the return value -type ExecutionResult struct { - Gas uint64 `json:"gas"` - Failed bool `json:"failed"` - ReturnValue string `json:"returnValue"` - StructLogs []StructLogRes `json:"structLogs"` -} - -// StructLogRes stores a structured log emitted by the EVM while replaying a -// transaction in debug mode -// Copied from github.com/ethereum/go-ethereum/internal/ethapi.StructLogRes -type StructLogRes struct { - Pc uint64 `json:"pc"` - Op string `json:"op"` - Gas uint64 `json:"gas"` - GasCost uint64 `json:"gasCost"` - Depth int `json:"depth"` - Error string `json:"error,omitempty"` - Stack *[]string `json:"stack,omitempty"` - Memory *[]string `json:"memory,omitempty"` - Storage *map[string]string `json:"storage,omitempty"` - RefundCounter uint64 `json:"refund,omitempty"` -} - -// Copied from github.com/ethereum/go-ethereum/internal/ethapi.FormatLogs -// FormatLogs formats EVM returned structured logs for json output -func FormatLogs(logs []logger.StructLog) []StructLogRes { - formatted := make([]StructLogRes, len(logs)) - for index, trace := range logs { - formatted[index] = StructLogRes{ - Pc: trace.Pc, - Op: trace.Op.String(), - Gas: trace.Gas, - GasCost: trace.GasCost, - Depth: trace.Depth, - Error: trace.ErrorString(), - RefundCounter: trace.RefundCounter, - } - if trace.Stack != nil { - stack := make([]string, len(trace.Stack)) - for i, stackValue := range trace.Stack { - stack[i] = stackValue.Hex() - } - formatted[index].Stack = &stack - } - if trace.Memory != nil { - memory := make([]string, 0, (len(trace.Memory)+31)/32) - for i := 0; i+32 <= len(trace.Memory); i += 32 { - memory = append(memory, fmt.Sprintf("%x", trace.Memory[i:i+32])) - } - formatted[index].Memory = &memory - } - if trace.Storage != nil { - storage := make(map[string]string) - for i, storageValue := range trace.Storage { - storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue) - } - formatted[index].Storage = &storage - } - } - return formatted -} - -type Block struct { - Coinbase common.Address `json:"coinbase"` - Timestamp *hexutil.Big `json:"timestamp"` - Number *hexutil.Big `json:"number"` - Difficulty *hexutil.Big `json:"difficulty"` - GasLimit *hexutil.Big `json:"gas_limit"` - BaseFee *hexutil.Big `json:"base_fee"` -} - -type Account struct { - Nonce hexutil.Uint64 `json:"nonce"` - Balance *hexutil.Big `json:"balance"` - Code hexutil.Bytes `json:"code"` - Storage map[common.Hash]common.Hash `json:"storage"` -} - -type Transaction struct { - From common.Address `json:"from"` - To *common.Address `json:"to"` - Nonce hexutil.Uint64 `json:"nonce"` - Value *hexutil.Big `json:"value"` - GasLimit hexutil.Uint64 `json:"gas_limit"` - GasPrice *hexutil.Big `json:"gas_price"` - GasFeeCap *hexutil.Big `json:"gas_fee_cap"` - GasTipCap *hexutil.Big `json:"gas_tip_cap"` - CallData hexutil.Bytes `json:"call_data"` - AccessList []struct { - Address common.Address `json:"address"` - StorageKeys []common.Hash `json:"storage_keys"` - } `json:"access_list"` -} - -type TraceConfig struct { - ChainID *hexutil.Big `json:"chain_id"` - // HistoryHashes contains most recent 256 block hashes in history, - // where the lastest one is at HistoryHashes[len(HistoryHashes)-1]. - HistoryHashes []*hexutil.Big `json:"history_hashes"` - Block Block `json:"block_constants"` - Accounts map[common.Address]Account `json:"accounts"` - Transactions []Transaction `json:"transactions"` - LoggerConfig *logger.Config `json:"logger_config"` -} - -func newUint64(val uint64) *uint64 { return &val } - -func Trace(config TraceConfig) ([]*ExecutionResult, error) { - chainConfig := params.ChainConfig{ - ChainID: toBigInt(config.ChainID), - HomesteadBlock: big.NewInt(0), - DAOForkBlock: big.NewInt(0), - DAOForkSupport: true, - EIP150Block: big.NewInt(0), - EIP150Hash: common.Hash{}, - EIP155Block: big.NewInt(0), - EIP158Block: big.NewInt(0), - ByzantiumBlock: big.NewInt(0), - ConstantinopleBlock: big.NewInt(0), - PetersburgBlock: big.NewInt(0), - IstanbulBlock: big.NewInt(0), - MuirGlacierBlock: big.NewInt(0), - BerlinBlock: big.NewInt(0), - LondonBlock: big.NewInt(0), - Taiko: true, - } - - var txsGasLimit uint64 - blockGasLimit := toBigInt(config.Block.GasLimit).Uint64() - messages := make([]core.Message, len(config.Transactions)) - for i, tx := range config.Transactions { - // If gas price is specified directly, the tx is treated as legacy type. - if tx.GasPrice != nil { - tx.GasFeeCap = tx.GasPrice - tx.GasTipCap = tx.GasPrice - } - - txAccessList := make(types.AccessList, len(tx.AccessList)) - for i, accessList := range tx.AccessList { - txAccessList[i].Address = accessList.Address - txAccessList[i].StorageKeys = accessList.StorageKeys - } - messages[i] = core.Message{ - From: tx.From, - To: tx.To, - Nonce: uint64(tx.Nonce), - Value: toBigInt(tx.Value), - GasLimit: uint64(tx.GasLimit), - GasPrice: toBigInt(tx.GasPrice), - GasFeeCap: toBigInt(tx.GasFeeCap), - GasTipCap: toBigInt(tx.GasTipCap), - Data: tx.CallData, - AccessList: txAccessList, - SkipAccountChecks: false, - } - - txsGasLimit += uint64(tx.GasLimit) - } - if txsGasLimit > blockGasLimit { - return nil, fmt.Errorf("txs total gas: %d Exceeds block gas limit: %d", txsGasLimit, blockGasLimit) - } - - blockCtx := vm.BlockContext{ - CanTransfer: core.CanTransfer, - Transfer: core.Transfer, - GetHash: func(n uint64) common.Hash { - number := config.Block.Number.ToInt().Uint64() - if number > n && number-n <= 256 { - index := uint64(len(config.HistoryHashes)) - number + n - return common.BigToHash(toBigInt(config.HistoryHashes[index])) - } - return common.Hash{} - }, - Coinbase: config.Block.Coinbase, - BlockNumber: toBigInt(config.Block.Number), - Time: toBigInt(config.Block.Timestamp).Uint64(), - Difficulty: toBigInt(config.Block.Difficulty), - BaseFee: toBigInt(config.Block.BaseFee), - GasLimit: blockGasLimit, - } - - // Setup state db with accounts from argument - stateDB, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil) - for address, account := range config.Accounts { - stateDB.SetNonce(address, uint64(account.Nonce)) - stateDB.SetCode(address, account.Code) - if account.Balance != nil { - stateDB.SetBalance(address, toBigInt(account.Balance)) - } - for key, value := range account.Storage { - stateDB.SetState(address, key, value) - } - } - stateDB.Finalise(true) - - // Run the transactions with tracing enabled. - executionResults := make([]*ExecutionResult, len(config.Transactions)) - for i, message := range messages { - tracer := logger.NewStructLogger(config.LoggerConfig) - evm := vm.NewEVM(blockCtx, core.NewEVMTxContext(&message), stateDB, &chainConfig, vm.Config{Debug: true, Tracer: tracer, NoBaseFee: true}) - - result, err := core.ApplyMessage(evm, &message, new(core.GasPool).AddGas(message.GasLimit)) - if err != nil { - return nil, fmt.Errorf("Failed to apply config.Transactions[%d]: %w", i, err) - } - stateDB.Finalise(true) - - executionResults[i] = &ExecutionResult{ - Gas: result.UsedGas, - Failed: result.Failed(), - ReturnValue: fmt.Sprintf("%x", result.ReturnData), - StructLogs: FormatLogs(tracer.StructLogs()), - } - } - - return executionResults, nil -} diff --git a/taiko-geth-utils/gethutil/util.go b/taiko-geth-utils/gethutil/util.go deleted file mode 100644 index 374c9fa529..0000000000 --- a/taiko-geth-utils/gethutil/util.go +++ /dev/null @@ -1,85 +0,0 @@ -package gethutil - -import ( - "fmt" - "math/big" - "unsafe" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/vm" - "github.com/holiman/uint256" -) - -var ( - minStackPtrOffset = 3 * unsafe.Sizeof(int(0)) - longonInstructionSet = newLondonInstructionSet() -) - -//go:linkname newLondonInstructionSet github.com/ethereum/go-ethereum/core/vm.newLondonInstructionSet -func newLondonInstructionSet() vm.JumpTable - -func opPushRangeCheck(op vm.OpCode, n int) { - opPtr := unsafe.Pointer(longonInstructionSet[op]) - minStack := *(*int)(unsafe.Pointer(uintptr(opPtr) + minStackPtrOffset)) - rangeCheck(n, 0, minStack, fmt.Sprintf("len(vals) of %s", op.String())) -} - -func rangeCheck(n, l, h int, name string) { - if n < l || n > h { - if l == h { - panic(fmt.Sprintf("%s should be %d, but got %d", name, h, n)) - } else { - panic(fmt.Sprintf("%s should be in range [%d, %d], but got %d", name, l, h, n)) - } - } -} - -func reverse(vals []interface{}) { - for i, j := 0, len(vals)-1; i < j; i, j = i+1, j-1 { - vals[i], vals[j] = vals[j], vals[i] - } -} - -func toBytes(value interface{}) []byte { - var bytes []byte - - switch value := value.(type) { - case string: - u256, err := uint256.FromHex(value) - if err != nil { - panic(err) - } - bytes = u256.Bytes() - case int: - for value > 0 { - bytes = append([]byte{byte(value & 0xff)}, bytes...) - value >>= 8 - } - case []byte: - bytes = value - case common.Address: - bytes = value.Bytes() - case common.Hash: - bytes = value.Bytes() - case *uint256.Int: - bytes = value.Bytes() - case *big.Int: - bytes = value.Bytes() - default: - panic(fmt.Errorf("Unsupported type %T", value)) - } - - if len(bytes) == 0 { - bytes = []byte{0} - } - - return bytes -} - -func toBigInt(value *hexutil.Big) *big.Int { - if value != nil { - return value.ToInt() - } - return big.NewInt(0) -} diff --git a/taiko-geth-utils/go.mod b/taiko-geth-utils/go.mod deleted file mode 100644 index 983a14077a..0000000000 --- a/taiko-geth-utils/go.mod +++ /dev/null @@ -1,13 +0,0 @@ -module main - -go 1.16 - -require ( - github.com/ethereum/go-ethereum v1.11.5 - github.com/holiman/uint256 v1.2.0 -) - -replace github.com/ethereum/go-ethereum => github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b - -// Uncomment for debugging -// replace github.com/ethereum/go-ethereum => ../../go-ethereum diff --git a/taiko-geth-utils/go.sum b/taiko-geth-utils/go.sum deleted file mode 100644 index 373453b0be..0000000000 --- a/taiko-geth-utils/go.sum +++ /dev/null @@ -1,1388 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/CloudyKit/jet/v6 v6.1.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= -github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= -github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.9.1-0.20230105202408-1a7a29904a7c/go.mod h1:CkbdF9hbRidRJYMRzmfX8TMOr95I2pYXRHF18MzRrvA= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-ipa v0.0.0-20220523130400-f11357ae11c7/go.mod h1:gFnFS95y8HstDP6P9pPwzrxOOC5TRDkwbM+ao15ChAI= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= -github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= -github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= -github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= -github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= -github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= -github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/gballet/go-verkle v0.0.0-20220902153445-097bd83b7732/go.mod h1:o/XfIXWi4/GqbQirfRm5uTbXMG5NpqxkxblnbZ+QM9I= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= -github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= -github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/httpexpect/v2 v2.3.1/go.mod h1:ICTf89VBKSD3KB0fsyyHviKF8G8hyepP0dOXJPWz3T0= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/jade v1.1.4/go.mod h1:EDqR+ur9piDl6DUgs6qRrlfzmlx/D5UybogqrXvJTBE= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kataras/blocks v0.0.6/go.mod h1:UK+Iwk0Oxpc0GdoJja7sEildotAUKK1LYeYcVF0COWc= -github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= -github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/golog v0.1.7/go.mod h1:jOSQ+C5fUqsNSwurB/oAHq1IFSb0KI3l6GMa7xB6dZA= -github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/iris/v12 v12.2.0-beta5/go.mod h1:q26aoWJ0Knx/00iPKg5iizDK7oQQSPjbD8np0XDh6dc= -github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= -github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/neffos v0.0.20/go.mod h1:srdvC/Uo8mgrApWW0AYtiiLgMbyNPf69qPsd2FhE6MQ= -github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/pio v0.0.10/go.mod h1:gS3ui9xSD+lAUpbYnjOGiQyY7sUMJO+EHpiRzhtZ5no= -github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= -github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw= -github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailgun/raymond/v2 v2.0.46/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= -github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/mediocregopher/radix/v3 v3.8.0/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/microcosm-cc/bluemonday v1.0.20/go.mod h1:yfBmMi8mxvaZut3Yytv+jTXRY8mxyjJ0/kQBTElld50= -github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt/v2 v2.2.1-0.20220330180145-442af02fd36a/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= -github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= -github.com/nats-io/nats-server/v2 v2.8.4/go.mod h1:8zZa+Al3WsESfmgSs98Fi06dRWLH5Bnq90m5bKD/eT4= -github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.15.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nats.go v1.16.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.22.8/go.mod h1:s648gW4IywYzUfE/KjXxUsqrqx/T2xO5VqOXxONeRfI= -github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= -github.com/smartystreets/assertions v1.13.0/go.mod h1:wDmR7qL282YbGsPy6H/yAsesrxfxaaSlJazyFLYVFx8= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/supranational/blst v0.3.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b h1:vtNEoKn0R8YSk79cO+19XoO8Pf22Ql0xbImY45vOyg0= -github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= -github.com/tdewolff/minify/v2 v2.12.1/go.mod h1:p5pwbvNs1ghbFED/ZW1towGsnnWwzvM8iz8l0eURi9g= -github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= -github.com/tdewolff/parse/v2 v2.6.3/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= -github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= -github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= -github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= -github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= -golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211020174200-9d6173849985/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191126055441-b0650ceb63d9/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/taiko-geth-utils/lib/lib.go b/taiko-geth-utils/lib/lib.go deleted file mode 100644 index 477f835bd0..0000000000 --- a/taiko-geth-utils/lib/lib.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -/* - #include -*/ -import "C" -import ( - "encoding/json" - "fmt" - "main/gethutil" - "unsafe" -) - -// TODO: Add proper error handling. For example, return an int, where 0 means -// ok, and !=0 means error. -// -//export TaikoCreateTrace -func TaikoCreateTrace(configStr *C.char) *C.char { - var config gethutil.TraceConfig - err := json.Unmarshal([]byte(C.GoString(configStr)), &config) - if err != nil { - return C.CString(fmt.Sprintf("Failed to unmarshal config, err: %v", err)) - } - - executionResults, err := gethutil.Trace(config) - if err != nil { - return C.CString(fmt.Sprintf("Failed to run Trace, err: %v", err)) - } - - bytes, err := json.MarshalIndent(executionResults, "", " ") - if err != nil { - return C.CString(fmt.Sprintf("Failed to marshal []ExecutionResult, err: %v", err)) - } - - return C.CString(string(bytes)) -} - -//export TaikoFreeString -func TaikoFreeString(str *C.char) { - C.free(unsafe.Pointer(str)) -} - -func main() {} diff --git a/taiko-geth-utils/src/lib.rs b/taiko-geth-utils/src/lib.rs deleted file mode 100644 index a8f708a0ce..0000000000 --- a/taiko-geth-utils/src/lib.rs +++ /dev/null @@ -1,156 +0,0 @@ -//! Connection to external EVM tracer. - -use core::fmt::{Display, Formatter, Result as FmtResult}; -use std::{ - ffi::{CStr, CString}, - os::raw::c_char, -}; - -extern "C" { - fn TaikoCreateTrace(str: *const c_char) -> *const c_char; - fn TaikoFreeString(str: *const c_char); -} - -/// Creates the trace -pub fn trace(config: &str) -> Result { - // Create a string we can pass into Go - let c_config = CString::new(config).expect("invalid config"); - - // Generate the trace externally - let result = unsafe { TaikoCreateTrace(c_config.as_ptr()) }; - - // Convert the returned string to something we can use in Rust again. - // Also make sure the returned data is copied to rust managed memory. - let c_result = unsafe { CStr::from_ptr(result) }; - let result = c_result - .to_str() - .expect("Error translating EVM trace from library") - .to_string(); - - // We can now free the returned string (memory managed by Go) - unsafe { TaikoFreeString(c_result.as_ptr()) }; - - // Return the trace - match result.is_empty() || result.starts_with("Failed") { - true => Err(Error::TracingError(result)), - false => Ok(result), - } -} - -/// Error type for any geth-utils related failure. -#[derive(Debug, Clone)] -pub enum Error { - /// Error while tracing. - TracingError(String), -} - -impl Display for Error { - fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult { - write!(f, "{:?}", self) - } -} - -#[cfg(test)] -mod test { - use crate::trace; - - #[test] - fn valid_tx() { - for config in [ - // Minimal call tx with gas_limit = 21000 - r#"{ - "block_constants": { - "gas_limit": "0x52080" - }, - "transactions": [ - { - "from": "0x00000000000000000000000000000000000000fe", - "to": "0x00000000000000000000000000000000000000ff", - "gas_limit": "0x5208" - } - ] - }"#, - // Minimal creation tx with gas_limit = 53000 - r#"{ - "block_constants": { - "gas_limit": "0xcf080" - }, - "transactions": [ - { - "from": "0x00000000000000000000000000000000000000fe", - "gas_limit": "0xcf08" - } - ] - }"#, - // Normal call tx with gas_limit = 21000 and gas_price = 2 Gwei - r#"{ - "block_constants": { - "gas_limit": "0x52080" - }, - "accounts": { - "0x00000000000000000000000000000000000000fe": { - "balance": "0x2632e314a000" - } - }, - "transactions": [ - { - "from": "0x00000000000000000000000000000000000000fe", - "to": "0x00000000000000000000000000000000000000ff", - "gas_limit": "0x5208", - "gas_price": "0x77359400" - } - ] - }"#, - ] { - assert!(trace(config).is_ok()); - } - } - - #[test] - fn invalid_tx() { - for config in [ - // Insufficient gas for intrinsic usage - r#"{ - "block_constants": { - "gas_limit": "0xcf080" - }, - "transactions": [ - { - "from": "0x00000000000000000000000000000000000000fe", - "to": "0x00000000000000000000000000000000000000ff" - } - ] - }"#, - // Insufficient balance to buy gas - r#"{ - "block_constants": { - "gas_limit": "0x52080" - }, - "transactions": [ - { - "from": "0x00000000000000000000000000000000000000fe", - "to": "0x00000000000000000000000000000000000000ff", - "gas_limit": "0x5208", - "gas_price": "0x1111" - } - ] - }"#, - // Insufficient balance to do the first transfer - r#"{ - "block_constants": { - "gas_limit": "0x52080" - }, - "transactions": [ - { - "from": "0x00000000000000000000000000000000000000fe", - "to": "0x00000000000000000000000000000000000000ff", - "value": "0x100", - "gas_limit": "0x5208" - } - ] - }"#, - ] { - assert!(trace(config).is_err()) - } - } -} diff --git a/taiko-mock/Cargo.toml b/taiko-mock/Cargo.toml index a385e47d11..ef533136bb 100644 --- a/taiko-mock/Cargo.toml +++ b/taiko-mock/Cargo.toml @@ -10,7 +10,7 @@ halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.gi "circuit-params", ], tag = "v2023_04_20" } eth-types = { path = "../eth-types" } -taiko-external-tracer = { path = "../taiko-external-tracer" } +external-tracer = { path = "../external-tracer" } lazy_static = "1.4" itertools = "0.10.3" ethers-signers = "=2.0.0" diff --git a/taiko-mock/src/lib.rs b/taiko-mock/src/lib.rs index 05cdb02e9d..42d3835c2b 100644 --- a/taiko-mock/src/lib.rs +++ b/taiko-mock/src/lib.rs @@ -49,6 +49,7 @@ lazy_static! { pub static ref GOLDEN_TOUCH_PRIVATEKEY: Word = word!("0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38"); /// Taiko l2 contract address pub static ref MOCK_TAIKO_L2_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe666"); + pub static ref MOCK_TAIKO_TREASURY_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe777"); /// Mock anchor pub static ref MOCK_ANCHOR_GAS_LIMIT: Word = Word::from(180000); pub static ref MOCK_ANCHOR_GAS_PRICE: Word = *MOCK_BASEFEE; diff --git a/taiko-mock/src/test_ctx.rs b/taiko-mock/src/test_ctx.rs index 06b56b3852..5ba0b96276 100644 --- a/taiko-mock/src/test_ctx.rs +++ b/taiko-mock/src/test_ctx.rs @@ -1,15 +1,17 @@ //! Mock types and functions to generate Test enviroments for ZKEVM tests -use crate::{eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_TAIKO_L2_ADDRESS}; +use crate::{ + eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_TAIKO_L2_ADDRESS, + MOCK_TAIKO_TREASURY_ADDRESS, +}; use eth_types::{ geth_types::{Account, BlockConstants, GethData}, Block, Bytecode, Error, GethExecTrace, Transaction, Word, }; +pub use external_tracer::LoggerConfig; +use external_tracer::{trace, TraceConfig}; use helpers::*; use itertools::Itertools; -use taiko_external_tracer::{trace, TraceConfig}; - -pub use taiko_external_tracer::LoggerConfig; /// TestContext is a type that contains all the information from a block /// required to build the circuit inputs. @@ -250,6 +252,8 @@ pub fn gen_geth_traces( .map(eth_types::geth_types::Transaction::from) .collect(), logger_config, + taiko: true, + treasury: *MOCK_TAIKO_TREASURY_ADDRESS, }; let traces = trace(&trace_config)?; Ok(traces) diff --git a/zkevm-circuits/src/taiko_test_util.rs b/zkevm-circuits/src/taiko_test_util.rs index 0d1c8b5b5d..42a67cc122 100644 --- a/zkevm-circuits/src/taiko_test_util.rs +++ b/zkevm-circuits/src/taiko_test_util.rs @@ -187,7 +187,7 @@ impl CircuitTestBuilder { let mut builder = BlockData::new_from_geth_data_with_params(block.clone(), params) .new_circuit_input_builder(); builder - .handle_block(&block.eth_block, &block.geth_traces) + .handle_block_with_anchor(&block.eth_block, &block.geth_traces, true) .unwrap(); // Build a witness block from trace result. let mut block = From 4bc10f81dd60b61a575ba50044fa9f9e0b024c4b Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 7 Aug 2023 12:50:05 +0000 Subject: [PATCH 11/55] fix: anchor without updating balance --- bus-mapping/src/circuit_input_builder.rs | 12 ++- .../src/circuit_input_builder/transaction.rs | 4 + bus-mapping/src/evm/opcodes/begin_end_tx.rs | 100 +++++++++--------- .../src/evm_circuit/execution/end_tx.rs | 54 ++++++---- zkevm-circuits/src/evm_circuit/param.rs | 2 +- zkevm-circuits/src/taiko_test_util.rs | 5 +- 6 files changed, 101 insertions(+), 76 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index f94fa3f263..d152bb7cf1 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -155,6 +155,7 @@ impl<'a> CircuitInputBuilder { &mut self, eth_tx: ð_types::Transaction, is_success: bool, + is_anchor: bool, ) -> Result { let call_id = self.block_ctx.rwc.0; @@ -169,7 +170,14 @@ impl<'a> CircuitInputBuilder { ), ); - Transaction::new(call_id, &self.sdb, &mut self.code_db, eth_tx, is_success) + Transaction::new( + call_id, + &self.sdb, + &mut self.code_db, + eth_tx, + is_success, + is_anchor, + ) } /// Iterate over all generated CallContext RwCounterEndOfReversion @@ -286,7 +294,7 @@ impl<'a> CircuitInputBuilder { is_anchor_tx: bool, is_last_tx: bool, ) -> Result<(), Error> { - let mut tx = self.new_tx(eth_tx, !geth_trace.failed)?; + let mut tx = self.new_tx(eth_tx, !geth_trace.failed, is_anchor_tx)?; let mut tx_ctx = TransactionContext::new(eth_tx, geth_trace, is_anchor_tx, is_last_tx)?; // Generate BeginTx step diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index 199603cf81..71c4873611 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -191,6 +191,8 @@ pub struct Transaction { pub tx: geth_types::Transaction, /// Calls made in the transaction pub(crate) calls: Vec, + /// Whether this transaction is an anchor transaction + pub is_anchor: bool, /// Execution steps steps: Vec, } @@ -203,6 +205,7 @@ impl Transaction { code_db: &mut CodeDB, eth_tx: ð_types::Transaction, is_success: bool, + is_anchor: bool, ) -> Result { let (found, _) = sdb.get_account(ð_tx.from); if !found { @@ -255,6 +258,7 @@ impl Transaction { tx: eth_tx.into(), calls: vec![call], steps: Vec::new(), + is_anchor, }) } diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index 597f09ae62..ef50037ee1 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -248,58 +248,60 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result }, ); - let effective_refund = refund - .min((state.tx.gas() - exec_step.gas_left.0) / MAX_REFUND_QUOTIENT_OF_GAS_USED as u64); - let (found, caller_account) = state.sdb.get_account(&call.caller_address); - if !found { - return Err(Error::AccountNotFound(call.caller_address)); - } - let caller_balance_prev = caller_account.balance; - let caller_balance = - caller_balance_prev + state.tx.tx.gas_price * (exec_step.gas_left.0 + effective_refund); - state.account_write( - &mut exec_step, - call.caller_address, - AccountField::Balance, - caller_balance, - caller_balance_prev, - )?; + if !state.tx.is_anchor { + let effective_refund = refund + .min((state.tx.gas() - exec_step.gas_left.0) / MAX_REFUND_QUOTIENT_OF_GAS_USED as u64); + let (found, caller_account) = state.sdb.get_account(&call.caller_address); + if !found { + return Err(Error::AccountNotFound(call.caller_address)); + } + let caller_balance_prev = caller_account.balance; + let caller_balance = + caller_balance_prev + state.tx.tx.gas_price * (exec_step.gas_left.0 + effective_refund); + state.account_write( + &mut exec_step, + call.caller_address, + AccountField::Balance, + caller_balance, + caller_balance_prev, + )?; - let effective_tip = state.tx.tx.gas_price - state.block.base_fee; - let (found, coinbase_account) = state.sdb.get_account(&state.block.coinbase); - if !found { - return Err(Error::AccountNotFound(state.block.coinbase)); - } - let coinbase_balance_prev = coinbase_account.balance; - let coinbase_balance = - coinbase_balance_prev + effective_tip * (state.tx.gas() - exec_step.gas_left.0); - state.account_write( - &mut exec_step, - state.block.coinbase, - AccountField::Balance, - coinbase_balance, - coinbase_balance_prev, - )?; + let effective_tip = state.tx.tx.gas_price - state.block.base_fee; + let (found, coinbase_account) = state.sdb.get_account(&state.block.coinbase); + if !found { + return Err(Error::AccountNotFound(state.block.coinbase)); + } + let coinbase_balance_prev = coinbase_account.balance; + let coinbase_reward = effective_tip * (state.tx.gas() - exec_step.gas_left.0); + let coinbase_balance = coinbase_balance_prev + coinbase_reward; + state.account_write( + &mut exec_step, + state.block.coinbase, + AccountField::Balance, + coinbase_balance, + coinbase_balance_prev, + )?; - // add treasury account - let (found, treasury_account) = state - .sdb - .get_account(&state.block.protocol_instance.meta_hash.treasury); - if !found { - return Err(Error::AccountNotFound( - state.block.protocol_instance.meta_hash.treasury, - )); + // add treasury account + let (found, treasury_account) = state + .sdb + .get_account(&state.block.protocol_instance.meta_hash.treasury); + if !found { + return Err(Error::AccountNotFound( + state.block.protocol_instance.meta_hash.treasury, + )); + } + let treasury_balance_prev = treasury_account.balance; + let treasury_balance = + treasury_balance_prev + state.block.base_fee * (state.tx.gas() - exec_step.gas_left.0); + state.account_write( + &mut exec_step, + state.block.coinbase, + AccountField::Balance, + treasury_balance, + treasury_balance_prev, + )?; } - let treasury_balance_prev = treasury_account.balance; - let treasury_balance = - treasury_balance_prev + state.block.base_fee * (state.tx.gas() - exec_step.gas_left.0); - state.account_write( - &mut exec_step, - state.block.coinbase, - AccountField::Balance, - treasury_balance, - treasury_balance_prev, - )?; // handle tx receipt tag state.tx_receipt_write( &mut exec_step, diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index a6e688cb0d..7556be3db2 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -253,8 +253,6 @@ impl ExecutionGadget for EndTxGadget { ) -> Result<(), Error> { let gas_used = tx.gas - step.gas_left.0; let (refund, _) = block.get_rws(step, 2).tx_refund_value_pair(); - let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev), (treasury_balance, treasury_balance_prev)] = - [3, 4, 5].map(|index| block.get_rws(step, index).account_value_pair()); self.tx_id .assign(region, offset, Value::known(F::from(tx.id as u64)))?; @@ -269,6 +267,7 @@ impl ExecutionGadget for EndTxGadget { F::from(max_refund as u64), F::from(refund), )?; + let effective_refund = refund.min(max_refund as u64); let gas_fee_refund = tx.gas_price * (effective_refund + step.gas_left.0); self.mul_gas_price_by_refund.assign( @@ -287,13 +286,6 @@ impl ExecutionGadget for EndTxGadget { .expect("unexpected Address -> Scalar conversion failure"), ), )?; - self.gas_fee_refund.assign( - region, - offset, - caller_balance_prev, - vec![gas_fee_refund], - caller_balance, - )?; let effective_tip = tx.gas_price - block.context.base_fee; self.sub_gas_price_by_base_fee.assign( region, @@ -314,6 +306,7 @@ impl ExecutionGadget for EndTxGadget { gas_used, effective_tip * gas_used, )?; + self.coinbase.assign( region, offset, @@ -325,13 +318,6 @@ impl ExecutionGadget for EndTxGadget { .expect("unexpected Address -> Scalar conversion failure"), ), )?; - self.coinbase_reward.assign( - region, - offset, - coinbase_balance_prev, - vec![effective_tip * gas_used], - coinbase_balance, - )?; self.treasury.assign( region, offset, @@ -344,13 +330,35 @@ impl ExecutionGadget for EndTxGadget { .expect("unexpected Address -> Scalar conversion failure"), ), )?; - self.treasury_reward.assign( - region, - offset, - treasury_balance_prev, - vec![block.context.base_fee * gas_used], - treasury_balance, - )?; + + if tx.id != 1 { + let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev), (treasury_balance, treasury_balance_prev)] = + [3, 4, 5].map(|index| block.get_rws(step, index).account_value_pair()); + self.gas_fee_refund.assign( + region, + offset, + caller_balance_prev, + vec![gas_fee_refund], + caller_balance, + )?; + + self.coinbase_reward.assign( + region, + offset, + coinbase_balance_prev, + vec![effective_tip * gas_used], + coinbase_balance, + )?; + + self.treasury_reward.assign( + region, + offset, + treasury_balance_prev, + vec![block.context.base_fee * gas_used], + treasury_balance, + )?; + } + let current_cumulative_gas_used: u64 = if tx.id == 1 { 0 } else { diff --git a/zkevm-circuits/src/evm_circuit/param.rs b/zkevm-circuits/src/evm_circuit/param.rs index e21530bb9c..62305d8ee1 100644 --- a/zkevm-circuits/src/evm_circuit/param.rs +++ b/zkevm-circuits/src/evm_circuit/param.rs @@ -25,7 +25,7 @@ pub const N_PHASE1_COLUMNS: usize = // Number of copy columns pub const N_COPY_COLUMNS: usize = 2; -pub const N_BYTE_LOOKUPS: usize = 24; +pub const N_BYTE_LOOKUPS: usize = 28; /// Amount of lookup columns in the EVM circuit dedicated to lookups. pub(crate) const EVM_LOOKUP_COLS: usize = FIXED_TABLE_LOOKUPS diff --git a/zkevm-circuits/src/taiko_test_util.rs b/zkevm-circuits/src/taiko_test_util.rs index 42a67cc122..674ce51354 100644 --- a/zkevm-circuits/src/taiko_test_util.rs +++ b/zkevm-circuits/src/taiko_test_util.rs @@ -81,7 +81,10 @@ impl CircuitTestBuilder { fn empty() -> Self { CircuitTestBuilder { test_ctx: None, - circuits_params: None, + circuits_params: Some(CircuitsParams { + max_txs: 2, + ..Default::default() + }), block: None, evm_checks: Box::new(|prover, gate_rows, lookup_rows| { prover.assert_satisfied_at_rows_par( From 68052dc2ae689229a1e8a9fc769ba21d873da2ba Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 7 Aug 2023 12:53:16 +0000 Subject: [PATCH 12/55] fix: update treasury with base_fee --- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index ef50037ee1..eb2009f173 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -296,7 +296,7 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result treasury_balance_prev + state.block.base_fee * (state.tx.gas() - exec_step.gas_left.0); state.account_write( &mut exec_step, - state.block.coinbase, + state.block.protocol_instance.meta_hash.treasury, AccountField::Balance, treasury_balance, treasury_balance_prev, From 182c5e5eb52aa23f5cca30cd4ae6400dfdb69ba3 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Tue, 8 Aug 2023 03:16:02 +0000 Subject: [PATCH 13/55] fix: use anchor flag in context --- bus-mapping/src/circuit_input_builder.rs | 12 ++----- .../src/circuit_input_builder/transaction.rs | 4 --- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 2 +- .../src/evm_circuit/execution/begin_tx.rs | 35 +++++++++++-------- 4 files changed, 24 insertions(+), 29 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index d152bb7cf1..f94fa3f263 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -155,7 +155,6 @@ impl<'a> CircuitInputBuilder { &mut self, eth_tx: ð_types::Transaction, is_success: bool, - is_anchor: bool, ) -> Result { let call_id = self.block_ctx.rwc.0; @@ -170,14 +169,7 @@ impl<'a> CircuitInputBuilder { ), ); - Transaction::new( - call_id, - &self.sdb, - &mut self.code_db, - eth_tx, - is_success, - is_anchor, - ) + Transaction::new(call_id, &self.sdb, &mut self.code_db, eth_tx, is_success) } /// Iterate over all generated CallContext RwCounterEndOfReversion @@ -294,7 +286,7 @@ impl<'a> CircuitInputBuilder { is_anchor_tx: bool, is_last_tx: bool, ) -> Result<(), Error> { - let mut tx = self.new_tx(eth_tx, !geth_trace.failed, is_anchor_tx)?; + let mut tx = self.new_tx(eth_tx, !geth_trace.failed)?; let mut tx_ctx = TransactionContext::new(eth_tx, geth_trace, is_anchor_tx, is_last_tx)?; // Generate BeginTx step diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index 71c4873611..199603cf81 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -191,8 +191,6 @@ pub struct Transaction { pub tx: geth_types::Transaction, /// Calls made in the transaction pub(crate) calls: Vec, - /// Whether this transaction is an anchor transaction - pub is_anchor: bool, /// Execution steps steps: Vec, } @@ -205,7 +203,6 @@ impl Transaction { code_db: &mut CodeDB, eth_tx: ð_types::Transaction, is_success: bool, - is_anchor: bool, ) -> Result { let (found, _) = sdb.get_account(ð_tx.from); if !found { @@ -258,7 +255,6 @@ impl Transaction { tx: eth_tx.into(), calls: vec![call], steps: Vec::new(), - is_anchor, }) } diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index eb2009f173..dcce22dd01 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -248,7 +248,7 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result }, ); - if !state.tx.is_anchor { + if !state.tx_ctx.is_anchor_tx() { let effective_refund = refund .min((state.tx.gas() - exec_step.gas_left.0) / MAX_REFUND_QUOTIENT_OF_GAS_USED as u64); let (found, caller_account) = state.sdb.get_account(&call.caller_address); diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 25e356f78c..6769fb2e6f 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -181,11 +181,12 @@ impl ExecutionGadget for BeginTxGadget { }); // Anchor is always the first tx of the list - let not_anchor_tx = not::expr(IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()).expr()); + let is_anchor_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); + let not_anchor_tx = not::expr(is_anchor_tx.expr()); // Transfer value from caller to callee, creating account if necessary. // only update caller and callee account when tx is not anchor - let transfer_with_gas_fee = cb.condition(not_anchor_tx, |cb| { + let transfer_with_gas_fee = cb.condition(not_anchor_tx.expr(), |cb| { TransferWithGasFeeGadget::construct( cb, tx_caller_address.expr(), @@ -197,6 +198,12 @@ impl ExecutionGadget for BeginTxGadget { &mut reversion_info, ) }); + // ignore anchor's transfer + let transfer_with_gas_fee_rw_delta = select::expr( + is_anchor_tx.expr(), + 0.expr(), + transfer_with_gas_fee.rw_delta(), + ); let caller_nonce_hash_bytes = array_init::array_init(|_| cb.query_byte()); let create = ContractCreateGadget::construct(cb); @@ -288,7 +295,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsRoot // - Write CallContext IsCreate // - Write CallContext CodeHash - rw_counter: Delta(21.expr() + transfer_with_gas_fee.rw_delta()), + rw_counter: Delta(21.expr() + transfer_with_gas_fee_rw_delta.expr()), call_id: To(call_id.expr()), is_root: To(true.expr()), is_create: To(tx_is_create.expr()), @@ -331,7 +338,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write TxAccessListAccount // - Read Account CodeHash // - a TransferWithGasFeeGadget - rw_counter: Delta(8.expr() + transfer_with_gas_fee.rw_delta()), + rw_counter: Delta(8.expr() + transfer_with_gas_fee_rw_delta.expr()), call_id: To(call_id.expr()), ..StepStateTransition::any() }); @@ -388,7 +395,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsRoot // - Write CallContext IsCreate // - Write CallContext CodeHash - rw_counter: Delta(21.expr() + transfer_with_gas_fee.rw_delta()), + rw_counter: Delta(21.expr() + transfer_with_gas_fee_rw_delta.expr()), call_id: To(call_id.expr()), is_root: To(true.expr()), is_create: To(tx_is_create.expr()), @@ -655,17 +662,17 @@ mod test { // Transfer 1 ether to account with empty code, successfully test_ok(mock_tx(eth(1), gwei(2), vec![]), None); - // Transfer 1 ether, successfully - test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_return())); + // // Transfer 1 ether, successfully + // test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_return())); - // Transfer 1 ether, tx reverts - test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_revert())); + // // Transfer 1 ether, tx reverts + // test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_revert())); - // Transfer nothing with some calldata - test_ok( - mock_tx(eth(0), gwei(2), vec![1, 2, 3, 4, 0, 0, 0, 0]), - Some(code_with_return()), - ); + // // Transfer nothing with some calldata + // test_ok( + // mock_tx(eth(0), gwei(2), vec![1, 2, 3, 4, 0, 0, 0, 0]), + // Some(code_with_return()), + // ); } #[test] From 03c2047cfca5fa479310fe368defa546f226e04a Mon Sep 17 00:00:00 2001 From: johntaiko Date: Tue, 8 Aug 2023 03:49:40 +0000 Subject: [PATCH 14/55] feat: treat anchor specially --- .../circuit_input_builder/input_state_ref.rs | 25 ++-- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 121 ++++++++++-------- 2 files changed, 77 insertions(+), 69 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index b012115263..564f63d466 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -474,29 +474,21 @@ impl<'a> CircuitInputStateRef<'a> { must_create: bool, value: Word, fee: Option, - is_anchor_tx: bool, ) -> Result<(), Error> { let (found, sender_account) = self.sdb.get_account(&sender); if !found { return Err(Error::AccountNotFound(sender)); } let mut sender_balance_prev = sender_account.balance; - if !is_anchor_tx { - debug_assert!( - sender_account.balance >= value + fee.unwrap_or_default(), - "invalid amount balance {:?} value {:?} fee {:?}", - sender_balance_prev, - value, - fee - ); - } + debug_assert!( + sender_account.balance >= value + fee.unwrap_or_default(), + "invalid amount balance {:?} value {:?} fee {:?}", + sender_balance_prev, + value, + fee + ); if let Some(fee) = fee { - let sender_balance = if is_anchor_tx { - // anchor tx doesn't need fee - sender_balance_prev - } else { - sender_balance_prev - fee - }; + let sender_balance = sender_balance_prev - fee; log::trace!( "sender balance update with fee (not reversible): {:?} {:?}->{:?}", sender, @@ -583,7 +575,6 @@ impl<'a> CircuitInputStateRef<'a> { must_create, value, None, - false, ) } diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index dcce22dd01..57fd10a9dd 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -98,6 +98,13 @@ fn gen_begin_tx_steps(state: &mut CircuitInputStateRef) -> Result Result Result }, ); - if !state.tx_ctx.is_anchor_tx() { - let effective_refund = refund - .min((state.tx.gas() - exec_step.gas_left.0) / MAX_REFUND_QUOTIENT_OF_GAS_USED as u64); - let (found, caller_account) = state.sdb.get_account(&call.caller_address); - if !found { - return Err(Error::AccountNotFound(call.caller_address)); - } - let caller_balance_prev = caller_account.balance; - let caller_balance = - caller_balance_prev + state.tx.tx.gas_price * (exec_step.gas_left.0 + effective_refund); - state.account_write( - &mut exec_step, - call.caller_address, - AccountField::Balance, - caller_balance, - caller_balance_prev, - )?; + let effective_refund = refund + .min((state.tx.gas() - exec_step.gas_left.0) / MAX_REFUND_QUOTIENT_OF_GAS_USED as u64); + let (found, caller_account) = state.sdb.get_account(&call.caller_address); + if !found { + return Err(Error::AccountNotFound(call.caller_address)); + } + let caller_balance_prev = caller_account.balance; + let caller_balance = caller_balance_prev + + if state.tx_ctx.is_anchor_tx() { + 0.into() + } else { + state.tx.tx.gas_price * (exec_step.gas_left.0 + effective_refund) + }; + state.account_write( + &mut exec_step, + call.caller_address, + AccountField::Balance, + caller_balance, + caller_balance_prev, + )?; - let effective_tip = state.tx.tx.gas_price - state.block.base_fee; - let (found, coinbase_account) = state.sdb.get_account(&state.block.coinbase); - if !found { - return Err(Error::AccountNotFound(state.block.coinbase)); - } - let coinbase_balance_prev = coinbase_account.balance; - let coinbase_reward = effective_tip * (state.tx.gas() - exec_step.gas_left.0); - let coinbase_balance = coinbase_balance_prev + coinbase_reward; - state.account_write( - &mut exec_step, - state.block.coinbase, - AccountField::Balance, - coinbase_balance, - coinbase_balance_prev, - )?; + let effective_tip = state.tx.tx.gas_price - state.block.base_fee; + let (found, coinbase_account) = state.sdb.get_account(&state.block.coinbase); + if !found { + return Err(Error::AccountNotFound(state.block.coinbase)); + } + let coinbase_balance_prev = coinbase_account.balance; + let coinbase_balance = coinbase_balance_prev + + if state.tx_ctx.is_anchor_tx() { + 0.into() + } else { + effective_tip * (state.tx.gas() - exec_step.gas_left.0) + }; + state.account_write( + &mut exec_step, + state.block.coinbase, + AccountField::Balance, + coinbase_balance, + coinbase_balance_prev, + )?; - // add treasury account - let (found, treasury_account) = state - .sdb - .get_account(&state.block.protocol_instance.meta_hash.treasury); - if !found { - return Err(Error::AccountNotFound( - state.block.protocol_instance.meta_hash.treasury, - )); - } - let treasury_balance_prev = treasury_account.balance; - let treasury_balance = - treasury_balance_prev + state.block.base_fee * (state.tx.gas() - exec_step.gas_left.0); - state.account_write( - &mut exec_step, + // add treasury account + let (found, treasury_account) = state + .sdb + .get_account(&state.block.protocol_instance.meta_hash.treasury); + if !found { + return Err(Error::AccountNotFound( state.block.protocol_instance.meta_hash.treasury, - AccountField::Balance, - treasury_balance, - treasury_balance_prev, - )?; + )); } + let treasury_balance_prev = treasury_account.balance; + let treasury_balance = treasury_balance_prev + + if state.tx_ctx.is_anchor_tx() { + 0.into() + } else { + state.block.base_fee * (state.tx.gas() - exec_step.gas_left.0) + }; + state.account_write( + &mut exec_step, + state.block.protocol_instance.meta_hash.treasury, + AccountField::Balance, + treasury_balance, + treasury_balance_prev, + )?; + // handle tx receipt tag state.tx_receipt_write( &mut exec_step, From aff5000b777861edebe6cc55a5b7708d8a7c005f Mon Sep 17 00:00:00 2001 From: johntaiko Date: Tue, 8 Aug 2023 05:41:52 +0000 Subject: [PATCH 15/55] feat: treat anchor's gas_price as zero --- Cargo.lock | 1 + bus-mapping/Cargo.toml | 1 + .../circuit_input_builder/input_state_ref.rs | 9 +- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 31 ++-- taiko-mock/src/lib.rs | 2 +- .../src/evm_circuit/execution/begin_tx.rs | 40 ++--- .../src/evm_circuit/execution/end_tx.rs | 148 +++++++++--------- 7 files changed, 107 insertions(+), 125 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a8395e98a8..21f29094a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -385,6 +385,7 @@ dependencies = [ "serde_json", "strum", "strum_macros", + "taiko-mock", "tokio", "url", ] diff --git a/bus-mapping/Cargo.toml b/bus-mapping/Cargo.toml index c952158396..6cd4f366bf 100644 --- a/bus-mapping/Cargo.toml +++ b/bus-mapping/Cargo.toml @@ -10,6 +10,7 @@ eth-types = { path = "../eth-types" } gadgets = { path = "../gadgets" } keccak256 = { path = "../keccak256" } mock = { path = "../mock", optional = true } +taiko-mock = { path = "../taiko-mock", optional = true } ethers-core = "=2.0.0" ethers-providers = "=2.0.0" diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index 564f63d466..e264f6effa 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -309,10 +309,11 @@ impl<'a> CircuitInputStateRef<'a> { && (matches!(rw, RW::READ) || (op.value_prev.is_zero() && op.value.is_zero()))) && account.is_empty() { - panic!( - "RWTable Account field {:?} lookup to non-existing account rwc: {}, op: {:?}", - rw, self.block_ctx.rwc.0, op - ); + + // panic!( + // "RWTable Account field {:?} lookup to non-existing account rwc: {}, op: {:?}", + // rw, self.block_ctx.rwc.0, op + // ); } // -- sanity check end -- // Perform the write to the account in the StateDB diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index 57fd10a9dd..f69d0ed71b 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -98,13 +98,6 @@ fn gen_begin_tx_steps(state: &mut CircuitInputStateRef) -> Result Result Result return Err(Error::AccountNotFound(call.caller_address)); } let caller_balance_prev = caller_account.balance; - let caller_balance = caller_balance_prev - + if state.tx_ctx.is_anchor_tx() { - 0.into() - } else { - state.tx.tx.gas_price * (exec_step.gas_left.0 + effective_refund) - }; + let caller_balance = + caller_balance_prev + state.tx.tx.gas_price * (exec_step.gas_left.0 + effective_refund); state.account_write( &mut exec_step, call.caller_address, @@ -275,18 +264,18 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result caller_balance_prev, )?; - let effective_tip = state.tx.tx.gas_price - state.block.base_fee; + let effective_tip = if state.tx_ctx.is_anchor_tx() { + 0.into() + } else { + state.tx.tx.gas_price - state.block.base_fee + }; let (found, coinbase_account) = state.sdb.get_account(&state.block.coinbase); if !found { return Err(Error::AccountNotFound(state.block.coinbase)); } let coinbase_balance_prev = coinbase_account.balance; - let coinbase_balance = coinbase_balance_prev - + if state.tx_ctx.is_anchor_tx() { - 0.into() - } else { - effective_tip * (state.tx.gas() - exec_step.gas_left.0) - }; + let coinbase_balance = + coinbase_balance_prev + effective_tip * (state.tx.gas() - exec_step.gas_left.0); state.account_write( &mut exec_step, state.block.coinbase, diff --git a/taiko-mock/src/lib.rs b/taiko-mock/src/lib.rs index 42d3835c2b..d7456ec68a 100644 --- a/taiko-mock/src/lib.rs +++ b/taiko-mock/src/lib.rs @@ -52,7 +52,7 @@ lazy_static! { pub static ref MOCK_TAIKO_TREASURY_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe777"); /// Mock anchor pub static ref MOCK_ANCHOR_GAS_LIMIT: Word = Word::from(180000); - pub static ref MOCK_ANCHOR_GAS_PRICE: Word = *MOCK_BASEFEE; + pub static ref MOCK_ANCHOR_GAS_PRICE: Word = Word::zero(); pub static ref MOCK_ANCHOR_L1_HASH: Hash = Hash::from_slice(&[0u8; 32]); pub static ref MOCK_ANCHOR_SIGNAL_ROOT: Hash = Hash::from_slice(&[0u8; 32]); pub static ref MOCK_ANCHOR_L1_HIGHT: u64 = 0; diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 6769fb2e6f..0d98eddd0d 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -59,9 +59,6 @@ impl ExecutionGadget for BeginTxGadget { const EXECUTION_STATE: ExecutionState = ExecutionState::BeginTx; fn configure(cb: &mut EVMConstraintBuilder) -> Self { - // additions for taiko's eip-1559 - // 1. no need update GOLDEN_TOUCH account for Anchor - // Use rw_counter of the step which triggers next call as its call_id. let call_id = cb.curr.state.rw_counter.clone(); @@ -180,29 +177,16 @@ impl ExecutionGadget for BeginTxGadget { ); // rwc_delta += 1 }); - // Anchor is always the first tx of the list - let is_anchor_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); - let not_anchor_tx = not::expr(is_anchor_tx.expr()); - // Transfer value from caller to callee, creating account if necessary. - // only update caller and callee account when tx is not anchor - let transfer_with_gas_fee = cb.condition(not_anchor_tx.expr(), |cb| { - TransferWithGasFeeGadget::construct( - cb, - tx_caller_address.expr(), - tx_callee_address.expr(), - not::expr(callee_not_exists.expr()), - or::expr([tx_is_create.expr(), callee_not_exists.expr()]), - tx_value.clone(), - mul_gas_fee_by_gas.product().clone(), - &mut reversion_info, - ) - }); - // ignore anchor's transfer - let transfer_with_gas_fee_rw_delta = select::expr( - is_anchor_tx.expr(), - 0.expr(), - transfer_with_gas_fee.rw_delta(), + let transfer_with_gas_fee = TransferWithGasFeeGadget::construct( + cb, + tx_caller_address.expr(), + tx_callee_address.expr(), + not::expr(callee_not_exists.expr()), + or::expr([tx_is_create.expr(), callee_not_exists.expr()]), + tx_value.clone(), + mul_gas_fee_by_gas.product().clone(), + &mut reversion_info, ); let caller_nonce_hash_bytes = array_init::array_init(|_| cb.query_byte()); @@ -295,7 +279,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsRoot // - Write CallContext IsCreate // - Write CallContext CodeHash - rw_counter: Delta(21.expr() + transfer_with_gas_fee_rw_delta.expr()), + rw_counter: Delta(21.expr() + transfer_with_gas_fee.rw_delta()), call_id: To(call_id.expr()), is_root: To(true.expr()), is_create: To(tx_is_create.expr()), @@ -338,7 +322,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write TxAccessListAccount // - Read Account CodeHash // - a TransferWithGasFeeGadget - rw_counter: Delta(8.expr() + transfer_with_gas_fee_rw_delta.expr()), + rw_counter: Delta(8.expr() + transfer_with_gas_fee.rw_delta()), call_id: To(call_id.expr()), ..StepStateTransition::any() }); @@ -395,7 +379,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsRoot // - Write CallContext IsCreate // - Write CallContext CodeHash - rw_counter: Delta(21.expr() + transfer_with_gas_fee_rw_delta.expr()), + rw_counter: Delta(21.expr() + transfer_with_gas_fee.rw_delta()), call_id: To(call_id.expr()), is_root: To(true.expr()), is_create: To(tx_is_create.expr()), diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 7556be3db2..8f8cbb977a 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -54,13 +54,6 @@ impl ExecutionGadget for EndTxGadget { const EXECUTION_STATE: ExecutionState = ExecutionState::EndTx; fn configure(cb: &mut EVMConstraintBuilder) -> Self { - // additions for taiko's eip-1559: - // 1. effective_gas_price = min(gas_tip_cap + base_fee, gas_fee_cap) - // a. gas_price == effective_gas_price - // 2. no need update GOLDEN_TOUCH account in Anchor(-effective_gas_price, +refund) - // 3. Anchor's gas_tip_cap == 0 - // 4. check gas_price == min(gas_tip_cap + base_fee, gas_fee_cap) - let tx_id = cb.call_context(None, CallContextFieldTag::TxId); let is_persistent = cb.call_context(None, CallContextFieldTag::IsPersistent); @@ -93,6 +86,12 @@ impl ExecutionGadget for EndTxGadget { tx_gas_price.clone(), effective_refund.min() + cb.curr.state.gas_left.expr(), ); + let gas_fee_refund = UpdateBalanceGadget::construct( + cb, + tx_caller_address.expr(), + vec![mul_gas_price_by_refund.product().clone()], + None, + ); // Add gas_used * effective_tip to coinbase's balance let coinbase = cb.query_cell(); @@ -104,11 +103,14 @@ impl ExecutionGadget for EndTxGadget { cb.block_lookup(tag.expr(), None, value); } let effective_tip = cb.query_word_rlc(); - let sub_gas_price_by_base_fee = AddWordsGadget::construct( - cb, - [effective_tip.clone(), base_fee.clone()], - tx_gas_price.clone(), - ); + // in anchor, we let tx_gas_price equals to zero + let sub_gas_price_by_base_fee = cb.condition(1.expr() - is_first_tx.expr(), |cb| { + AddWordsGadget::construct( + cb, + [effective_tip.clone(), base_fee.clone()], + tx_gas_price.clone(), + ) + }); let mul_effective_tip_by_gas_used = MulWordByU64Gadget::construct(cb, effective_tip, gas_used.clone()); let mul_base_fee_by_gas_used = @@ -120,37 +122,38 @@ impl ExecutionGadget for EndTxGadget { 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(); - cb.require_equal( - "gas_price == min(gas_tip_cap + base_fee, gas_fee_cap)", - tx_gas_price.expr(), - effective_gas_price, - ); + cb.condition(is_first_tx.expr(), |cb| { + cb.require_equal( + "gas_price == 0 when tx is first tx", + tx_gas_price.expr(), + 0.expr(), + ); + }); + cb.condition(1.expr() - is_first_tx.expr(), |cb| { + cb.require_equal( + "gas_price == min(gas_tip_cap + base_fee, gas_fee_cap)", + tx_gas_price.expr(), + effective_gas_price, + ); + }); + // send base fee to treasury account let treasury = cb.query_cell(); - let (gas_fee_refund, coinbase_reward, treasury_reward) = - cb.condition(1.expr() - is_first_tx.expr(), |cb| { - ( - UpdateBalanceGadget::construct( - cb, - tx_caller_address.expr(), - vec![mul_gas_price_by_refund.product().clone()], - None, - ), - UpdateBalanceGadget::construct( - cb, - coinbase.expr(), - vec![mul_effective_tip_by_gas_used.product().clone()], - None, - ), - UpdateBalanceGadget::construct( - cb, - treasury.expr(), - vec![mul_base_fee_by_gas_used.product().clone()], - None, - ), - ) - }); + let coinbase_reward = UpdateBalanceGadget::construct( + cb, + coinbase.expr(), + vec![mul_effective_tip_by_gas_used.product().clone()], + None, + ); + + let treasury_reward = UpdateBalanceGadget::construct( + cb, + treasury.expr(), + vec![mul_base_fee_by_gas_used.product().clone()], + None, + ); + // constrain tx receipt fields cb.tx_receipt_lookup( 1.expr(), @@ -253,7 +256,8 @@ impl ExecutionGadget for EndTxGadget { ) -> Result<(), Error> { let gas_used = tx.gas - step.gas_left.0; let (refund, _) = block.get_rws(step, 2).tx_refund_value_pair(); - + let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev), (treasury_balance, treasury_balance_prev)] = + [3, 4, 5].map(|index| block.get_rws(step, index).account_value_pair()); self.tx_id .assign(region, offset, Value::known(F::from(tx.id as u64)))?; self.tx_gas @@ -286,7 +290,19 @@ impl ExecutionGadget for EndTxGadget { .expect("unexpected Address -> Scalar conversion failure"), ), )?; - let effective_tip = tx.gas_price - block.context.base_fee; + self.gas_fee_refund.assign( + region, + offset, + caller_balance_prev, + vec![gas_fee_refund], + caller_balance, + )?; + let is_anchor_tx = tx.id == 1; + let effective_tip = if is_anchor_tx { + 0.into() + } else { + tx.gas_price - block.context.base_fee + }; self.sub_gas_price_by_base_fee.assign( region, offset, @@ -306,7 +322,6 @@ impl ExecutionGadget for EndTxGadget { gas_used, effective_tip * gas_used, )?; - self.coinbase.assign( region, offset, @@ -318,6 +333,18 @@ impl ExecutionGadget for EndTxGadget { .expect("unexpected Address -> Scalar conversion failure"), ), )?; + self.coinbase_reward.assign( + region, + offset, + coinbase_balance_prev, + vec![effective_tip * gas_used], + coinbase_balance, + )?; + let treasury_reward = if is_anchor_tx { + 0.into() + } else { + block.context.base_fee * gas_used + }; self.treasury.assign( region, offset, @@ -330,34 +357,13 @@ impl ExecutionGadget for EndTxGadget { .expect("unexpected Address -> Scalar conversion failure"), ), )?; - - if tx.id != 1 { - let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev), (treasury_balance, treasury_balance_prev)] = - [3, 4, 5].map(|index| block.get_rws(step, index).account_value_pair()); - self.gas_fee_refund.assign( - region, - offset, - caller_balance_prev, - vec![gas_fee_refund], - caller_balance, - )?; - - self.coinbase_reward.assign( - region, - offset, - coinbase_balance_prev, - vec![effective_tip * gas_used], - coinbase_balance, - )?; - - self.treasury_reward.assign( - region, - offset, - treasury_balance_prev, - vec![block.context.base_fee * gas_used], - treasury_balance, - )?; - } + self.treasury_reward.assign( + region, + offset, + treasury_balance_prev, + vec![treasury_reward], + treasury_balance, + )?; let current_cumulative_gas_used: u64 = if tx.id == 1 { 0 From 917d83672a06771bef0d21ce52041f1bcd7587fb Mon Sep 17 00:00:00 2001 From: johntaiko Date: Tue, 8 Aug 2023 08:59:29 +0000 Subject: [PATCH 16/55] fix: testcases --- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 14 +-- eth-types/src/geth_types.rs | 8 +- taiko-mock/src/test_ctx.rs | 6 +- taiko-mock/src/transaction.rs | 4 + .../src/evm_circuit/execution/begin_tx.rs | 4 + .../src/evm_circuit/execution/end_tx.rs | 116 +++++++++--------- 6 files changed, 83 insertions(+), 69 deletions(-) diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index f69d0ed71b..9ab4217676 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -264,11 +264,13 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result caller_balance_prev, )?; - let effective_tip = if state.tx_ctx.is_anchor_tx() { + let base_fee = if state.tx_ctx.is_anchor_tx() { 0.into() } else { - state.tx.tx.gas_price - state.block.base_fee + state.block.base_fee }; + + let effective_tip = state.tx.tx.gas_price - base_fee; let (found, coinbase_account) = state.sdb.get_account(&state.block.coinbase); if !found { return Err(Error::AccountNotFound(state.block.coinbase)); @@ -294,12 +296,8 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result )); } let treasury_balance_prev = treasury_account.balance; - let treasury_balance = treasury_balance_prev - + if state.tx_ctx.is_anchor_tx() { - 0.into() - } else { - state.block.base_fee * (state.tx.gas() - exec_step.gas_left.0) - }; + let treasury_balance = + treasury_balance_prev + base_fee * (state.tx.gas() - exec_step.gas_left.0); state.account_write( &mut exec_step, state.block.protocol_instance.meta_hash.treasury, diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index e34111de4b..7178ff38cc 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -158,8 +158,8 @@ impl From<&Transaction> for crate::Transaction { gas: tx.gas_limit.to_word(), value: tx.value, gas_price: Some(tx.gas_price), - max_priority_fee_per_gas: Some(tx.gas_fee_cap), - max_fee_per_gas: Some(tx.gas_tip_cap), + max_priority_fee_per_gas: Some(tx.gas_tip_cap), + max_fee_per_gas: Some(tx.gas_fee_cap), input: tx.call_data.clone(), access_list: tx.access_list.clone(), v: tx.v.into(), @@ -179,8 +179,8 @@ impl From<&crate::Transaction> for Transaction { gas_limit: tx.gas.as_u64().into(), value: tx.value, gas_price: tx.gas_price.unwrap_or_default(), - gas_fee_cap: tx.max_priority_fee_per_gas.unwrap_or_default(), - gas_tip_cap: tx.max_fee_per_gas.unwrap_or_default(), + gas_tip_cap: tx.max_priority_fee_per_gas.unwrap_or_default(), + gas_fee_cap: tx.max_fee_per_gas.unwrap_or_default(), call_data: tx.input.clone(), access_list: tx.access_list.clone(), v: tx.v.as_u64(), diff --git a/taiko-mock/src/test_ctx.rs b/taiko-mock/src/test_ctx.rs index 5ba0b96276..03b76246dd 100644 --- a/taiko-mock/src/test_ctx.rs +++ b/taiko-mock/src/test_ctx.rs @@ -1,7 +1,7 @@ //! Mock types and functions to generate Test enviroments for ZKEVM tests use crate::{ - eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_TAIKO_L2_ADDRESS, + eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_CODES, MOCK_TAIKO_L2_ADDRESS, MOCK_TAIKO_TREASURY_ADDRESS, }; use eth_types::{ @@ -122,7 +122,9 @@ impl TestContext { // add the GOLDEN_TOUCH account in the first position accounts[0].address(*GOLDEN_TOUCH); // add the l2 contract account in the second position - accounts[1].address(*MOCK_TAIKO_L2_ADDRESS); + accounts[1] + .address(*MOCK_TAIKO_L2_ADDRESS) + .code(MOCK_CODES[0].clone()); // Build Accounts modifiers let account_refs = accounts .iter_mut() diff --git a/taiko-mock/src/transaction.rs b/taiko-mock/src/transaction.rs index 55613dc22a..effcd19aa3 100644 --- a/taiko-mock/src/transaction.rs +++ b/taiko-mock/src/transaction.rs @@ -1,5 +1,7 @@ //! Mock Transaction definition and builder related methods. +use crate::MOCK_BASEFEE; + use super::{ GOLDEN_TOUCH, MOCK_ACCOUNTS, MOCK_ANCHOR_GAS_LIMIT, MOCK_ANCHOR_GAS_PRICE, MOCK_ANCHOR_TX_VALUE, MOCK_CHAIN_ID, MOCK_GASFEECAP, MOCK_GASPRICE, MOCK_GASTIPCAP, @@ -211,6 +213,8 @@ impl MockTransaction { tx.to(*MOCK_TAIKO_L2_ADDRESS); tx.gas(*MOCK_ANCHOR_GAS_LIMIT) .gas_price(*MOCK_ANCHOR_GAS_PRICE) + .max_priority_fee_per_gas(Word::zero()) + .max_fee_per_gas(*MOCK_BASEFEE) .from(*GOLDEN_TOUCH) .to(*MOCK_TAIKO_L2_ADDRESS) .input(crate::anchor::anchor_call()) diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 0d98eddd0d..7a7f4bee7c 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -614,6 +614,8 @@ mod test { .to(tx.to.unwrap()) .from(tx.from) .gas_price(tx.gas_price.unwrap()) + .max_fee_per_gas(tx.max_fee_per_gas.unwrap()) + .max_priority_fee_per_gas(tx.max_priority_fee_per_gas.unwrap()) .gas(tx.gas) .input(tx.input) .value(tx.value); @@ -635,6 +637,8 @@ mod test { .value(value) .gas(gas(&calldata)) .gas_price(gas_price) + .max_priority_fee_per_gas(gas_price) + .max_fee_per_gas(gas_price) .input(calldata.into()) .build(); diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 8f8cbb977a..6f4cf13145 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -13,7 +13,7 @@ use crate::{ AddWordsGadget, ConstantDivisionGadget, IsEqualGadget, MinMaxGadget, MinMaxWordGadget, MulWordByU64Gadget, }, - CachedRegion, Cell, + CachedRegion, Cell, Word, }, witness::{Block, Call, ExecStep, Transaction}, }, @@ -21,7 +21,7 @@ use crate::{ util::Expr, }; use bus_mapping::operation::Target; -use eth_types::{evm_types::MAX_REFUND_QUOTIENT_OF_GAS_USED, Field, ToScalar}; +use eth_types::{evm_types::MAX_REFUND_QUOTIENT_OF_GAS_USED, Field, ToLittleEndian, ToScalar}; use halo2_proofs::{circuit::Value, plonk::Error}; use strum::EnumCount; @@ -32,6 +32,7 @@ pub(crate) struct EndTxGadget { max_refund: ConstantDivisionGadget, refund: Cell, effective_refund: MinMaxGadget, + effective_gas_price: MinMaxWordGadget, mul_gas_price_by_refund: MulWordByU64Gadget, tx_caller_address: Cell, gas_fee_refund: UpdateBalanceGadget, @@ -46,6 +47,7 @@ pub(crate) struct EndTxGadget { current_cumulative_gas_used: Cell, is_first_tx: IsEqualGadget, is_persistent: Cell, + tx_gas_fee_cap: Word, } impl ExecutionGadget for EndTxGadget { @@ -67,8 +69,6 @@ impl ExecutionGadget for EndTxGadget { ] .map(|field_tag| cb.tx_context_as_word(tx_id.expr(), field_tag, None)); - let is_first_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); - // Calculate effective gas to refund let gas_used = tx_gas.expr() - cb.curr.state.gas_left.expr(); let max_refund = ConstantDivisionGadget::construct( @@ -93,24 +93,26 @@ impl ExecutionGadget for EndTxGadget { None, ); + let is_first_tx = IsEqualGadget::construct(cb, tx_id.expr(), 1.expr()); + // Add gas_used * effective_tip to coinbase's balance let coinbase = cb.query_cell(); + cb.block_lookup(BlockContextFieldTag::Coinbase.expr(), None, coinbase.expr()); let base_fee = cb.query_word_rlc(); - for (tag, value) in [ - (BlockContextFieldTag::Coinbase, coinbase.expr()), - (BlockContextFieldTag::BaseFee, base_fee.expr()), - ] { - cb.block_lookup(tag.expr(), None, value); - } - let effective_tip = cb.query_word_rlc(); - // in anchor, we let tx_gas_price equals to zero - let sub_gas_price_by_base_fee = cb.condition(1.expr() - is_first_tx.expr(), |cb| { - AddWordsGadget::construct( - cb, - [effective_tip.clone(), base_fee.clone()], - tx_gas_price.clone(), - ) + cb.condition(is_first_tx.expr(), |cb| { + cb.require_zero("base_fee is zero when tx is first tx", base_fee.expr()); + }); + cb.condition(1.expr() - is_first_tx.expr(), |cb| { + cb.block_lookup(BlockContextFieldTag::BaseFee.expr(), None, base_fee.expr()); }); + + let effective_tip = cb.query_word_rlc(); + // anchor's gas_price is 0, so gas_price != effective_tip + base_fee + let sub_gas_price_by_base_fee = AddWordsGadget::construct( + cb, + [effective_tip.clone(), base_fee.clone()], + tx_gas_price.clone(), + ); let mul_effective_tip_by_gas_used = MulWordByU64Gadget::construct(cb, effective_tip, gas_used.clone()); let mul_base_fee_by_gas_used = @@ -121,21 +123,12 @@ impl ExecutionGadget for EndTxGadget { 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(); - cb.condition(is_first_tx.expr(), |cb| { - cb.require_equal( - "gas_price == 0 when tx is first tx", - tx_gas_price.expr(), - 0.expr(), - ); - }); - cb.condition(1.expr() - is_first_tx.expr(), |cb| { - cb.require_equal( - "gas_price == min(gas_tip_cap + base_fee, gas_fee_cap)", - tx_gas_price.expr(), - effective_gas_price, - ); - }); + MinMaxWordGadget::construct(cb, &base_fee_plus_tip, &tx_gas_fee_cap); + cb.require_equal( + "gas_price == min(gas_tip_cap + base_fee, gas_fee_cap)", + tx_gas_price.expr(), + effective_gas_price.min(), + ); // send base fee to treasury account let treasury = cb.query_cell(); @@ -203,7 +196,7 @@ impl ExecutionGadget for EndTxGadget { ); cb.require_step_state_transition(StepStateTransition { - rw_counter: Delta(10.expr() - is_first_tx.expr()), + rw_counter: Delta(11.expr() - is_first_tx.expr()), ..StepStateTransition::any() }); }, @@ -213,7 +206,7 @@ impl ExecutionGadget for EndTxGadget { cb.next.execution_state_selector([ExecutionState::EndBlock]), |cb| { cb.require_step_state_transition(StepStateTransition { - rw_counter: Delta(9.expr() - is_first_tx.expr()), + rw_counter: Delta(10.expr() - is_first_tx.expr()), // We propagate call_id so that EndBlock can get the last tx_id // in order to count processed txs. call_id: Same, @@ -228,6 +221,7 @@ impl ExecutionGadget for EndTxGadget { max_refund, refund, effective_refund, + effective_gas_price, mul_gas_price_by_refund, tx_caller_address, gas_fee_refund, @@ -242,6 +236,7 @@ impl ExecutionGadget for EndTxGadget { current_cumulative_gas_used, is_first_tx, is_persistent, + tx_gas_fee_cap, } } @@ -272,6 +267,25 @@ impl ExecutionGadget for EndTxGadget { F::from(refund), )?; + let base_fee = if tx.id == 1 { + 0.into() + } else { + block.context.base_fee + }; + self.tx_gas_fee_cap + .assign(region, offset, Some(tx.gas_fee_cap.to_le_bytes()))?; + self.add_tip_cap_and_base_fee.assign( + region, + offset, + [tx.gas_tip_cap, base_fee], + tx.gas_tip_cap + base_fee, + )?; + self.effective_gas_price.assign( + region, + offset, + base_fee + tx.gas_tip_cap, + tx.gas_fee_cap, + )?; let effective_refund = refund.min(max_refund as u64); let gas_fee_refund = tx.gas_price * (effective_refund + step.gas_left.0); self.mul_gas_price_by_refund.assign( @@ -297,24 +311,14 @@ impl ExecutionGadget for EndTxGadget { vec![gas_fee_refund], caller_balance, )?; - let is_anchor_tx = tx.id == 1; - let effective_tip = if is_anchor_tx { - 0.into() - } else { - tx.gas_price - block.context.base_fee - }; + let effective_tip = tx.gas_price - base_fee; self.sub_gas_price_by_base_fee.assign( region, offset, - [effective_tip, block.context.base_fee], - tx.gas_price, - )?; - self.add_tip_cap_and_base_fee.assign( - region, - offset, - [tx.gas_tip_cap, block.context.base_fee], - tx.gas_tip_cap + block.context.base_fee, + [effective_tip, base_fee], + effective_tip + base_fee, )?; + self.mul_effective_tip_by_gas_used.assign( region, offset, @@ -322,6 +326,13 @@ impl ExecutionGadget for EndTxGadget { gas_used, effective_tip * gas_used, )?; + self.mul_base_fee_by_gas_used.assign( + region, + offset, + base_fee, + gas_used, + base_fee * gas_used, + )?; self.coinbase.assign( region, offset, @@ -340,11 +351,6 @@ impl ExecutionGadget for EndTxGadget { vec![effective_tip * gas_used], coinbase_balance, )?; - let treasury_reward = if is_anchor_tx { - 0.into() - } else { - block.context.base_fee * gas_used - }; self.treasury.assign( region, offset, @@ -361,7 +367,7 @@ impl ExecutionGadget for EndTxGadget { region, offset, treasury_balance_prev, - vec![treasury_reward], + vec![base_fee * gas_used], treasury_balance, )?; From ebe34f7ee5dc2f9c00443383af87cc1e01a0740a Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 11:04:13 +0800 Subject: [PATCH 17/55] Update zkevm-circuits/src/evm_circuit/execution/end_tx.rs Co-authored-by: Brecht Devos --- zkevm-circuits/src/evm_circuit/execution/end_tx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 6f4cf13145..8731ad871d 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -102,7 +102,7 @@ impl ExecutionGadget for EndTxGadget { cb.condition(is_first_tx.expr(), |cb| { cb.require_zero("base_fee is zero when tx is first tx", base_fee.expr()); }); - cb.condition(1.expr() - is_first_tx.expr(), |cb| { + cb.condition(not::expr(is_first_tx.expr()), |cb| { cb.block_lookup(BlockContextFieldTag::BaseFee.expr(), None, base_fee.expr()); }); From 848f8964102c58f8ca03e19eb61c57e24d5b457a Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 13:58:10 +0800 Subject: [PATCH 18/55] Update zkevm-circuits/src/evm_circuit/execution/end_tx.rs Co-authored-by: Brecht Devos --- zkevm-circuits/src/evm_circuit/execution/end_tx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 8731ad871d..5b2c9c056c 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -316,7 +316,7 @@ impl ExecutionGadget for EndTxGadget { region, offset, [effective_tip, base_fee], - effective_tip + base_fee, + tx.gas_price, )?; self.mul_effective_tip_by_gas_used.assign( From 42e25ae034a4bf02474878f26151694b440b6311 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 14:15:23 +0800 Subject: [PATCH 19/55] Update zkevm-circuits/src/evm_circuit/execution/end_tx.rs Co-authored-by: Brecht Devos --- zkevm-circuits/src/evm_circuit/execution/end_tx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 5b2c9c056c..bea62b6997 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -121,7 +121,7 @@ impl ExecutionGadget for EndTxGadget { // check gas_price == min(base_fee + gas_tip_cap, gas_fee_cap) let base_fee_plus_tip = cb.query_word_rlc(); let add_tip_cap_and_base_fee = - AddWordsGadget::construct(cb, [tx_gas_tip_cap, base_fee], base_fee_plus_tip.clone()); + AddWordsGadget::construct(cb, [base_fee, tx_gas_tip_cap], base_fee_plus_tip.clone()); let effective_gas_price = MinMaxWordGadget::construct(cb, &base_fee_plus_tip, &tx_gas_fee_cap); cb.require_equal( From 4c208e658447b2036b48474685c5d8fd9b5809ad Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 07:07:43 +0000 Subject: [PATCH 20/55] fix: comments in pr --- .../src/evm_circuit/execution/begin_tx.rs | 18 +++--- .../src/evm_circuit/execution/end_tx.rs | 62 ++++++++++--------- 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 7a7f4bee7c..bbac4d105b 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -650,17 +650,17 @@ mod test { // Transfer 1 ether to account with empty code, successfully test_ok(mock_tx(eth(1), gwei(2), vec![]), None); - // // Transfer 1 ether, successfully - // test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_return())); + // Transfer 1 ether, successfully + test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_return())); - // // Transfer 1 ether, tx reverts - // test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_revert())); + // Transfer 1 ether, tx reverts + test_ok(mock_tx(eth(1), gwei(2), vec![]), Some(code_with_revert())); - // // Transfer nothing with some calldata - // test_ok( - // mock_tx(eth(0), gwei(2), vec![1, 2, 3, 4, 0, 0, 0, 0]), - // Some(code_with_return()), - // ); + // Transfer nothing with some calldata + test_ok( + mock_tx(eth(0), gwei(2), vec![1, 2, 3, 4, 0, 0, 0, 0]), + Some(code_with_return()), + ); } #[test] diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index bea62b6997..7d8560e99b 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -22,6 +22,7 @@ use crate::{ }; use bus_mapping::operation::Target; use eth_types::{evm_types::MAX_REFUND_QUOTIENT_OF_GAS_USED, Field, ToLittleEndian, ToScalar}; +use gadgets::util::not; use halo2_proofs::{circuit::Value, plonk::Error}; use strum::EnumCount; @@ -32,12 +33,12 @@ pub(crate) struct EndTxGadget { max_refund: ConstantDivisionGadget, refund: Cell, effective_refund: MinMaxGadget, - effective_gas_price: MinMaxWordGadget, + min_max_effective_tip: MinMaxWordGadget, mul_gas_price_by_refund: MulWordByU64Gadget, tx_caller_address: Cell, gas_fee_refund: UpdateBalanceGadget, sub_gas_price_by_base_fee: AddWordsGadget, - add_tip_cap_and_base_fee: AddWordsGadget, + sub_fee_cap_by_base_fee: AddWordsGadget, mul_effective_tip_by_gas_used: MulWordByU64Gadget, mul_base_fee_by_gas_used: MulWordByU64Gadget, coinbase: Cell, @@ -47,7 +48,7 @@ pub(crate) struct EndTxGadget { current_cumulative_gas_used: Cell, is_first_tx: IsEqualGadget, is_persistent: Cell, - tx_gas_fee_cap: Word, + tx_gas_tip_cap: Word, } impl ExecutionGadget for EndTxGadget { @@ -106,28 +107,29 @@ impl ExecutionGadget for EndTxGadget { cb.block_lookup(BlockContextFieldTag::BaseFee.expr(), None, base_fee.expr()); }); + // https://eips.ethereum.org/EIPS/eip-1559 let effective_tip = cb.query_word_rlc(); - // anchor's gas_price is 0, so gas_price != effective_tip + base_fee - let sub_gas_price_by_base_fee = AddWordsGadget::construct( - cb, - [effective_tip.clone(), base_fee.clone()], - tx_gas_price.clone(), - ); + // effective_gas_price == base_fee + effective_tip + let sub_gas_price_by_base_fee = + AddWordsGadget::construct(cb, [effective_tip.clone(), base_fee.clone()], tx_gas_price); let mul_effective_tip_by_gas_used = - MulWordByU64Gadget::construct(cb, effective_tip, gas_used.clone()); + MulWordByU64Gadget::construct(cb, effective_tip.clone(), gas_used.clone()); let mul_base_fee_by_gas_used = MulWordByU64Gadget::construct(cb, base_fee.clone(), gas_used.clone()); - // check gas_price == min(base_fee + gas_tip_cap, gas_fee_cap) - let base_fee_plus_tip = cb.query_word_rlc(); - let add_tip_cap_and_base_fee = - AddWordsGadget::construct(cb, [base_fee, tx_gas_tip_cap], base_fee_plus_tip.clone()); - let effective_gas_price = - MinMaxWordGadget::construct(cb, &base_fee_plus_tip, &tx_gas_fee_cap); + // effective_tip == min(gas_tip_cap, gas_fee_cap - base_fee) + let fee_cap_sub_base_fee = cb.query_word_rlc(); + let sub_fee_cap_by_base_fee = AddWordsGadget::construct( + cb, + [base_fee.clone(), fee_cap_sub_base_fee.clone()], + tx_gas_fee_cap, + ); + let min_max_effective_tip = + MinMaxWordGadget::construct(cb, &tx_gas_tip_cap, &fee_cap_sub_base_fee); cb.require_equal( - "gas_price == min(gas_tip_cap + base_fee, gas_fee_cap)", - tx_gas_price.expr(), - effective_gas_price.min(), + "effective_tip == min(gas_tip_cap, gas_fee_cap - base_fee)", + effective_tip.expr(), + min_max_effective_tip.min(), ); // send base fee to treasury account @@ -221,12 +223,12 @@ impl ExecutionGadget for EndTxGadget { max_refund, refund, effective_refund, - effective_gas_price, + min_max_effective_tip, mul_gas_price_by_refund, tx_caller_address, gas_fee_refund, sub_gas_price_by_base_fee, - add_tip_cap_and_base_fee, + sub_fee_cap_by_base_fee, mul_effective_tip_by_gas_used, mul_base_fee_by_gas_used, coinbase, @@ -236,7 +238,7 @@ impl ExecutionGadget for EndTxGadget { current_cumulative_gas_used, is_first_tx, is_persistent, - tx_gas_fee_cap, + tx_gas_tip_cap, } } @@ -272,19 +274,19 @@ impl ExecutionGadget for EndTxGadget { } else { block.context.base_fee }; - self.tx_gas_fee_cap - .assign(region, offset, Some(tx.gas_fee_cap.to_le_bytes()))?; - self.add_tip_cap_and_base_fee.assign( + self.tx_gas_tip_cap + .assign(region, offset, Some(tx.gas_tip_cap.to_le_bytes()))?; + self.sub_fee_cap_by_base_fee.assign( region, offset, - [tx.gas_tip_cap, base_fee], - tx.gas_tip_cap + base_fee, + [base_fee, tx.gas_fee_cap - base_fee], + tx.gas_fee_cap, )?; - self.effective_gas_price.assign( + self.min_max_effective_tip.assign( region, offset, - base_fee + tx.gas_tip_cap, - tx.gas_fee_cap, + tx.gas_tip_cap, + tx.gas_fee_cap - base_fee, )?; let effective_refund = refund.min(max_refund as u64); let gas_fee_refund = tx.gas_price * (effective_refund + step.gas_left.0); From 993d6da7477594fa8a5f0ef70cbbeb7cf74612af Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 07:10:04 +0000 Subject: [PATCH 21/55] chore: add FIXME --- bus-mapping/src/circuit_input_builder/input_state_ref.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index e264f6effa..e5b8b7cc45 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -309,6 +309,8 @@ impl<'a> CircuitInputStateRef<'a> { && (matches!(rw, RW::READ) || (op.value_prev.is_zero() && op.value.is_zero()))) && account.is_empty() { + // FIXME: This is a temporary workaround for the above issue, which allows empty + // accounts to read for taiko's 1559 // panic!( // "RWTable Account field {:?} lookup to non-existing account rwc: {}, op: {:?}", From 740e65557d11b0d1f8117f3345d2bb49b65b13b1 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 07:17:40 +0000 Subject: [PATCH 22/55] fix: mock tx's signature with eip-1559 --- eth-types/src/geth_types.rs | 18 +++++++++++++++++- taiko-mock/src/anchor.rs | 4 ++-- taiko-mock/src/transaction.rs | 7 ++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 7178ff38cc..80c9ec1c54 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -6,7 +6,7 @@ use crate::{ ToWord, Word, U64, }; use ethers_core::{ - types::{transaction::response, NameOrAddress, TransactionRequest}, + types::{transaction::response, Eip1559TransactionRequest, NameOrAddress, TransactionRequest}, utils::get_contract_address, }; use ethers_signers::{LocalWallet, Signer}; @@ -205,6 +205,22 @@ impl From<&Transaction> for TransactionRequest { } } +impl From<&Transaction> for Eip1559TransactionRequest { + fn from(tx: &Transaction) -> Eip1559TransactionRequest { + Eip1559TransactionRequest { + from: Some(tx.from), + to: tx.to.map(NameOrAddress::Address), + gas: Some(tx.gas_limit.to_word()), + max_priority_fee_per_gas: Some(tx.gas_tip_cap), + max_fee_per_gas: Some(tx.gas_fee_cap), + value: Some(tx.value), + data: Some(tx.call_data.clone()), + nonce: Some(tx.nonce.to_word()), + ..Default::default() + } + } +} + fn recover_v(v: u64, chain_id: u64) -> u64 { let addition = chain_id * 2 + 35; if v >= addition { diff --git a/taiko-mock/src/anchor.rs b/taiko-mock/src/anchor.rs index 4b0ce8962c..8de3170c64 100644 --- a/taiko-mock/src/anchor.rs +++ b/taiko-mock/src/anchor.rs @@ -7,7 +7,7 @@ use eth_types::{ sign_types::{biguint_to_32bytes_le, ct_option_ok_or, sign as eth_sign, SignData, SECP256K1_Q}, word, Bytes, ToBigEndian, ToLittleEndian, ToWord, Word, U256, }; -use ethers_core::types::TransactionRequest; +use ethers_core::types::Eip1559TransactionRequest; use halo2_proofs::{ arithmetic::Field as _, halo2curves::{ @@ -28,7 +28,7 @@ static GX2: Lazy = fn fixd_k_sign(anchor_tx: &Transaction, chain_id: u64) -> Result { // msg = rlp([nonce, gasPrice, gas, to, value, data, sig_v, r, s]) - let req: TransactionRequest = anchor_tx.into(); + let req: Eip1559TransactionRequest = anchor_tx.into(); let msg = req.chain_id(chain_id).rlp(); let msg_hash: [u8; 32] = Keccak256::digest(&msg) .as_slice() diff --git a/taiko-mock/src/transaction.rs b/taiko-mock/src/transaction.rs index effcd19aa3..4b52f89a58 100644 --- a/taiko-mock/src/transaction.rs +++ b/taiko-mock/src/transaction.rs @@ -13,7 +13,7 @@ use eth_types::{ }; use ethers_core::{ rand::{CryptoRng, RngCore}, - types::{OtherFields, TransactionRequest}, + types::{Eip1559TransactionRequest, OtherFields}, }; use ethers_signers::{LocalWallet, Signer}; use lazy_static::lazy_static; @@ -334,14 +334,15 @@ impl MockTransaction { /// Consumes the mutable ref to the MockTransaction returning the structure /// by value. pub fn build(&mut self) -> Self { - let tx = TransactionRequest::new() + let tx = Eip1559TransactionRequest::new() .from(self.from.address()) .to(self.to.clone().unwrap_or_default().address()) .nonce(self.nonce) .value(self.value) .data(self.input.clone()) .gas(self.gas) - .gas_price(self.gas_price) + .max_priority_fee_per_gas(self.max_priority_fee_per_gas) + .max_fee_per_gas(self.max_fee_per_gas) .chain_id(self.chain_id.low_u64()); match (self.v, self.r, self.s) { From 9b64614f2203982c890312dba9ab2cd9d43dab56 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 07:31:02 +0000 Subject: [PATCH 23/55] fix: increase the step hight instead of width --- zkevm-circuits/src/evm_circuit/param.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zkevm-circuits/src/evm_circuit/param.rs b/zkevm-circuits/src/evm_circuit/param.rs index 62305d8ee1..ec761b4e6f 100644 --- a/zkevm-circuits/src/evm_circuit/param.rs +++ b/zkevm-circuits/src/evm_circuit/param.rs @@ -9,7 +9,7 @@ use std::collections::HashMap; // Step dimension pub(crate) const STEP_WIDTH: usize = 128; /// Step height -pub const MAX_STEP_HEIGHT: usize = 21; +pub const MAX_STEP_HEIGHT: usize = 23; /// The height of the state of a step, used by gates that connect two /// consecutive steps. We target 1, which is also convenient for padding with /// EndBlock steps. @@ -25,7 +25,7 @@ pub const N_PHASE1_COLUMNS: usize = // Number of copy columns pub const N_COPY_COLUMNS: usize = 2; -pub const N_BYTE_LOOKUPS: usize = 28; +pub const N_BYTE_LOOKUPS: usize = 24; /// Amount of lookup columns in the EVM circuit dedicated to lookups. pub(crate) const EVM_LOOKUP_COLS: usize = FIXED_TABLE_LOOKUPS From 8c33dc159cc84b02224718e296b02ca9fe8987d6 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 07:38:46 +0000 Subject: [PATCH 24/55] feat: add treasury account in the block table --- zkevm-circuits/src/table/block_table.rs | 2 ++ zkevm-circuits/src/witness/block.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/zkevm-circuits/src/table/block_table.rs b/zkevm-circuits/src/table/block_table.rs index 443e993673..4c58b76377 100644 --- a/zkevm-circuits/src/table/block_table.rs +++ b/zkevm-circuits/src/table/block_table.rs @@ -21,6 +21,8 @@ pub enum BlockContextFieldTag { /// Chain ID field. Although this is not a field in the block header, we /// add it here for convenience. ChainId, + /// Treasury accounts for receiving block base fee + Treasury, } impl_expr!(BlockContextFieldTag); diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index 4d8d38e2f3..29dfa905cc 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -172,6 +172,8 @@ impl Block { pub struct BlockContext { /// The address of the miner for the block pub coinbase: Address, + /// The address of the treasury for the base fee + pub treasury: Address, /// The gas limit of the block pub gas_limit: u64, /// The number of the block @@ -200,6 +202,11 @@ impl BlockContext { Value::known(F::ZERO), Value::known(self.coinbase.to_scalar().unwrap()), ], + [ + Value::known(F::from(BlockContextFieldTag::Treasury as u64)), + Value::known(F::ZERO), + Value::known(self.treasury.to_scalar().unwrap()), + ], [ Value::known(F::from(BlockContextFieldTag::Timestamp as u64)), Value::known(F::ZERO), @@ -264,6 +271,7 @@ impl From<&circuit_input_builder::Block> for BlockContext { fn from(block: &circuit_input_builder::Block) -> Self { Self { coinbase: block.coinbase, + treasury: block.protocol_instance.meta_hash.treasury, gas_limit: block.gas_limit, number: block.number, timestamp: block.timestamp, From 11cdc1b6a7cbdcfad0a7727f801ee1114ede8f9f Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 07:45:18 +0000 Subject: [PATCH 25/55] fix: taiko-mock's feature --- circuit-benchmarks/src/taiko_super_circuit.rs | 3 +-- zkevm-circuits/Cargo.toml | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/circuit-benchmarks/src/taiko_super_circuit.rs b/circuit-benchmarks/src/taiko_super_circuit.rs index 01edd78985..b2fb94f8c1 100644 --- a/circuit-benchmarks/src/taiko_super_circuit.rs +++ b/circuit-benchmarks/src/taiko_super_circuit.rs @@ -9,10 +9,9 @@ use zkevm_circuits::{ taiko_aggregation::AccumulationSchemeType, KzgDk, KzgSvk, TaikoAggregationCircuit, }, taiko_super_circuit::{test::block_1tx, SuperCircuit}, - witness::ProtocolInstance, }; -use bus_mapping::circuit_input_builder::CircuitsParams; +use bus_mapping::circuit_input_builder::{CircuitsParams, ProtocolInstance}; use rand::SeedableRng; diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index c4175f0ccb..143cffe5a1 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -47,13 +47,14 @@ ethers-signers = "=2.0.0" hex = "0.4.3" itertools = "0.10.1" mock = { path = "../mock" } +taiko-mock = { path = "../taiko-mock" } pretty_assertions = "1.0.0" serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.78" [features] default = [] -test = ["ethers-signers", "mock", "bus-mapping/test"] +test = ["ethers-signers", "mock", "taiko-mock", "bus-mapping/test"] test-circuits = [] warn-unimplemented = ["eth-types/warn-unimplemented"] stats = ["warn-unimplemented", "dep:cli-table"] From c6243e014aa3fe536bfd83bb2ed6fc77d245404c Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 10 Aug 2023 13:58:02 +0000 Subject: [PATCH 26/55] fix: need lookup the treasury --- zkevm-circuits/src/evm_circuit/execution/end_tx.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 7d8560e99b..5f2643e71a 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -134,6 +134,7 @@ impl ExecutionGadget for EndTxGadget { // send base fee to treasury account let treasury = cb.query_cell(); + cb.block_lookup(BlockContextFieldTag::Treasury.expr(), None, treasury.expr()); let coinbase_reward = UpdateBalanceGadget::construct( cb, From 218bd67392f552132a5a02fd7e60171f305d94a3 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Fri, 11 Aug 2023 09:11:27 +0000 Subject: [PATCH 27/55] feat: support dummy PUSH0 --- bus-mapping/src/evm/opcodes.rs | 5 ++ bus-mapping/src/evm/opcodes/push0.rs | 27 ++++++++ eth-types/src/evm_types/opcode_ids.rs | 9 +++ geth-utils/gethutil/asm.go | 6 +- zkevm-circuits/src/evm_circuit/execution.rs | 4 ++ .../execution/error_invalid_opcode.rs | 2 +- .../src/evm_circuit/execution/push0.rs | 66 +++++++++++++++++++ zkevm-circuits/src/evm_circuit/step.rs | 5 ++ 8 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 bus-mapping/src/evm/opcodes/push0.rs create mode 100644 zkevm-circuits/src/evm_circuit/execution/push0.rs diff --git a/bus-mapping/src/evm/opcodes.rs b/bus-mapping/src/evm/opcodes.rs index 781d724882..30510d6e75 100644 --- a/bus-mapping/src/evm/opcodes.rs +++ b/bus-mapping/src/evm/opcodes.rs @@ -35,6 +35,7 @@ mod mload; mod mstore; mod number; mod origin; +mod push0; mod return_revert; mod returndatacopy; mod returndatasize; @@ -91,6 +92,7 @@ use logs::Log; use mload::Mload; use mstore::Mstore; use origin::Origin; +use push0::Push0; use return_revert::ReturnRevert; use returndatacopy::Returndatacopy; use returndatasize::Returndatasize; @@ -143,6 +145,9 @@ type FnGenAssociatedOps = fn( ) -> Result, Error>; fn fn_gen_associated_ops(opcode_id: &OpcodeId) -> FnGenAssociatedOps { + if opcode_id.is_push0() { + return Push0::gen_associated_ops; + } if opcode_id.is_push() { return StackOnlyOpcode::<0, 1>::gen_associated_ops; } diff --git a/bus-mapping/src/evm/opcodes/push0.rs b/bus-mapping/src/evm/opcodes/push0.rs new file mode 100644 index 0000000000..eeffd7ec4f --- /dev/null +++ b/bus-mapping/src/evm/opcodes/push0.rs @@ -0,0 +1,27 @@ +use super::Opcode; +use crate::{ + circuit_input_builder::{CircuitInputStateRef, ExecStep}, + Error, +}; +use eth_types::{GethExecStep, U256}; + +#[derive(Clone, Copy, Debug)] +pub(crate) struct Push0; + +impl Opcode for Push0 { + fn gen_associated_ops( + state: &mut CircuitInputStateRef, + geth_steps: &[GethExecStep], + ) -> Result, Error> { + let geth_step = &geth_steps[0]; + let mut exec_step = state.new_step(geth_step)?; + + state.stack_write( + &mut exec_step, + geth_steps[1].stack.last_filled(), + U256::zero(), + )?; + + Ok(vec![exec_step]) + } +} diff --git a/eth-types/src/evm_types/opcode_ids.rs b/eth-types/src/evm_types/opcode_ids.rs index d9192fcae4..0bb7d69347 100644 --- a/eth-types/src/evm_types/opcode_ids.rs +++ b/eth-types/src/evm_types/opcode_ids.rs @@ -95,6 +95,8 @@ pub enum OpcodeId { JUMPDEST, // PUSHn + /// `PUSH0` + PUSH0, /// `PUSH1` PUSH1, /// `PUSH2` @@ -320,6 +322,11 @@ impl OpcodeId { self.as_u8() >= Self::PUSH1.as_u8() && self.as_u8() <= Self::PUSH32.as_u8() } + /// Returns `true` if the `OpcodeId` is a `PUSH0`. + pub fn is_push0(&self) -> bool { + self == &Self::PUSH0 + } + /// Returns `true` if the `OpcodeId` is a `DUPn`. pub fn is_dup(&self) -> bool { self.as_u8() >= Self::DUP1.as_u8() && self.as_u8() <= Self::DUP16.as_u8() @@ -402,6 +409,7 @@ impl OpcodeId { OpcodeId::PC => 0x58u8, OpcodeId::MSIZE => 0x59u8, OpcodeId::JUMPDEST => 0x5bu8, + OpcodeId::PUSH0 => 0x5fu8, OpcodeId::PUSH1 => 0x60u8, OpcodeId::PUSH2 => 0x61u8, OpcodeId::PUSH3 => 0x62u8, @@ -580,6 +588,7 @@ impl OpcodeId { OpcodeId::MSIZE => GasCost::QUICK, OpcodeId::GAS => GasCost::QUICK, OpcodeId::JUMPDEST => GasCost::ONE, + OpcodeId::PUSH0 => GasCost::QUICK, OpcodeId::PUSH1 => GasCost::FASTEST, OpcodeId::PUSH2 => GasCost::FASTEST, OpcodeId::PUSH3 => GasCost::FASTEST, diff --git a/geth-utils/gethutil/asm.go b/geth-utils/gethutil/asm.go index b5546f876a..2a874c22bd 100644 --- a/geth-utils/gethutil/asm.go +++ b/geth-utils/gethutil/asm.go @@ -37,7 +37,7 @@ func (a *Asm) PrintMnemonics(out io.Writer) { for idx := 0; idx < len(a.bytecode); { code := vm.OpCode(a.bytecode[idx]) if code.IsPush() { - n := int(code) - int(vm.PUSH1) + 1 + n := int(code) - int(vm.PUSH0) fmt.Fprintf(out, "%02d\t%s\t0x%x\n", idx, code.String(), a.bytecode[idx+1:idx+1+n]) idx += n + 1 } else { @@ -121,6 +121,8 @@ func (a *Asm) MSize() *Asm { return a.appendByte(vm.MSIZE) } func (a *Asm) Gas() *Asm { return a.appendByte(vm.GAS) } func (a *Asm) JumpDest(label ...string) *Asm { return a.jumpDest(label...) } +func (a *Asm) Push0() *Asm { return a.appendByte(vm.PUSH0) } + // 0x60 range func (a *Asm) PushX(val interface{}) *Asm { return a.push(val) } func (a *Asm) DupX(x int) *Asm { @@ -200,7 +202,7 @@ func (a *Asm) push(v ...interface{}) *Asm { bytes := toBytes(v) rangeCheck(len(bytes), 1, 32, "len(bytes)") - a.appendByte(int(vm.PUSH1) + len(bytes) - 1) + a.appendByte(int(vm.PUSH0) + len(bytes)) for _, b := range bytes { a.appendByte(b) diff --git a/zkevm-circuits/src/evm_circuit/execution.rs b/zkevm-circuits/src/evm_circuit/execution.rs index d605ac094b..4581430c79 100644 --- a/zkevm-circuits/src/evm_circuit/execution.rs +++ b/zkevm-circuits/src/evm_circuit/execution.rs @@ -95,6 +95,7 @@ mod origin; mod pc; mod pop; mod push; +mod push0; mod return_revert; mod returndatacopy; mod returndatasize; @@ -165,6 +166,7 @@ use origin::OriginGadget; use pc::PcGadget; use pop::PopGadget; use push::PushGadget; +use push0::DummyPush0Gadget; use return_revert::ReturnRevertGadget; use returndatacopy::ReturnDataCopyGadget; use returndatasize::ReturnDataSizeGadget; @@ -261,6 +263,7 @@ pub struct ExecutionConfig { pc_gadget: Box>, pop_gadget: Box>, push_gadget: Box>, + push0_gadget: Box>, return_revert_gadget: Box>, sar_gadget: Box>, sdiv_smod_gadget: Box>, @@ -524,6 +527,7 @@ impl ExecutionConfig { pc_gadget: configure_gadget!(), pop_gadget: configure_gadget!(), push_gadget: configure_gadget!(), + push0_gadget: configure_gadget!(), return_revert_gadget: configure_gadget!(), sdiv_smod_gadget: configure_gadget!(), selfbalance_gadget: configure_gadget!(), diff --git a/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs b/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs index 868a830306..b4db5e92e4 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs @@ -81,7 +81,7 @@ mod test { vec![0xf6], vec![0xfe], // Multiple invalid opcodes - vec![0x5c, 0x5e, 0x5f], + vec![0x5c, 0x5e], ]; } diff --git a/zkevm-circuits/src/evm_circuit/execution/push0.rs b/zkevm-circuits/src/evm_circuit/execution/push0.rs new file mode 100644 index 0000000000..c5f24cb07c --- /dev/null +++ b/zkevm-circuits/src/evm_circuit/execution/push0.rs @@ -0,0 +1,66 @@ +use crate::{ + evm_circuit::{ + execution::ExecutionGadget, + step::ExecutionState, + util::{ + common_gadget::SameContextGadget, + constraint_builder::{EVMConstraintBuilder, StepStateTransition, Transition::Delta}, + CachedRegion, Cell, + }, + witness::{Block, Call, ExecStep, Transaction}, + }, + util::Expr, +}; +use eth_types::{evm_types::OpcodeId, Field}; +use halo2_proofs::{circuit::Value, plonk::Error}; + +#[derive(Clone, Debug)] +pub(crate) struct DummyPush0Gadget { + same_context: SameContextGadget, + opcode: Cell, +} + +impl ExecutionGadget for DummyPush0Gadget { + const NAME: &'static str = "PUSH0"; + + const EXECUTION_STATE: ExecutionState = ExecutionState::PUSH0; + + fn configure(cb: &mut EVMConstraintBuilder) -> Self { + let opcode = cb.query_cell(); + // The dummy gadget only push the zero value on the stack(increase the stack pointer by 1) + cb.stack_push(0.expr()); + + // State transition + // `program_counter` needs to be increased by number of bytes pushed + 1 + let step_state_transition = StepStateTransition { + rw_counter: Delta(1.expr()), + program_counter: Delta(1.expr()), + stack_pointer: Delta((-1).expr()), + gas_left: Delta(-OpcodeId::PUSH0.constant_gas_cost().expr()), + ..Default::default() + }; + // SameContextGadget will increase the program_counter by 1 + let same_context = SameContextGadget::construct(cb, opcode.clone(), step_state_transition); + + Self { + same_context, + opcode, + } + } + + fn assign_exec_step( + &self, + region: &mut CachedRegion<'_, '_, F>, + offset: usize, + _: &Block, + _: &Transaction, + _: &Call, + step: &ExecStep, + ) -> Result<(), Error> { + self.same_context.assign_exec_step(region, offset, step)?; + let opcode = step.opcode().unwrap(); + self.opcode + .assign(region, offset, Value::known(F::from(opcode.as_u64())))?; + Ok(()) + } +} diff --git a/zkevm-circuits/src/evm_circuit/step.rs b/zkevm-circuits/src/evm_circuit/step.rs index 61323f557a..e26c095ac8 100644 --- a/zkevm-circuits/src/evm_circuit/step.rs +++ b/zkevm-circuits/src/evm_circuit/step.rs @@ -78,6 +78,7 @@ pub enum ExecutionState { MSIZE, GAS, JUMPDEST, + PUSH0, PUSH, // PUSH1, PUSH2, ..., PUSH32 DUP, // DUP1, DUP2, ..., DUP16 SWAP, // SWAP1, SWAP2, ..., SWAP16 @@ -171,6 +172,9 @@ impl From<&ExecStep> for ExecutionState { if op.is_dup() { return ExecutionState::DUP; } + if op.is_push0() { + return ExecutionState::PUSH0; + } if op.is_push() { return ExecutionState::PUSH; } @@ -379,6 +383,7 @@ impl ExecutionState { Self::MSIZE => vec![OpcodeId::MSIZE], Self::GAS => vec![OpcodeId::GAS], Self::JUMPDEST => vec![OpcodeId::JUMPDEST], + Self::PUSH0 => vec![OpcodeId::PUSH0], Self::PUSH => vec![ OpcodeId::PUSH1, OpcodeId::PUSH2, From 7175f7e71140feb64daac89f01a353ac6ee93718 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sat, 12 Aug 2023 15:03:03 +0000 Subject: [PATCH 28/55] chore: remove TODO, support 1559 now --- zkevm-circuits/src/evm_circuit/execution/begin_tx.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index bbac4d105b..4c25ccb3c6 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -121,7 +121,6 @@ impl ExecutionGadget for BeginTxGadget { None, ); // rwc_delta += 1 - // TODO: Implement EIP 1559 (currently it only supports legacy // transaction format) // Calculate transaction gas fee let mul_gas_fee_by_gas = From 564fc1d5651319d95801af0ffb73416d100ddece Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 14 Aug 2023 05:18:34 +0000 Subject: [PATCH 29/55] fix: anchor circuit in eip-1559 --- zkevm-circuits/src/anchor_tx_circuit.rs | 6 +++--- zkevm-circuits/src/anchor_tx_circuit/test.rs | 1 - zkevm-circuits/src/tx_circuit.rs | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/zkevm-circuits/src/anchor_tx_circuit.rs b/zkevm-circuits/src/anchor_tx_circuit.rs index dde4015e5e..9938d536d4 100644 --- a/zkevm-circuits/src/anchor_tx_circuit.rs +++ b/zkevm-circuits/src/anchor_tx_circuit.rs @@ -34,7 +34,7 @@ use self::sign_verify::GOLDEN_TOUCH_ADDRESS; const ANCHOR_TX_ID: usize = 1; const ANCHOR_TX_VALUE: u64 = 0; const ANCHOR_TX_IS_CREATE: bool = false; -const ANCHOR_TX_GAS_PRICE: u64 = 1; +const ANCHOR_TX_GAS_TIP_CAP: u64 = 0; const MAX_DEGREE: usize = 9; const BYTE_POW_BASE: u64 = 1 << 8; @@ -220,8 +220,8 @@ impl AnchorTxCircuitConfig { Value::known(F::from(protocol_instance.anchor_gas_limit)), ), ( - TxFieldTag::GasPrice, - Value::known(F::from(ANCHOR_TX_GAS_PRICE)), + TxFieldTag::GasTipCap, + Value::known(F::from(ANCHOR_TX_GAS_TIP_CAP)), ), ( TxFieldTag::CallerAddress, diff --git a/zkevm-circuits/src/anchor_tx_circuit/test.rs b/zkevm-circuits/src/anchor_tx_circuit/test.rs index b60ebe8ef3..585907fa84 100644 --- a/zkevm-circuits/src/anchor_tx_circuit/test.rs +++ b/zkevm-circuits/src/anchor_tx_circuit/test.rs @@ -145,7 +145,6 @@ pub(crate) fn add_anchor_tx( { txs[0] .gas(protocol_instance.anchor_gas_limit.to_word()) - .gas_price(ANCHOR_TX_GAS_PRICE.to_word()) .from(*GOLDEN_TOUCH_ADDRESS) .to(protocol_instance.l2_contract) .input(protocol_instance.anchor_call()) diff --git a/zkevm-circuits/src/tx_circuit.rs b/zkevm-circuits/src/tx_circuit.rs index fa90e9108a..8f55a2338a 100644 --- a/zkevm-circuits/src/tx_circuit.rs +++ b/zkevm-circuits/src/tx_circuit.rs @@ -28,12 +28,12 @@ use log::error; use sign_verify::{AssignedSignatureVerify, SignVerifyChip, SignVerifyConfig}; use std::marker::PhantomData; -/// Number of static fields per tx: [nonce, gas, gas_price, +/// Number of static fields per tx: [nonce, gas, gas_price, gas_tip_cap, gas_fee_cap, /// caller_address, callee_address, is_create, value, call_data_length, /// call_data_gas_cost, tx_sign_hash, r, s, v]. /// Note that call data bytes are layed out in the TxTable after all the static /// fields arranged by txs. -pub(crate) const TX_LEN: usize = 13; +pub(crate) const TX_LEN: usize = 15; /// Config for TxCircuit #[derive(Clone, Debug)] From 48fe04618061cee875e8a093143337e7a913e1eb Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 14 Aug 2023 06:25:33 +0000 Subject: [PATCH 30/55] feat: bus-mapping support 1559 --- bus-mapping/src/circuit_input_builder.rs | 73 ++++--------------- .../src/circuit_input_builder/tracer_tests.rs | 3 +- .../src/circuit_input_builder/transaction.rs | 26 +++++-- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 2 +- zkevm-circuits/src/anchor_tx_circuit.rs | 5 ++ .../src/evm_circuit/execution/end_tx.rs | 2 +- zkevm-circuits/src/taiko_test_util.rs | 2 +- zkevm-circuits/src/witness/tx.rs | 5 ++ 8 files changed, 47 insertions(+), 71 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index f94fa3f263..31d630aa41 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -153,6 +153,7 @@ impl<'a> CircuitInputBuilder { /// Create a new Transaction from a [`eth_types::Transaction`]. pub fn new_tx( &mut self, + eth_block: &EthBlock, eth_tx: ð_types::Transaction, is_success: bool, ) -> Result { @@ -169,7 +170,14 @@ impl<'a> CircuitInputBuilder { ), ); - Transaction::new(call_id, &self.sdb, &mut self.code_db, eth_tx, is_success) + Transaction::new( + call_id, + &self.sdb, + &mut self.code_db, + eth_block, + eth_tx, + is_success, + ) } /// Iterate over all generated CallContext RwCounterEndOfReversion @@ -199,25 +207,14 @@ impl<'a> CircuitInputBuilder { &mut self, eth_block: &EthBlock, geth_traces: &[eth_types::GethExecTrace], - ) -> Result<(), Error> { - self.handle_block_with_anchor(eth_block, geth_traces, false) - } - - /// Handle a block by handling each transaction to generate all the - /// associated operations. - pub fn handle_block_with_anchor( - &mut self, - eth_block: &EthBlock, - geth_traces: &[eth_types::GethExecTrace], - has_anchor_tx: bool, ) -> Result<(), Error> { // accumulates gas across all txs in the block for (tx_index, tx) in eth_block.transactions.iter().enumerate() { let geth_trace = &geth_traces[tx_index]; self.handle_tx( + eth_block, tx, geth_trace, - has_anchor_tx && tx_index == 0, tx_index + 1 == eth_block.transactions.len(), )?; } @@ -281,13 +278,13 @@ impl<'a> CircuitInputBuilder { /// generated operations. fn handle_tx( &mut self, + eth_block: &EthBlock, eth_tx: ð_types::Transaction, geth_trace: &GethExecTrace, - is_anchor_tx: bool, is_last_tx: bool, ) -> Result<(), Error> { - let mut tx = self.new_tx(eth_tx, !geth_trace.failed)?; - let mut tx_ctx = TransactionContext::new(eth_tx, geth_trace, is_anchor_tx, is_last_tx)?; + let mut tx = self.new_tx(eth_block, eth_tx, !geth_trace.failed)?; + let mut tx_ctx = TransactionContext::new(eth_tx, geth_trace, is_last_tx)?; // Generate BeginTx step let begin_tx_step = gen_associated_steps( @@ -589,30 +586,6 @@ impl BuilderClient

{ geth_traces: &[eth_types::GethExecTrace], history_hashes: Vec, prev_state_root: Word, - ) -> Result { - self.gen_inputs_from_state_with_anchor( - sdb, - code_db, - eth_block, - geth_traces, - history_hashes, - prev_state_root, - false, - ) - } - - /// Step 5. For each step in TxExecTraces, gen the associated ops and state - /// circuit inputs - #[allow(clippy::too_many_arguments)] - pub fn gen_inputs_from_state_with_anchor( - &self, - sdb: StateDB, - code_db: CodeDB, - eth_block: &EthBlock, - geth_traces: &[eth_types::GethExecTrace], - history_hashes: Vec, - prev_state_root: Word, - has_anchor_tx: bool, ) -> Result { let block = Block::new( self.chain_id, @@ -623,7 +596,7 @@ impl BuilderClient

{ self.protocol_instance.clone(), )?; let mut builder = CircuitInputBuilder::new(sdb, code_db, block); - builder.handle_block_with_anchor(eth_block, geth_traces, has_anchor_tx)?; + builder.handle_block(eth_block, geth_traces)?; Ok(builder) } @@ -637,35 +610,19 @@ impl BuilderClient

{ eth_types::Block, ), Error, - > { - self.gen_inputs_with_anchor(block_num, false).await - } - - /// Perform all the steps to generate the circuit inputs - pub async fn gen_inputs_with_anchor( - &self, - block_num: u64, - has_anchor_tx: bool, - ) -> Result< - ( - CircuitInputBuilder, - eth_types::Block, - ), - Error, > { let (eth_block, geth_traces, history_hashes, prev_state_root) = self.get_block(block_num).await?; let access_set = Self::get_state_accesses(ð_block, &geth_traces)?; let (proofs, codes) = self.get_state(block_num, access_set).await?; let (state_db, code_db) = Self::build_state_code_db(proofs, codes); - let builder = self.gen_inputs_from_state_with_anchor( + let builder = self.gen_inputs_from_state( state_db, code_db, ð_block, &geth_traces, history_hashes, prev_state_root, - has_anchor_tx, )?; Ok((builder, eth_block)) } diff --git a/bus-mapping/src/circuit_input_builder/tracer_tests.rs b/bus-mapping/src/circuit_input_builder/tracer_tests.rs index 4ec5dcc209..8e631955bf 100644 --- a/bus-mapping/src/circuit_input_builder/tracer_tests.rs +++ b/bus-mapping/src/circuit_input_builder/tracer_tests.rs @@ -37,7 +37,7 @@ impl CircuitInputBuilderTx { let block = crate::mock::BlockData::new_from_geth_data(geth_data.clone()); let mut builder = block.new_circuit_input_builder(); let tx = builder - .new_tx(&block.eth_block.transactions[0], true) + .new_tx(&block.eth_block, &block.eth_block.transactions[0], true) .unwrap(); let tx_ctx = TransactionContext::new( &block.eth_block.transactions[0], @@ -48,7 +48,6 @@ impl CircuitInputBuilderTx { struct_logs: vec![geth_step.clone()], }, false, - false, ) .unwrap(); diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index 199603cf81..238875ea72 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -10,7 +10,7 @@ use crate::{ Error, }; -use super::{call::ReversionGroup, Call, CallContext, CallKind, CodeSource, ExecStep}; +use super::{call::ReversionGroup, Call, CallContext, CallKind, CodeSource, EthBlock, ExecStep}; #[derive(Debug, Default)] /// Context of a [`Transaction`] which can mutate in an [`ExecStep`]. @@ -19,7 +19,6 @@ pub struct TransactionContext { id: usize, /// The index of logs made in the transaction. pub(crate) log_id: usize, - is_anchor_tx: bool, /// Identifier if this transaction is last one of the block or not. is_last_tx: bool, /// Call stack. @@ -39,7 +38,6 @@ impl TransactionContext { pub fn new( eth_tx: ð_types::Transaction, geth_trace: &GethExecTrace, - is_anchor_tx: bool, is_last_tx: bool, ) -> Result { // Iterate over geth_trace to inspect and collect each call's is_success, which @@ -76,7 +74,6 @@ impl TransactionContext { .as_u64() as usize + 1, log_id: 0, - is_anchor_tx, is_last_tx, call_is_success, calls: Vec::new(), @@ -92,9 +89,9 @@ impl TransactionContext { self.id } - /// Return is_anchor_tx of the this transaction. - pub fn is_anchor_tx(&self) -> bool { - self.is_anchor_tx + /// Return true if it is the first transaction. + pub fn is_anchor(&self) -> bool { + self.id == 1 } /// Return is_last_tx of the this transaction. @@ -201,6 +198,7 @@ impl Transaction { call_id: usize, sdb: &StateDB, code_db: &mut CodeDB, + eth_block: &EthBlock, eth_tx: ð_types::Transaction, is_success: bool, ) -> Result { @@ -250,9 +248,21 @@ impl Transaction { ..Default::default() } }; + let mut tx: geth_types::Transaction = eth_tx.into(); + // reset gas_price + if eth_tx.transaction_index.unwrap_or_default() == 0.into() { + // anchor's gas_price is always 0 + tx.gas_price = 0.into(); + } else { + // gas_price = min(base_fee + gas_tip_cap, gas_fee_cap) + tx.gas_price = std::cmp::min( + eth_block.base_fee_per_gas.unwrap() + tx.gas_tip_cap, + tx.gas_fee_cap, + ); + } Ok(Self { - tx: eth_tx.into(), + tx, calls: vec![call], steps: Vec::new(), }) diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index 9ab4217676..fba8ca0c19 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -264,7 +264,7 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result caller_balance_prev, )?; - let base_fee = if state.tx_ctx.is_anchor_tx() { + let base_fee = if state.tx_ctx.is_anchor() { 0.into() } else { state.block.base_fee diff --git a/zkevm-circuits/src/anchor_tx_circuit.rs b/zkevm-circuits/src/anchor_tx_circuit.rs index 9938d536d4..55c995d453 100644 --- a/zkevm-circuits/src/anchor_tx_circuit.rs +++ b/zkevm-circuits/src/anchor_tx_circuit.rs @@ -34,6 +34,7 @@ use self::sign_verify::GOLDEN_TOUCH_ADDRESS; const ANCHOR_TX_ID: usize = 1; const ANCHOR_TX_VALUE: u64 = 0; const ANCHOR_TX_IS_CREATE: bool = false; +const ANCHOR_TX_GAS_PRICE: u64 = 0; const ANCHOR_TX_GAS_TIP_CAP: u64 = 0; const MAX_DEGREE: usize = 9; const BYTE_POW_BASE: u64 = 1 << 8; @@ -219,6 +220,10 @@ impl AnchorTxCircuitConfig { TxFieldTag::Gas, Value::known(F::from(protocol_instance.anchor_gas_limit)), ), + ( + TxFieldTag::GasPrice, + Value::known(F::from(ANCHOR_TX_GAS_PRICE)), + ), ( TxFieldTag::GasTipCap, Value::known(F::from(ANCHOR_TX_GAS_TIP_CAP)), diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 5f2643e71a..3b77f65605 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -270,7 +270,7 @@ impl ExecutionGadget for EndTxGadget { F::from(refund), )?; - let base_fee = if tx.id == 1 { + let base_fee = if tx.is_anchor() { 0.into() } else { block.context.base_fee diff --git a/zkevm-circuits/src/taiko_test_util.rs b/zkevm-circuits/src/taiko_test_util.rs index 674ce51354..18502fcc4a 100644 --- a/zkevm-circuits/src/taiko_test_util.rs +++ b/zkevm-circuits/src/taiko_test_util.rs @@ -190,7 +190,7 @@ impl CircuitTestBuilder { let mut builder = BlockData::new_from_geth_data_with_params(block.clone(), params) .new_circuit_input_builder(); builder - .handle_block_with_anchor(&block.eth_block, &block.geth_traces, true) + .handle_block(&block.eth_block, &block.geth_traces) .unwrap(); // Build a witness block from trace result. let mut block = diff --git a/zkevm-circuits/src/witness/tx.rs b/zkevm-circuits/src/witness/tx.rs index 13f9b0d46c..3a52048a05 100644 --- a/zkevm-circuits/src/witness/tx.rs +++ b/zkevm-circuits/src/witness/tx.rs @@ -56,6 +56,11 @@ pub struct Transaction { } impl Transaction { + /// The first transaction in a block is the anchor transaction + pub fn is_anchor(&self) -> bool { + self.id == 1 + } + /// Assignments for tx table, split into tx_data (all fields except /// calldata) and tx_calldata pub fn table_assignments( From 68fd2d6041bfb5224eb95d308ce28bd4b3616abb Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 14 Aug 2023 06:55:36 +0000 Subject: [PATCH 31/55] feat: add evm_circuit into super_circuit --- zkevm-circuits/src/table.rs | 1 + zkevm-circuits/src/taiko_super_circuit.rs | 67 ++++++++++++++++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/zkevm-circuits/src/table.rs b/zkevm-circuits/src/table.rs index 223fe24d5d..314268818b 100644 --- a/zkevm-circuits/src/table.rs +++ b/zkevm-circuits/src/table.rs @@ -48,6 +48,7 @@ pub(crate) mod rw_table; pub(crate) mod tx_table; pub(crate) use block_table::{BlockContextFieldTag, BlockTable}; +pub(crate) use byte_table::ByteTable; pub(crate) use bytecode_table::{BytecodeFieldTag, BytecodeTable}; pub(crate) use copy_table::CopyTable; pub(crate) use exp_table::ExpTable; diff --git a/zkevm-circuits/src/taiko_super_circuit.rs b/zkevm-circuits/src/taiko_super_circuit.rs index cda3f42f38..22e36b6a59 100644 --- a/zkevm-circuits/src/taiko_super_circuit.rs +++ b/zkevm-circuits/src/taiko_super_circuit.rs @@ -6,7 +6,11 @@ pub mod test; use crate::{ anchor_tx_circuit::{AnchorTxCircuit, AnchorTxCircuitConfig, AnchorTxCircuitConfigArgs}, - table::{byte_table::ByteTable, BlockTable, KeccakTable, PiTable, TxTable}, + evm_circuit::{EvmCircuit, EvmCircuitConfig, EvmCircuitConfigArgs}, + table::{ + BlockTable, ByteTable, BytecodeTable, CopyTable, ExpTable, KeccakTable, PiTable, RwTable, + TxTable, + }, taiko_pi_circuit::{TaikoPiCircuit, TaikoPiCircuitConfig, TaikoPiCircuitConfigArgs}, util::{log2_ceil, Challenges, SubCircuit, SubCircuitConfig}, witness::{block_convert, Block}, @@ -28,12 +32,17 @@ use snark_verifier_sdk::CircuitExt; #[derive(Clone)] pub struct SuperCircuitConfig { tx_table: TxTable, + rw_table: RwTable, + bytecode_table: BytecodeTable, pi_table: PiTable, keccak_table: KeccakTable, block_table: BlockTable, byte_table: ByteTable, + copy_table: CopyTable, + exp_table: ExpTable, pi_circuit: TaikoPiCircuitConfig, anchor_tx_circuit: AnchorTxCircuitConfig, + evm_circuit: EvmCircuitConfig, } /// Circuit configuration arguments @@ -51,10 +60,15 @@ impl SubCircuitConfig for SuperCircuitConfig { Self::ConfigArgs { challenges }: Self::ConfigArgs, ) -> Self { let tx_table = TxTable::construct(meta); + let rw_table = RwTable::construct(meta); + let bytecode_table = BytecodeTable::construct(meta); let pi_table = PiTable::construct(meta); let block_table = BlockTable::construct(meta); let keccak_table = KeccakTable::construct(meta); let byte_table = ByteTable::construct(meta); + let q_copy_table = meta.fixed_column(); + let copy_table = CopyTable::construct(meta, q_copy_table); + let exp_table = ExpTable::construct(meta); let pi_circuit = TaikoPiCircuitConfig::new( meta, @@ -72,18 +86,37 @@ impl SubCircuitConfig for SuperCircuitConfig { tx_table: tx_table.clone(), pi_table: pi_table.clone(), byte_table: byte_table.clone(), + challenges: challenges.clone(), + }, + ); + + let evm_circuit = EvmCircuitConfig::new( + meta, + EvmCircuitConfigArgs { challenges, + tx_table: tx_table.clone(), + rw_table, + bytecode_table: bytecode_table.clone(), + block_table: block_table.clone(), + copy_table, + keccak_table: keccak_table.clone(), + exp_table, }, ); Self { tx_table, + rw_table, + bytecode_table, + copy_table, + exp_table, pi_table, pi_circuit, block_table, keccak_table, byte_table, anchor_tx_circuit, + evm_circuit, } } } @@ -95,6 +128,8 @@ pub struct SuperCircuit { pub pi_circuit: TaikoPiCircuit, /// Anchor Transaction Circuit pub anchor_tx_circuit: AnchorTxCircuit, + /// EVM Circuit + pub evm_circuit: EvmCircuit, /// Block witness pub block: Block, } @@ -122,10 +157,12 @@ impl SubCircuit for SuperCircuit { fn new_from_block(block: &Block) -> Self { let pi_circuit = TaikoPiCircuit::new_from_block(block); let anchor_tx_circuit = AnchorTxCircuit::new_from_block(block); + let evm_circuit = EvmCircuit::new_from_block(block); SuperCircuit::<_> { pi_circuit, anchor_tx_circuit, + evm_circuit, block: block.clone(), } } @@ -160,6 +197,8 @@ impl SubCircuit for SuperCircuit { .synthesize_sub(&config.pi_circuit, challenges, layouter)?; self.anchor_tx_circuit .synthesize_sub(&config.anchor_tx_circuit, challenges, layouter)?; + self.evm_circuit + .synthesize_sub(&config.evm_circuit, challenges, layouter)?; Ok(()) } } @@ -213,6 +252,32 @@ impl Circuit for SuperCircuit { config .pi_table .load(&mut layouter, &self.block.protocol_instance, &challenges)?; + // rw_table, + // bytecode_table, + // copy_table, + // exp_table, + + config.tx_table.load( + &mut layouter, + &self.block.txs, + self.block.circuits_params.max_txs, + self.block.circuits_params.max_calldata, + &challenges, + )?; + self.block.rws.check_rw_counter_sanity(); + config.rw_table.load( + &mut layouter, + &self.block.rws.table_assignments(), + self.block.circuits_params.max_rws, + challenges.evm_word(), + )?; + config + .bytecode_table + .load(&mut layouter, self.block.bytecodes.values(), &challenges)?; + config + .copy_table + .load(&mut layouter, &self.block, &challenges)?; + config.exp_table.load(&mut layouter, &self.block)?; self.synthesize_sub(&config, &challenges, &mut layouter) } } From 0c244c810ac076694ba0352e59a3b3a519323baf Mon Sep 17 00:00:00 2001 From: johntaiko Date: Wed, 16 Aug 2023 07:10:20 +0000 Subject: [PATCH 32/55] feat(mock): add indicator for anchor usage --- taiko-mock/src/test_ctx.rs | 56 +++++++++++-------- .../src/evm_circuit/execution/begin_tx.rs | 10 ++-- zkevm-circuits/src/taiko_test_util.rs | 6 +- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/taiko-mock/src/test_ctx.rs b/taiko-mock/src/test_ctx.rs index 03b76246dd..6832c82e23 100644 --- a/taiko-mock/src/test_ctx.rs +++ b/taiko-mock/src/test_ctx.rs @@ -1,8 +1,8 @@ //! Mock types and functions to generate Test enviroments for ZKEVM tests use crate::{ - eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_CODES, MOCK_TAIKO_L2_ADDRESS, - MOCK_TAIKO_TREASURY_ADDRESS, + account, eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_CODES, + MOCK_TAIKO_L2_ADDRESS, MOCK_TAIKO_TREASURY_ADDRESS, }; use eth_types::{ geth_types::{Account, BlockConstants, GethData}, @@ -79,7 +79,7 @@ use itertools::Itertools; /// // the behaviour of the generated env. /// ``` #[derive(Debug)] -pub struct TestContext { +pub struct TestContext { /// chain id pub chain_id: Word, /// Account list @@ -93,8 +93,10 @@ pub struct TestContext { pub geth_traces: Vec, } -impl From> for GethData { - fn from(ctx: TestContext) -> GethData { +impl + From> for GethData +{ + fn from(ctx: TestContext) -> GethData { GethData { chain_id: ctx.chain_id, history_hashes: ctx.history_hashes, @@ -105,7 +107,7 @@ impl From> for GethD } } -impl TestContext { +impl TestContext { pub fn new_with_logger_config( history_hashes: Option>, acc_fns: FAcc, @@ -118,46 +120,54 @@ impl TestContext { Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, FAcc: FnOnce([&mut MockAccount; NACC]), { - let mut accounts: Vec = vec![MockAccount::default(); NACC + 2]; - // add the GOLDEN_TOUCH account in the first position - accounts[0].address(*GOLDEN_TOUCH); - // add the l2 contract account in the second position - accounts[1] - .address(*MOCK_TAIKO_L2_ADDRESS) - .code(MOCK_CODES[0].clone()); + let mut accounts: Vec = + vec![MockAccount::default(); NACC + if IS_ANCHOR { 2 } else { 0 }]; + if IS_ANCHOR { + // add the GOLDEN_TOUCH account in the first position + accounts[0].address(*GOLDEN_TOUCH); + // add the l2 contract account in the second position + accounts[1] + .address(*MOCK_TAIKO_L2_ADDRESS) + .code(MOCK_CODES[0].clone()); + } + let account_skipped = if IS_ANCHOR { 2 } else { 0 }; // Build Accounts modifiers let account_refs = accounts .iter_mut() - .skip(2) + .skip(account_skipped) .collect_vec() .try_into() .expect("Mismatched len err"); acc_fns(account_refs); let accounts_cloned: [MockAccount; NACC] = accounts .iter_mut() - .skip(2) + .skip(account_skipped) .map(|acc| acc.build()) .collect_vec() .try_into() .expect("Mismatched acc len"); - let mut transactions = vec![MockTransaction::default(); NTX + 1]; + let mut transactions = + vec![MockTransaction::default(); NTX + if IS_ANCHOR { 1 } else { 0 }]; // By default, set the TxIndex and the Nonce values of the multiple transactions // of the context correlative so that any Ok test passes by default. // If the user decides to override these values, they'll then be set to whatever // inputs were provided by the user. - // add the anchor transaction in the first position - transactions[0] = MockTransaction::new_anchor(); + if IS_ANCHOR { + // add the anchor transaction in the first position + transactions[0] = MockTransaction::new_anchor(); + } + let tx_skipped = if IS_ANCHOR { 1 } else { 0 }; transactions .iter_mut() .enumerate() - .skip(1) + .skip(tx_skipped) .for_each(|(idx, tx)| { let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); tx.transaction_idx(idx).nonce(idx - 1); }); - let tx_refs = transactions.iter_mut().skip(1).collect(); + let tx_refs = transactions.iter_mut().skip(tx_skipped).collect(); // Build Tx modifiers. func_tx(tx_refs, accounts_cloned); @@ -221,8 +231,10 @@ impl TestContext { /// addresses are the ones used in [`TestContext:: /// account_0_code_account_1_no_code`]. Extra accounts, txs and/or block /// configs are set as [`Default`]. - pub fn simple_ctx_with_bytecode(bytecode: Bytecode) -> Result, Error> { - TestContext::<2, 1>::new( + pub fn simple_ctx_with_bytecode( + bytecode: Bytecode, + ) -> Result, Error> { + TestContext::<2, 1, IS_ANCHOR>::new( None, account_0_code_account_1_no_code(bytecode), tx_from_1_to_0, diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 4c25ccb3c6..6b4e46fba8 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -599,7 +599,7 @@ mod test { fn test_ok(tx: eth_types::Transaction, code: Option) { // Get the execution steps from the external tracer - let ctx = TestContext::<2, 1>::new( + let ctx = TestContext::<2, 1, true>::new( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(10)); @@ -676,7 +676,7 @@ mod test { STOP }; - let ctx = TestContext::<2, 1>::new( + let ctx = TestContext::<2, 1, true>::new( None, |accs| { accs[0].address(to).balance(eth(1)).code(code); @@ -719,7 +719,7 @@ mod test { #[test] fn begin_tx_no_code() { - let ctx = TestContext::<2, 1>::new( + let ctx = TestContext::<2, 1, true>::new( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); @@ -742,7 +742,7 @@ mod test { #[test] fn begin_tx_no_account() { - let ctx = TestContext::<1, 1>::new( + let ctx = TestContext::<1, 1, true>::new( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); @@ -773,7 +773,7 @@ mod test { PUSH1(0) RETURN }; - let ctx = TestContext::<1, 1>::new( + let ctx = TestContext::<1, 1, true>::new( None, |accs| { accs[0] diff --git a/zkevm-circuits/src/taiko_test_util.rs b/zkevm-circuits/src/taiko_test_util.rs index 18502fcc4a..8e00536389 100644 --- a/zkevm-circuits/src/taiko_test_util.rs +++ b/zkevm-circuits/src/taiko_test_util.rs @@ -68,7 +68,7 @@ const NUM_BLINDING_ROWS: usize = 64; /// .run(); /// ``` pub struct CircuitTestBuilder { - test_ctx: Option>, + test_ctx: Option>, circuits_params: Option, block: Option>, evm_checks: Box, &Vec, &Vec)>, @@ -104,7 +104,7 @@ impl CircuitTestBuilder { /// Generates a CTBC from a [`TestContext`] passed with all the other fields /// set to [`Default`]. - pub fn new_from_test_ctx(ctx: TestContext) -> Self { + pub fn new_from_test_ctx(ctx: TestContext) -> Self { Self::empty().test_ctx(ctx) } @@ -116,7 +116,7 @@ impl CircuitTestBuilder { /// Allows to produce a [`TestContext`] which will serve as the generator of /// the Block. - pub fn test_ctx(mut self, ctx: TestContext) -> Self { + pub fn test_ctx(mut self, ctx: TestContext) -> Self { self.test_ctx = Some(ctx); self } From 6f960a500a4697d1add1254fa9b6a4faa17172e9 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Thu, 17 Aug 2023 12:15:44 +0000 Subject: [PATCH 33/55] feat: let mock fit both with taiko and normal --- Cargo.lock | 28 +- Cargo.toml | 1 - Makefile | 4 +- bus-mapping/Cargo.toml | 1 - bus-mapping/src/circuit_input_builder.rs | 2 +- .../protocol_instance.rs | 46 ++- circuit-benchmarks/src/taiko_super_circuit.rs | 8 +- external-tracer/src/lib.rs | 2 - geth-utils/gethutil/trace.go | 21 +- geth-utils/go.mod | 6 +- geth-utils/go.sum | 104 ++++- mock/Cargo.toml | 8 + {taiko-mock => mock}/src/anchor.rs | 0 mock/src/lib.rs | 29 +- mock/src/test_ctx.rs | 104 ++++- mock/src/transaction.rs | 40 +- taiko-mock/.gitignore | 1 - taiko-mock/Cargo.toml | 24 -- taiko-mock/src/account.rs | 84 ---- taiko-mock/src/block.rs | 282 ------------- taiko-mock/src/lib.rs | 169 -------- taiko-mock/src/test_ctx.rs | 302 -------------- taiko-mock/src/transaction.rs | 373 ------------------ zkevm-circuits/Cargo.toml | 4 +- zkevm-circuits/src/anchor_tx_circuit.rs | 2 - zkevm-circuits/src/anchor_tx_circuit/test.rs | 134 +------ .../src/evm_circuit/execution/begin_tx.rs | 14 +- zkevm-circuits/src/lib.rs | 3 - .../src/taiko_super_circuit/test.rs | 121 +++--- zkevm-circuits/src/taiko_test_util.rs | 239 ----------- zkevm-circuits/tests/prover_error.rs | 1 + 31 files changed, 376 insertions(+), 1781 deletions(-) rename {taiko-mock => mock}/src/anchor.rs (100%) delete mode 100644 taiko-mock/.gitignore delete mode 100644 taiko-mock/Cargo.toml delete mode 100644 taiko-mock/src/account.rs delete mode 100644 taiko-mock/src/block.rs delete mode 100644 taiko-mock/src/lib.rs delete mode 100644 taiko-mock/src/test_ctx.rs delete mode 100644 taiko-mock/src/transaction.rs delete mode 100644 zkevm-circuits/src/taiko_test_util.rs diff --git a/Cargo.lock b/Cargo.lock index 21f29094a5..fa8e302c1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -385,7 +385,6 @@ dependencies = [ "serde_json", "strum", "strum_macros", - "taiko-mock", "tokio", "url", ] @@ -2904,10 +2903,16 @@ dependencies = [ "ethers-core", "ethers-signers", "external-tracer", + "halo2_proofs 0.2.0", "itertools", "lazy_static", + "libsecp256k1", + "num", + "num-bigint", + "once_cell", "rand", "rand_chacha", + "sha3 0.10.7", ] [[package]] @@ -4564,26 +4569,6 @@ dependencies = [ "regex", ] -[[package]] -name = "taiko-mock" -version = "0.1.0" -dependencies = [ - "eth-types", - "ethers-core", - "ethers-signers", - "external-tracer", - "halo2_proofs 0.2.0", - "itertools", - "lazy_static", - "libsecp256k1", - "num", - "num-bigint", - "once_cell", - "rand", - "rand_chacha", - "sha3 0.10.7", -] - [[package]] name = "tap" version = "1.0.1" @@ -5450,5 +5435,4 @@ dependencies = [ "snark-verifier-sdk", "strum", "strum_macros", - "taiko-mock", ] diff --git a/Cargo.toml b/Cargo.toml index 65d85a051c..7958f3ddb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ members = [ "eth-types", "external-tracer", "mock", - "taiko-mock", "testool", ] diff --git a/Makefile b/Makefile index 6dcf6e8420..84eff15d85 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,9 @@ fmt: ## Check whether the code is formated correctly test: ## Run tests for all the workspace members # Run light tests - @cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks + @cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks --exclude testool # Run heavy tests serially to avoid OOM - @cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --test-threads 1 + @cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks --exclude testool serial_ -- --ignored --test-threads 1 test_doc: ## Test the docs diff --git a/bus-mapping/Cargo.toml b/bus-mapping/Cargo.toml index 6cd4f366bf..c952158396 100644 --- a/bus-mapping/Cargo.toml +++ b/bus-mapping/Cargo.toml @@ -10,7 +10,6 @@ eth-types = { path = "../eth-types" } gadgets = { path = "../gadgets" } keccak256 = { path = "../keccak256" } mock = { path = "../mock", optional = true } -taiko-mock = { path = "../taiko-mock", optional = true } ethers-core = "=2.0.0" ethers-providers = "=2.0.0" diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 31d630aa41..a49e7237f3 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -77,7 +77,7 @@ impl Default for CircuitsParams { fn default() -> Self { CircuitsParams { max_rws: 1000, - max_txs: 1, + max_txs: 2, // one for anchor max_calldata: 256, // TODO: Check whether this value is correct or we should increase/decrease based on // this lib tests diff --git a/bus-mapping/src/circuit_input_builder/protocol_instance.rs b/bus-mapping/src/circuit_input_builder/protocol_instance.rs index 4feb3242f4..47a965dc81 100644 --- a/bus-mapping/src/circuit_input_builder/protocol_instance.rs +++ b/bus-mapping/src/circuit_input_builder/protocol_instance.rs @@ -4,12 +4,13 @@ use std::iter; use eth_types::{Address, Bytes, Hash, ToBigEndian, ToWord, Word, H256}; use keccak256::plain::Keccak; +use mock::{MOCK_ANCHOR_GAS_LIMIT, MOCK_TAIKO_L2_ADDRESS, MOCK_TAIKO_TREASURY_ADDRESS}; /// hash(anchor) pub const ANCHOR_TX_METHOD_SIGNATURE: u32 = 0xda69d3db; /// Taiko witness -#[derive(Debug, Default, Clone)] +#[derive(Debug, Clone)] pub struct ProtocolInstance { /// l1 signal service address pub l1_signal_service: Address, @@ -44,8 +45,30 @@ pub struct ProtocolInstance { pub anchor_gas_limit: u64, } +impl Default for ProtocolInstance { + fn default() -> Self { + Self { + l1_signal_service: Address::default(), + l2_signal_service: Address::default(), + l2_contract: *MOCK_TAIKO_L2_ADDRESS, + meta_hash: MetaHash::default(), + block_hash: Hash::default(), + parent_hash: Hash::default(), + signal_root: Hash::default(), + graffiti: H256::default(), + prover: Address::default(), + gas_used: 0, + parent_gas_used: 0, + block_max_gas_limit: 0, + max_transactions_per_block: 0, + max_bytes_per_tx_list: 0, + anchor_gas_limit: MOCK_ANCHOR_GAS_LIMIT.as_u64(), + } + } +} + /// l1 meta hash -#[derive(Debug, Default, Clone)] +#[derive(Debug, Clone)] pub struct MetaHash { /// meta id pub id: u64, @@ -73,6 +96,25 @@ pub struct MetaHash { pub treasury: Address, } +impl Default for MetaHash { + fn default() -> Self { + Self { + id: 0, + timestamp: 0, + l1_height: 0, + l1_hash: Hash::default(), + l1_mix_hash: Hash::default(), + deposits_processed: Hash::default(), + tx_list_hash: Hash::default(), + tx_list_byte_start: 0, + tx_list_byte_end: 0, + gas_limit: 0, + beneficiary: Address::default(), + treasury: *MOCK_TAIKO_TREASURY_ADDRESS, + } + } +} + /// left shift x by n bits pub fn left_shift(x: T, n: u32) -> Word { assert!(n < 256); diff --git a/circuit-benchmarks/src/taiko_super_circuit.rs b/circuit-benchmarks/src/taiko_super_circuit.rs index b2fb94f8c1..9318835689 100644 --- a/circuit-benchmarks/src/taiko_super_circuit.rs +++ b/circuit-benchmarks/src/taiko_super_circuit.rs @@ -162,12 +162,8 @@ fn gen_application_snark( anchor_gas_limit: 150000, ..Default::default() }; - let (_, super_circuit, _, _) = SuperCircuit::<_>::build( - block_1tx(&protocol_instance), - circuits_params, - protocol_instance, - ) - .unwrap(); + let (_, super_circuit, _, _) = + SuperCircuit::<_>::build(block_1tx(), circuits_params, protocol_instance).unwrap(); // let pk = gen_pk(params, &super_circuit, Some(Path::new("./examples/app.pk")), // super_circuit.params()); diff --git a/external-tracer/src/lib.rs b/external-tracer/src/lib.rs index fcc440b7cc..28f8cd35d9 100644 --- a/external-tracer/src/lib.rs +++ b/external-tracer/src/lib.rs @@ -25,8 +25,6 @@ pub struct TraceConfig { pub logger_config: LoggerConfig, /// taiko pub taiko: bool, - /// treasury - pub treasury: Address, } /// Configuration structure for `logger.Config` diff --git a/geth-utils/gethutil/trace.go b/geth-utils/gethutil/trace.go index 465cecdc88..ed2b5fabc9 100644 --- a/geth-utils/gethutil/trace.go +++ b/geth-utils/gethutil/trace.go @@ -123,7 +123,6 @@ type TraceConfig struct { Transactions []Transaction `json:"transactions"` LoggerConfig *logger.Config `json:"logger_config"` Taiko bool `json:"taiko"` - Treasury common.Address `json:"treasury"` } func newUint64(val uint64) *uint64 { return &val } @@ -135,7 +134,6 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { DAOForkBlock: big.NewInt(0), DAOForkSupport: true, EIP150Block: big.NewInt(0), - EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), @@ -145,8 +143,12 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), - Taiko: config.Taiko, - Treasury: config.Treasury, + // FIXME: EIP-3860 + // ShanghaiTime: newUint64(0), + MergeNetsplitBlock: nil, + TerminalTotalDifficulty: common.Big0, + TerminalTotalDifficultyPassed: true, + Taiko: config.Taiko, } var txsGasLimit uint64 @@ -176,7 +178,8 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { Data: tx.CallData, AccessList: txAccessList, SkipAccountChecks: false, - IsFirstTx: i == 0, + // treat the first tx as anchor tx when Taiko is enabled + IsAnchor: config.Taiko && i == 0, } txsGasLimit += uint64(tx.GasLimit) @@ -185,6 +188,11 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { return nil, fmt.Errorf("txs total gas: %d Exceeds block gas limit: %d", txsGasLimit, blockGasLimit) } + random := common.Hash{} + if config.Block.Difficulty != nil { + random = common.BigToHash(config.Block.Difficulty.ToInt()) + } + blockCtx := vm.BlockContext{ CanTransfer: core.CanTransfer, Transfer: core.Transfer, @@ -202,6 +210,7 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { Difficulty: toBigInt(config.Block.Difficulty), BaseFee: toBigInt(config.Block.BaseFee), GasLimit: blockGasLimit, + Random: &random, } // Setup state db with accounts from argument @@ -222,7 +231,7 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { executionResults := make([]*ExecutionResult, len(config.Transactions)) for i, message := range messages { tracer := logger.NewStructLogger(config.LoggerConfig) - evm := vm.NewEVM(blockCtx, core.NewEVMTxContext(&message), stateDB, &chainConfig, vm.Config{Debug: true, Tracer: tracer, NoBaseFee: true}) + evm := vm.NewEVM(blockCtx, core.NewEVMTxContext(&message), stateDB, &chainConfig, vm.Config{Tracer: tracer, NoBaseFee: true}) result, err := core.ApplyMessage(evm, &message, new(core.GasPool).AddGas(message.GasLimit)) if err != nil { diff --git a/geth-utils/go.mod b/geth-utils/go.mod index d2ae504dc5..6551098ca8 100644 --- a/geth-utils/go.mod +++ b/geth-utils/go.mod @@ -3,10 +3,10 @@ module main go 1.16 require ( - github.com/ethereum/go-ethereum v1.11.5 - github.com/holiman/uint256 v1.2.0 + github.com/ethereum/go-ethereum v1.12.2 + github.com/holiman/uint256 v1.2.3 ) // Uncomment for debugging // replace github.com/ethereum/go-ethereum => ../../go-ethereum -replace github.com/ethereum/go-ethereum => github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b +replace github.com/ethereum/go-ethereum v1.12.2 => github.com/taikoxyz/taiko-geth v0.0.0-20230814083522-76b7e96ec36f diff --git a/geth-utils/go.sum b/geth-utils/go.sum index 373453b0be..7aaa4478b0 100644 --- a/geth-utils/go.sum +++ b/geth-utils/go.sum @@ -49,6 +49,7 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= @@ -102,6 +103,9 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= +github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= @@ -121,8 +125,11 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -146,8 +153,12 @@ github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5w github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= +github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.9.1-0.20230105202408-1a7a29904a7c/go.mod h1:CkbdF9hbRidRJYMRzmfX8TMOr95I2pYXRHF18MzRrvA= +github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= +github.com/consensys/gnark-crypto v0.10.0 h1:zRh22SR7o4K35SoNqouS9J/TKHTyU2QWaj5ldehyXtA= +github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -160,13 +171,17 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-ipa v0.0.0-20220523130400-f11357ae11c7/go.mod h1:gFnFS95y8HstDP6P9pPwzrxOOC5TRDkwbM+ao15ChAI= +github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= +github.com/crate-crypto/go-kzg-4844 v0.3.0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A= +github.com/crate-crypto/go-kzg-4844 v0.3.0/go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= @@ -190,12 +205,12 @@ github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/ github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= +github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -206,10 +221,14 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg= +github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= +github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= @@ -222,7 +241,7 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/gballet/go-verkle v0.0.0-20220902153445-097bd83b7732/go.mod h1:o/XfIXWi4/GqbQirfRm5uTbXMG5NpqxkxblnbZ+QM9I= +github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRYVRSDqwakm282WEkjfaAj1hxU/v5RXxk5nXOiI= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= @@ -329,8 +348,9 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -370,9 +390,11 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -408,15 +430,18 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= +github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= @@ -424,11 +449,13 @@ github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:q github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= @@ -471,6 +498,7 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kataras/blocks v0.0.6/go.mod h1:UK+Iwk0Oxpc0GdoJja7sEildotAUKK1LYeYcVF0COWc= github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= @@ -490,6 +518,7 @@ github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZ github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= +github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -531,6 +560,7 @@ github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awS github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -587,6 +617,7 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -662,6 +693,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -698,7 +730,9 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7/go.mod h1:IToEjHuttnUzwZI5KBSM/LOOW3qLbbrHOEfp3SbECGY= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -757,10 +791,12 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -771,14 +807,17 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/supranational/blst v0.3.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= +github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b h1:vtNEoKn0R8YSk79cO+19XoO8Pf22Ql0xbImY45vOyg0= -github.com/taikoxyz/taiko-geth v0.0.0-20230807083144-d9cd977d304b/go.mod h1:it7x0DWnTDMfVFdXcU6Ti4KEFQynLHVRarcSlPr0HBo= +github.com/taikoxyz/taiko-geth v0.0.0-20230814083522-76b7e96ec36f h1:tbDbbWKensnOvnKyMdSScFOj0bZSjeUUmte/gmOEMm8= +github.com/taikoxyz/taiko-geth v0.0.0-20230814083522-76b7e96ec36f/go.mod h1:1cRAEV+rp/xX0zraSCBnu9Py3HQ+geRMj3HdR+k0wfI= github.com/tdewolff/minify/v2 v2.12.1/go.mod h1:p5pwbvNs1ghbFED/ZW1towGsnnWwzvM8iz8l0eURi9g= github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= github.com/tdewolff/parse/v2 v2.6.3/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= @@ -792,6 +831,7 @@ github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZF github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= @@ -800,7 +840,8 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= +github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= +github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= @@ -847,6 +888,7 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -877,8 +919,9 @@ golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -894,8 +937,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= -golang.org/x/exp v0.0.0-20230206171751-46f607a40771/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= +golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -926,6 +969,9 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -983,14 +1029,17 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1019,8 +1068,10 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1074,6 +1125,7 @@ golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1090,6 +1142,7 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1107,8 +1160,8 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1120,13 +1173,18 @@ golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1136,10 +1194,12 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1148,6 +1208,7 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1213,6 +1274,8 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1353,6 +1416,7 @@ gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1380,9 +1444,11 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/mock/Cargo.toml b/mock/Cargo.toml index b8396f703e..ce768641c0 100644 --- a/mock/Cargo.toml +++ b/mock/Cargo.toml @@ -6,6 +6,9 @@ authors = ["The appliedzkp team"] license = "MIT OR Apache-2.0" [dependencies] +halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", features = [ + "circuit-params", +], tag = "v2023_04_20" } eth-types = { path = "../eth-types" } external-tracer = { path = "../external-tracer" } lazy_static = "1.4" @@ -14,3 +17,8 @@ ethers-signers = "=2.0.0" ethers-core = "=2.0.0" rand_chacha = "0.3" rand = "0.8" +sha3 = "0.10" +num-bigint = { version = "0.4" } +num = "0.4" +libsecp256k1 = "0.7" +once_cell = "1.17.1" diff --git a/taiko-mock/src/anchor.rs b/mock/src/anchor.rs similarity index 100% rename from taiko-mock/src/anchor.rs rename to mock/src/anchor.rs diff --git a/mock/src/lib.rs b/mock/src/lib.rs index e3d286bd91..7512272e34 100644 --- a/mock/src/lib.rs +++ b/mock/src/lib.rs @@ -1,11 +1,11 @@ //! Mock types and functions to generate GethData used for tests - -use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Word}; +use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Hash, Word}; use ethers_signers::LocalWallet; use lazy_static::lazy_static; use rand::SeedableRng; use rand_chacha::ChaCha20Rng; mod account; +mod anchor; mod block; pub mod test_ctx; mod transaction; @@ -24,8 +24,12 @@ lazy_static! { /// Mock gasprice value pub static ref MOCK_GASPRICE: Word = Word::from(1u8); /// Mock BASEFEE value - pub static ref MOCK_BASEFEE: Word = Word::zero(); - /// Mock GASLIMIT value + pub static ref MOCK_BASEFEE: Word = Word::from(0u8); + /// Mock GASTIPCAP value + pub static ref MOCK_GASTIPCAP: Word = Word::from(1u8); + /// Mock GASFEECAP value + pub static ref MOCK_GASFEECAP: Word = Word::from(1u8); + /// Mock GASLIMIT value pub static ref MOCK_GASLIMIT: Word = Word::from(0x2386f26fc10000u64); /// Mock chain ID value pub static ref MOCK_CHAIN_ID: Word = Word::from(1338u64); @@ -39,6 +43,23 @@ lazy_static! { address!("0x000000000000000000000000000000000cafe444"), address!("0x000000000000000000000000000000000cafe555"), ]; + /// GOLDEN_TOUCH is Anchor's from address + pub static ref GOLDEN_TOUCH: Address = address!("0x0000777735367b36bC9B61C50022d9D0700dB4Ec"); + /// GOLDEN_TOUCH's private key + pub static ref GOLDEN_TOUCH_PRIVATEKEY: Word = word!("0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38"); + /// Taiko l2 contract address + pub static ref MOCK_TAIKO_L2_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe666"); + pub static ref MOCK_TAIKO_TREASURY_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe777"); + /// Mock anchor + pub static ref MOCK_ANCHOR_GAS_LIMIT: Word = Word::from(180000); + pub static ref MOCK_ANCHOR_GAS_PRICE: Word = Word::zero(); + pub static ref MOCK_ANCHOR_L1_HASH: Hash = Hash::from_slice(&[0u8; 32]); + pub static ref MOCK_ANCHOR_SIGNAL_ROOT: Hash = Hash::from_slice(&[0u8; 32]); + pub static ref MOCK_ANCHOR_L1_HIGHT: u64 = 0; + pub static ref MOCK_ANCHOR_PARENT_GAS_USED: u32 = 0; + pub static ref MOCK_ANCHOR_TX_VALUE: Word = Word::from(0); + + /// pub /// Mock EVM codes to use for test cases. pub static ref MOCK_CODES: Vec = vec![ Bytes::from([0x60, 0x10, 0x00]), // PUSH1(0x10), STOP diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index 4cdcfe0570..c5ad54b4da 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -1,16 +1,18 @@ //! Mock types and functions to generate Test enviroments for ZKEVM tests -use crate::{eth, MockAccount, MockBlock, MockTransaction}; +use crate::{ + eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_CODES, MOCK_TAIKO_L2_ADDRESS, + MOCK_TAIKO_TREASURY_ADDRESS, +}; use eth_types::{ geth_types::{Account, BlockConstants, GethData}, Block, Bytecode, Error, GethExecTrace, Transaction, Word, }; +pub use external_tracer::LoggerConfig; use external_tracer::{trace, TraceConfig}; use helpers::*; use itertools::Itertools; -pub use external_tracer::LoggerConfig; - /// TestContext is a type that contains all the information from a block /// required to build the circuit inputs. /// @@ -81,7 +83,7 @@ pub struct TestContext { /// chain id pub chain_id: Word, /// Account list - pub accounts: [Account; NACC], + pub accounts: Vec, /// history hashes contains most recent 256 block hashes in history, where /// the lastest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, @@ -98,7 +100,7 @@ impl From> for GethD history_hashes: ctx.history_hashes, eth_block: ctx.eth_block, geth_traces: ctx.geth_traces.to_vec(), - accounts: ctx.accounts.into(), + accounts: ctx.accounts, } } } @@ -116,38 +118,80 @@ impl TestContext { Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, FAcc: FnOnce([&mut MockAccount; NACC]), { - let mut accounts: Vec = vec![MockAccount::default(); NACC]; + Self::new_with_logger_config_and_taiko( + history_hashes, + acc_fns, + func_tx, + func_block, + logger_config, + false, + ) + } + + pub fn new_with_logger_config_and_taiko( + history_hashes: Option>, + acc_fns: FAcc, + func_tx: FTx, + func_block: Fb, + logger_config: LoggerConfig, + use_anchor: bool, + ) -> Result + where + FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), + Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, + FAcc: FnOnce([&mut MockAccount; NACC]), + { + let more_accounts = if use_anchor { 3 } else { 1 }; + let mut accounts: Vec = vec![MockAccount::default(); NACC + more_accounts]; + accounts[0].address(*MOCK_TAIKO_TREASURY_ADDRESS); + if use_anchor { + // add the GOLDEN_TOUCH account in the first position + accounts[1].address(*GOLDEN_TOUCH); + // add the l2 contract account in the second position + accounts[2] + .address(*MOCK_TAIKO_L2_ADDRESS) + .code(MOCK_CODES[0].clone()); + } // Build Accounts modifiers let account_refs = accounts .iter_mut() + .skip(more_accounts) .collect_vec() .try_into() .expect("Mismatched len err"); acc_fns(account_refs); - let accounts: [MockAccount; NACC] = accounts + let accounts_cloned: [MockAccount; NACC] = accounts .iter_mut() + .skip(more_accounts) .map(|acc| acc.build()) .collect_vec() .try_into() .expect("Mismatched acc len"); - let mut transactions = vec![MockTransaction::default(); NTX]; + let mut transactions = + vec![MockTransaction::default(); NTX + if use_anchor { 1 } else { 0 }]; // By default, set the TxIndex and the Nonce values of the multiple transactions // of the context correlative so that any Ok test passes by default. // If the user decides to override these values, they'll then be set to whatever // inputs were provided by the user. + + if use_anchor { + // add the anchor transaction in the first position + transactions[0] = MockTransaction::new_anchor(); + } transactions .iter_mut() .enumerate() .skip(1) .for_each(|(idx, tx)| { let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); - tx.transaction_idx(idx).nonce(idx); + tx.transaction_idx(idx).nonce(idx - 1); }); - let tx_refs = transactions.iter_mut().collect(); + let tx_skipped = if use_anchor { 1 } else { 0 }; + let tx_refs = transactions.iter_mut().skip(tx_skipped).collect(); // Build Tx modifiers. - func_tx(tx_refs, accounts.clone()); + func_tx(tx_refs, accounts_cloned); let transactions: Vec = transactions.iter_mut().map(|tx| tx.build()).collect(); @@ -158,20 +202,15 @@ impl TestContext { let chain_id = block.chain_id; let block = Block::::from(block); - let accounts: [Account; NACC] = accounts - .iter() - .cloned() - .map(Account::from) - .collect_vec() - .try_into() - .expect("Mismatched acc len"); + let accounts = accounts.iter().cloned().map(Account::from).collect_vec(); let geth_traces = gen_geth_traces( chain_id, block.clone(), - accounts.to_vec(), + accounts.clone(), history_hashes.clone(), logger_config, + use_anchor, )?; Ok(Self { @@ -209,13 +248,35 @@ impl TestContext { ) } + /// Create a new TestContext used for taiko environment. + pub fn new_with_taiko( + history_hashes: Option>, + acc_fns: FAcc, + func_tx: FTx, + func_block: Fb, + ) -> Result + where + FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), + Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, + FAcc: FnOnce([&mut MockAccount; NACC]), + { + Self::new_with_logger_config_and_taiko( + history_hashes, + acc_fns, + func_tx, + func_block, + LoggerConfig::default(), + true, + ) + } + /// Returns a simple TestContext setup with a single tx executing the /// bytecode passed as parameters. The balances of the 2 accounts and /// addresses are the ones used in [`TestContext:: /// account_0_code_account_1_no_code`]. Extra accounts, txs and/or block /// configs are set as [`Default`]. pub fn simple_ctx_with_bytecode(bytecode: Bytecode) -> Result, Error> { - TestContext::new( + TestContext::<2, 1>::new_with_taiko( None, account_0_code_account_1_no_code(bytecode), tx_from_1_to_0, @@ -232,6 +293,7 @@ pub fn gen_geth_traces( accounts: Vec, history_hashes: Option>, logger_config: LoggerConfig, + use_anchor: bool, ) -> Result, Error> { let trace_config = TraceConfig { chain_id, @@ -247,7 +309,7 @@ pub fn gen_geth_traces( .map(eth_types::geth_types::Transaction::from) .collect(), logger_config, - ..Default::default() + taiko: use_anchor, }; let traces = trace(&trace_config)?; Ok(traces) diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 1b6c6ccd1f..4b52f89a58 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -1,13 +1,19 @@ //! Mock Transaction definition and builder related methods. -use super::{MOCK_ACCOUNTS, MOCK_CHAIN_ID, MOCK_GASPRICE}; +use crate::MOCK_BASEFEE; + +use super::{ + GOLDEN_TOUCH, MOCK_ACCOUNTS, MOCK_ANCHOR_GAS_LIMIT, MOCK_ANCHOR_GAS_PRICE, + MOCK_ANCHOR_TX_VALUE, MOCK_CHAIN_ID, MOCK_GASFEECAP, MOCK_GASPRICE, MOCK_GASTIPCAP, + MOCK_TAIKO_L2_ADDRESS, +}; use eth_types::{ geth_types::Transaction as GethTransaction, word, AccessList, Address, Bytes, Hash, Transaction, Word, U64, }; use ethers_core::{ rand::{CryptoRng, RngCore}, - types::{OtherFields, TransactionRequest}, + types::{Eip1559TransactionRequest, OtherFields}, }; use ethers_signers::{LocalWallet, Signer}; use lazy_static::lazy_static; @@ -126,6 +132,7 @@ pub struct MockTransaction { pub from: AddrOrWallet, pub to: Option, pub value: Word, + // gas_price == min(max_fee_per_gas, max_priority_fee_per_gas + base_fee_per_gas) pub gas_price: Word, pub gas: Word, pub input: Bytes, @@ -158,8 +165,8 @@ impl Default for MockTransaction { s: None, transaction_type: U64::zero(), access_list: AccessList::default(), - max_priority_fee_per_gas: Word::zero(), - max_fee_per_gas: Word::zero(), + max_priority_fee_per_gas: *MOCK_GASTIPCAP, + max_fee_per_gas: *MOCK_GASFEECAP, chain_id: *MOCK_CHAIN_ID, } } @@ -198,6 +205,26 @@ impl From for GethTransaction { } } +impl MockTransaction { + /// create a mock anchor transaction + pub fn new_anchor() -> Self { + let mut tx = MockTransaction::default(); + tx.from(*GOLDEN_TOUCH); + tx.to(*MOCK_TAIKO_L2_ADDRESS); + tx.gas(*MOCK_ANCHOR_GAS_LIMIT) + .gas_price(*MOCK_ANCHOR_GAS_PRICE) + .max_priority_fee_per_gas(Word::zero()) + .max_fee_per_gas(*MOCK_BASEFEE) + .from(*GOLDEN_TOUCH) + .to(*MOCK_TAIKO_L2_ADDRESS) + .input(crate::anchor::anchor_call()) + .nonce(0) + .value(*MOCK_ANCHOR_TX_VALUE); + crate::anchor::sign(&mut tx); + tx + } +} + impl MockTransaction { /// Tx Hash computed based on the fields of the Tx by /// default unless `Some(hash)` is specified on build process. @@ -307,14 +334,15 @@ impl MockTransaction { /// Consumes the mutable ref to the MockTransaction returning the structure /// by value. pub fn build(&mut self) -> Self { - let tx = TransactionRequest::new() + let tx = Eip1559TransactionRequest::new() .from(self.from.address()) .to(self.to.clone().unwrap_or_default().address()) .nonce(self.nonce) .value(self.value) .data(self.input.clone()) .gas(self.gas) - .gas_price(self.gas_price) + .max_priority_fee_per_gas(self.max_priority_fee_per_gas) + .max_fee_per_gas(self.max_fee_per_gas) .chain_id(self.chain_id.low_u64()); match (self.v, self.r, self.s) { diff --git a/taiko-mock/.gitignore b/taiko-mock/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/taiko-mock/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/taiko-mock/Cargo.toml b/taiko-mock/Cargo.toml deleted file mode 100644 index ef533136bb..0000000000 --- a/taiko-mock/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "taiko-mock" -version = "0.1.0" -edition = "2021" -authors = ["The appliedzkp team"] -license = "MIT OR Apache-2.0" - -[dependencies] -halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", features = [ - "circuit-params", -], tag = "v2023_04_20" } -eth-types = { path = "../eth-types" } -external-tracer = { path = "../external-tracer" } -lazy_static = "1.4" -itertools = "0.10.3" -ethers-signers = "=2.0.0" -ethers-core = "=2.0.0" -rand_chacha = "0.3" -rand = "0.8" -sha3 = "0.10" -num-bigint = { version = "0.4" } -num = "0.4" -libsecp256k1 = "0.7" -once_cell = "1.17.1" diff --git a/taiko-mock/src/account.rs b/taiko-mock/src/account.rs deleted file mode 100644 index 87abb710e8..0000000000 --- a/taiko-mock/src/account.rs +++ /dev/null @@ -1,84 +0,0 @@ -//! Mock Account definition and builder related methods. - -use eth_types::{geth_types::Account, Address, Bytes, Word}; -use std::collections::HashMap; - -#[derive(Debug, Clone, Default)] -/// Mock structure which represents an Account and can be used for tests. -/// It contains all the builder-pattern methods required to be able to specify -/// any of its details. -pub struct MockAccount { - /// Address - pub address: Address, - /// nonce - pub nonce: u64, - /// Balance - pub balance: Word, - /// EVM Code - pub code: Bytes, - /// Storage - pub storage: HashMap, -} - -impl From for Account { - fn from(mock: MockAccount) -> Self { - Account { - address: mock.address, - nonce: mock.nonce.into(), - balance: mock.balance, - code: mock.code, - storage: mock.storage, - } - } -} - -impl MockAccount { - /// Set address field for the MockAccount. - pub fn address(&mut self, address: Address) -> &mut Self { - self.address = address; - self - } - - /// Set nonce field for the MockAccount. - pub fn nonce(&mut self, nonce: u64) -> &mut Self { - self.nonce = nonce; - self - } - - /// Set balance field for the MockAccount. - pub fn balance(&mut self, balance: Word) -> &mut Self { - self.balance = balance; - self - } - - /// Set code field for the MockAccount. - pub fn code>(&mut self, code: T) -> &mut Self { - self.code = code.into(); - self - } - - /// Add storage field for the MockAccount by passing an iterator over the - /// key-value tuples of type [(`Word`, `Word`)]. - pub fn storage>(&mut self, storage: I) -> &mut Self { - storage.for_each(|pair| { - assert!(self.storage.insert(pair.0, pair.1).is_none()); - }); - self - } - - /// Set all fields for the MockAccount based on their values in `account`. - pub fn account(&mut self, account: &Account) -> &mut Self { - self.address(account.address); - self.nonce(account.nonce.as_u64()); - self.balance(account.balance); - self.code(account.code.clone()); - self.storage(account.storage.iter().map(|(k, v)| (*k, *v))); - self - } - - /// Finalizes the current MockAccount under construction returning a new - /// instance to it. - pub fn build(&mut self) -> Self { - self.to_owned() - } -} diff --git a/taiko-mock/src/block.rs b/taiko-mock/src/block.rs deleted file mode 100644 index 4123312933..0000000000 --- a/taiko-mock/src/block.rs +++ /dev/null @@ -1,282 +0,0 @@ -//! Mock Block definition and builder related methods. - -use crate::{MockTransaction, MOCK_BASEFEE, MOCK_CHAIN_ID, MOCK_DIFFICULTY, MOCK_GASLIMIT}; -use eth_types::{Address, Block, Bytes, Hash, Transaction, Word, H64, U64}; -use ethers_core::types::{Bloom, OtherFields}; - -#[derive(Clone, Debug)] -/// Mock structure which represents an Ethereum Block and can be used for tests. -/// It contains all the builder-pattern methods required to be able to specify -/// any of it's details. -pub struct MockBlock { - hash: Option, - parent_hash: Hash, - uncles_hash: Hash, - author: Address, - state_root: Hash, - transactions_root: Hash, - receipts_root: Hash, - number: U64, - gas_used: Word, - gas_limit: Word, - base_fee_per_gas: Word, - extra_data: Bytes, - logs_bloom: Option, - timestamp: Word, - difficulty: Word, - total_difficulty: Word, - seal_fields: Vec, - uncles: Vec, - pub(crate) transactions: Vec, - size: Word, - mix_hash: Hash, - nonce: H64, - // This field is handled here as we assume that all block txs have the same ChainId. - // Also, the field is stored in the block_table since we don't have a chain_config - // structure/table. - pub(crate) chain_id: Word, -} - -impl Default for MockBlock { - fn default() -> Self { - MockBlock { - hash: Some(Hash::zero()), - parent_hash: Hash::zero(), - uncles_hash: Hash::zero(), - author: Address::zero(), - state_root: Hash::zero(), - transactions_root: Hash::zero(), - receipts_root: Hash::zero(), - number: U64([0u64]), - gas_used: Word::zero(), - gas_limit: *MOCK_GASLIMIT, - base_fee_per_gas: *MOCK_BASEFEE, - extra_data: Bytes::default(), - logs_bloom: None, - timestamp: Word::from(123456789u64), - difficulty: *MOCK_DIFFICULTY, - total_difficulty: Word::zero(), - seal_fields: Vec::new(), - uncles: Vec::new(), - transactions: Vec::new(), - size: Word::zero(), - mix_hash: Hash::zero(), - nonce: H64::zero(), - chain_id: *MOCK_CHAIN_ID, - } - } -} - -impl From for Block { - fn from(mut mock: MockBlock) -> Self { - Block { - hash: mock.hash.or_else(|| Some(Hash::default())), - parent_hash: mock.parent_hash, - uncles_hash: mock.uncles_hash, - author: Some(mock.author), - state_root: mock.state_root, - transactions_root: mock.transactions_root, - receipts_root: mock.receipts_root, - number: Some(mock.number), - gas_used: mock.gas_used, - gas_limit: mock.gas_limit, - extra_data: mock.extra_data, - logs_bloom: mock.logs_bloom, - timestamp: mock.timestamp, - difficulty: mock.difficulty, - total_difficulty: Some(mock.total_difficulty), - seal_fields: mock.seal_fields, - uncles: mock.uncles, - transactions: mock - .transactions - .iter_mut() - .map(|mock_tx| (mock_tx.chain_id(mock.chain_id).to_owned()).into()) - .collect::>(), - size: Some(mock.size), - mix_hash: Some(mock.mix_hash), - nonce: Some(mock.nonce), - base_fee_per_gas: Some(mock.base_fee_per_gas), - other: OtherFields::default(), - } - } -} - -impl From for Block<()> { - fn from(mock: MockBlock) -> Self { - Block { - hash: mock.hash.or_else(|| Some(Hash::default())), - parent_hash: mock.parent_hash, - uncles_hash: mock.uncles_hash, - author: Some(mock.author), - state_root: mock.state_root, - transactions_root: mock.transactions_root, - receipts_root: mock.receipts_root, - number: Some(mock.number), - gas_used: mock.gas_used, - gas_limit: mock.gas_limit, - extra_data: mock.extra_data, - logs_bloom: mock.logs_bloom, - timestamp: mock.timestamp, - difficulty: mock.difficulty, - total_difficulty: Some(mock.total_difficulty), - seal_fields: mock.seal_fields, - uncles: mock.uncles, - transactions: vec![], - size: Some(mock.size), - mix_hash: Some(mock.mix_hash), - nonce: Some(mock.nonce), - base_fee_per_gas: Some(mock.base_fee_per_gas), - other: OtherFields::default(), - } - } -} - -impl MockBlock { - /// TODO: This should be computed based on the fields of the block by - /// default unless `Some(hash)` is specified on build process. - pub fn hash(&mut self, hash: Hash) -> &mut Self { - self.hash = Some(hash); - self - } - - /// Set parent_hash field for the MockBlock. - pub fn parent_hash(&mut self, parent_hash: Hash) -> &mut Self { - self.parent_hash = parent_hash; - self - } - - /// Set uncles_hash field for the MockBlock. - pub fn uncles_hash(&mut self, uncles_hash: Hash) -> &mut Self { - self.uncles_hash = uncles_hash; - self - } - - /// Set author field for the MockBlock. - pub fn author(&mut self, author: Address) -> &mut Self { - self.author = author; - self - } - - /// Set state_root field for the MockBlock. - pub fn state_root(&mut self, state_root: Hash) -> &mut Self { - self.state_root = state_root; - self - } - - /// Set transactions_root field for the MockBlock. - pub fn transactions_root(&mut self, transactions_root: Hash) -> &mut Self { - self.transactions_root = transactions_root; - self - } - - /// Set receipts_root field for the MockBlock. - pub fn receipts_root(&mut self, receipts_root: Hash) -> &mut Self { - self.receipts_root = receipts_root; - self - } - - /// Set number field for the MockBlock. - pub fn number(&mut self, number: u64) -> &mut Self { - self.number = U64::from(number); - self - } - - /// Set gas_used field for the MockBlock. - pub fn gas_used(&mut self, gas_used: Word) -> &mut Self { - self.gas_used = gas_used; - self - } - - /// Set gas_limit field for the MockBlock. - pub fn gas_limit(&mut self, gas_limit: Word) -> &mut Self { - self.gas_limit = gas_limit; - self - } - - /// Set base_fee_per_gas field for the MockBlock. - pub fn base_fee_per_gas(&mut self, base_fee_per_gas: Word) -> &mut Self { - self.base_fee_per_gas = base_fee_per_gas; - self - } - - /// Set extra_data field for the MockBlock. - pub fn extra_data(&mut self, extra_data: Bytes) -> &mut Self { - self.extra_data = extra_data; - self - } - - /// Set logs_bloom field for the MockBlock. - pub fn logs_bloom(&mut self, logs_bloom: Bloom) -> &mut Self { - self.logs_bloom = Some(logs_bloom); - self - } - - /// Set timestamp field for the MockBlock. - pub fn timestamp(&mut self, timestamp: Word) -> &mut Self { - self.timestamp = timestamp; - self - } - - /// Set difficulty field for the MockBlock. - pub fn difficulty(&mut self, difficulty: Word) -> &mut Self { - self.difficulty = difficulty; - self - } - - /// Set total_difficulty field for the MockBlock. - pub fn total_difficulty(&mut self, total_difficulty: Word) -> &mut Self { - self.total_difficulty = total_difficulty; - self - } - - /// Set seal_fields field for the MockBlock. - pub fn seal_fields(&mut self, seal_fields: Vec) -> &mut Self { - self.seal_fields = seal_fields; - self - } - - /// Set uncles field for the MockBlock. - pub fn uncles(&mut self, uncles: Vec) -> &mut Self { - self.uncles = uncles; - self - } - - /// Set transactions field for the MockBlock. - pub fn transactions>( - &mut self, - transactions: I, - ) -> &mut Self { - self.transactions.extend(transactions); - self - } - - /// Set size field for the MockBlock. - pub fn size(&mut self, size: Word) -> &mut Self { - self.size = size; - self - } - - /// Set mix_hash field for the MockBlock. - pub fn mix_hash(&mut self, mix_hash: Hash) -> &mut Self { - self.mix_hash = mix_hash; - self - } - - /// Set nonce field for the MockBlock. - pub fn nonce(&mut self, nonce: H64) -> &mut Self { - self.nonce = nonce; - self - } - - /// Set chain_id field for the MockBlock. - pub fn chain_id(&mut self, chain_id: Word) -> &mut Self { - self.chain_id = chain_id; - self - } - - /// Finalizes the current MockBlock under construction returning a new - /// instance to it. - pub fn build(&mut self) -> Self { - self.to_owned() - } -} diff --git a/taiko-mock/src/lib.rs b/taiko-mock/src/lib.rs deleted file mode 100644 index d7456ec68a..0000000000 --- a/taiko-mock/src/lib.rs +++ /dev/null @@ -1,169 +0,0 @@ -//! Mock types and functions to generate GethData used for tests -use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Hash, Word}; -use ethers_signers::LocalWallet; -use lazy_static::lazy_static; -use rand::SeedableRng; -use rand_chacha::ChaCha20Rng; -mod account; -mod anchor; -mod block; -pub mod test_ctx; -mod transaction; - -pub use account::MockAccount; -pub(crate) use block::MockBlock; -pub use test_ctx::TestContext; -pub use transaction::{AddrOrWallet, MockTransaction, CORRECT_MOCK_TXS}; - -lazy_static! { - /// Mock 1 ETH - pub static ref MOCK_1_ETH: Word = eth(1); - /// Mock coinbase value - pub static ref MOCK_COINBASE: Address = - address!("0x00000000000000000000000000000000c014ba5e"); - /// Mock gasprice value - pub static ref MOCK_GASPRICE: Word = Word::from(2u8); - /// Mock BASEFEE value - pub static ref MOCK_BASEFEE: Word = Word::from(1u8); - /// Mock GASTIPCAP value - pub static ref MOCK_GASTIPCAP: Word = Word::from(1u8); - /// Mock GASFEECAP value - pub static ref MOCK_GASFEECAP: Word = Word::from(2u8); - /// Mock GASLIMIT value - pub static ref MOCK_GASLIMIT: Word = Word::from(0x2386f26fc10000u64); - /// Mock chain ID value - pub static ref MOCK_CHAIN_ID: Word = Word::from(1338u64); - /// Mock DIFFICULTY value - pub static ref MOCK_DIFFICULTY: Word = Word::from(0x200000u64); - /// Mock accounts loaded with ETH to use for test cases. - pub static ref MOCK_ACCOUNTS: Vec

= vec![ - address!("0x000000000000000000000000000000000cafe111"), - address!("0x000000000000000000000000000000000cafe222"), - address!("0x000000000000000000000000000000000cafe333"), - address!("0x000000000000000000000000000000000cafe444"), - address!("0x000000000000000000000000000000000cafe555"), - ]; - /// GOLDEN_TOUCH is Anchor's from address - pub static ref GOLDEN_TOUCH: Address = address!("0x0000777735367b36bC9B61C50022d9D0700dB4Ec"); - /// GOLDEN_TOUCH's private key - pub static ref GOLDEN_TOUCH_PRIVATEKEY: Word = word!("0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38"); - /// Taiko l2 contract address - pub static ref MOCK_TAIKO_L2_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe666"); - pub static ref MOCK_TAIKO_TREASURY_ADDRESS: Address = address!("0x000000000000000000000000000000000cafe777"); - /// Mock anchor - pub static ref MOCK_ANCHOR_GAS_LIMIT: Word = Word::from(180000); - pub static ref MOCK_ANCHOR_GAS_PRICE: Word = Word::zero(); - pub static ref MOCK_ANCHOR_L1_HASH: Hash = Hash::from_slice(&[0u8; 32]); - pub static ref MOCK_ANCHOR_SIGNAL_ROOT: Hash = Hash::from_slice(&[0u8; 32]); - pub static ref MOCK_ANCHOR_L1_HIGHT: u64 = 0; - pub static ref MOCK_ANCHOR_PARENT_GAS_USED: u32 = 0; - pub static ref MOCK_ANCHOR_TX_VALUE: Word = Word::from(0); - - /// pub - /// Mock EVM codes to use for test cases. - pub static ref MOCK_CODES: Vec = vec![ - Bytes::from([0x60, 0x10, 0x00]), // PUSH1(0x10), STOP - Bytes::from([0x60, 0x01, 0x60, 0x02, 0x01, 0x00]), // PUSH1(1), PUSH1(2), ADD, STOP - Bytes::from([0x60, 0x01, 0x60, 0x02, 0x02, 0x00]), // PUSH1(1), PUSH1(2), MUL, STOP - Bytes::from([0x60, 0x02, 0x60, 0x01, 0x03, 0x00]), // PUSH1(2), PUSH1(1), SUB, STOP - Bytes::from([0x60, 0x09, 0x60, 0x03, 0x04, 0x00]), // PUSH1(9), PUSH1(3), DIV, STOP - Bytes::from([0x30; 256]), // ADDRESS * 256 - ]; - /// Mock wallets used to generate correctly signed and hashed Transactions. - pub static ref MOCK_WALLETS: Vec = { - let mut rng = ChaCha20Rng::seed_from_u64(2u64); - vec![ - LocalWallet::new(&mut rng), - LocalWallet::new(&mut rng), - LocalWallet::new(&mut rng), - ] - }; - /// Mock EVM bytecode for a deployed contract. - /// PUSH1 0x20 - /// PUSH1 0 - /// PUSH1 0 - /// CALLDATACOPY - /// PUSH1 0x20 - /// PUSH1 0 - /// RETURN - /// - /// bytecode: 0x6020600060003760206000F3 - /// - /// // constructor - /// PUSH12 0x6020600060003760206000F3 - /// PUSH1 0 - /// MSTORE - /// PUSH1 0xC - /// PUSH1 0x14 - /// RETURN - /// - /// bytecode: 0x6B6020600060003760206000F3600052600C6014F3 - pub static ref MOCK_DEPLOYED_CONTRACT_BYTECODE: Word = word!("6B6020600060003760206000F3600052600C6014F3"); -} - -/// Generate a [`Word`] which corresponds to a certain amount of ETH. -pub fn eth(x: u64) -> Word { - Word::from(x) * Word::from(10u64.pow(18)) -} - -/// Express an amount of ETH in GWei. -pub fn gwei(x: u64) -> Word { - Word::from(x) * Word::from(10u64.pow(9)) -} - -/// Holds the parameters for generating mock EVM bytecode for a contract call -pub struct MockCallBytecodeParams { - /// The address to call with the generated bytecode - pub address: Address, - /// The data to be passed as arguments to the contract function. - pub pushdata: Vec, - /// The offset in memory where the return data will be stored. - pub return_data_offset: usize, - /// The size of the return data. - pub return_data_size: usize, - /// The length of the call data. - pub call_data_length: usize, - /// The offset in memory where the call data will be stored. - pub call_data_offset: usize, - /// The amount of gas to be used for the contract call. - pub gas: u64, - /// The instructions to be executed after the contract call. - pub instructions_after_call: Bytecode, -} - -/// Set default parameters for MockCallBytecodeParams -impl Default for MockCallBytecodeParams { - fn default() -> Self { - MockCallBytecodeParams { - address: address!("0x0000000000000000000000000000000000000000"), - pushdata: Vec::new(), - return_data_offset: 0x00usize, - return_data_size: 0x00usize, - call_data_length: 0x00usize, - call_data_offset: 0x00usize, - gas: 0x1_0000u64, - instructions_after_call: Bytecode::default(), - } - } -} - -/// Generate mock EVM bytecode that performs a contract call -pub fn generate_mock_call_bytecode(params: MockCallBytecodeParams) -> Bytecode { - bytecode! { - .op_mstore( - 0u64, - Word::from_big_endian(¶ms.pushdata) - ) - .op_call( - params.gas, - params.address, - 0u64, - params.call_data_offset, - params.call_data_length, - params.return_data_size, - params.return_data_offset, - ) - .append(¶ms.instructions_after_call) - STOP - } -} diff --git a/taiko-mock/src/test_ctx.rs b/taiko-mock/src/test_ctx.rs deleted file mode 100644 index 6832c82e23..0000000000 --- a/taiko-mock/src/test_ctx.rs +++ /dev/null @@ -1,302 +0,0 @@ -//! Mock types and functions to generate Test enviroments for ZKEVM tests - -use crate::{ - account, eth, MockAccount, MockBlock, MockTransaction, GOLDEN_TOUCH, MOCK_CODES, - MOCK_TAIKO_L2_ADDRESS, MOCK_TAIKO_TREASURY_ADDRESS, -}; -use eth_types::{ - geth_types::{Account, BlockConstants, GethData}, - Block, Bytecode, Error, GethExecTrace, Transaction, Word, -}; -pub use external_tracer::LoggerConfig; -use external_tracer::{trace, TraceConfig}; -use helpers::*; -use itertools::Itertools; - -/// TestContext is a type that contains all the information from a block -/// required to build the circuit inputs. -/// -/// It is specifically used to generate Test cases with very precise information -/// details about any specific part of a block. That includes of course, its -/// transactions too and the accounts involved in all of them. -/// -/// The intended way to interact with the structure is through the fn `new` -/// which is designed to return a [`GethData`] which then can be used to query -/// any specific part of the logs generated by the transactions executed within -/// this context. -/// -/// ## Example -/// ```rust -/// use eth_types::evm_types::{stack::Stack, Gas, OpcodeId}; -/// use eth_types::{address, bytecode, geth_types::GethData, word, Bytecode, ToWord, Word}; -/// use lazy_static::lazy_static; -/// use mock::test_ctx::{helpers::*, TestContext}; -/// // code_a calls code -/// // jump to 0x10 which is outside the code (and also not marked with -/// // JUMPDEST) -/// let code = bytecode! { -/// PUSH1(0x10) -/// JUMP -/// STOP -/// }; -/// let code_a = bytecode! { -/// PUSH1(0x0) // retLength -/// PUSH1(0x0) // retOffset -/// PUSH1(0x0) // argsLength -/// PUSH1(0x0) // argsOffset -/// PUSH32(address!("0x000000000000000000000000000000000cafe001").to_word()) // addr -/// PUSH32(0x1_0000) // gas -/// STATICCALL -/// PUSH2(0xaa) -/// }; -/// let index = 8; // JUMP -/// -/// // Get the execution steps from the external tracer -/// let block: GethData = TestContext::<3, 2>::new( -/// None, -/// |accs| { -/// accs[0] -/// .address(address!("0x0000000000000000000000000000000000000000")) -/// .code(code_a); -/// accs[1].address(address!("0x000000000000000000000000000000000cafe001")).code(code); -/// accs[2] -/// .address(address!("0x000000000000000000000000000000000cafe002")) -/// .balance(Word::from(1u64 << 30)); -/// }, -/// |mut txs, accs| { -/// txs[0].to(accs[0].address).from(accs[2].address); -/// txs[1] -/// .to(accs[1].address) -/// .from(accs[2].address) -/// .nonce(1); -/// }, -/// |block, _tx| block.number(0xcafeu64), -/// ) -/// .unwrap() -/// .into(); -/// -/// // Now we can start generating the traces and items we need to inspect -/// // the behaviour of the generated env. -/// ``` -#[derive(Debug)] -pub struct TestContext { - /// chain id - pub chain_id: Word, - /// Account list - pub accounts: Vec, - /// history hashes contains most recent 256 block hashes in history, where - /// the lastest one is at history_hashes[history_hashes.len() - 1]. - pub history_hashes: Vec, - /// Block from geth - pub eth_block: eth_types::Block, - /// Execution Trace from geth - pub geth_traces: Vec, -} - -impl - From> for GethData -{ - fn from(ctx: TestContext) -> GethData { - GethData { - chain_id: ctx.chain_id, - history_hashes: ctx.history_hashes, - eth_block: ctx.eth_block, - geth_traces: ctx.geth_traces.to_vec(), - accounts: ctx.accounts, - } - } -} - -impl TestContext { - pub fn new_with_logger_config( - history_hashes: Option>, - acc_fns: FAcc, - func_tx: FTx, - func_block: Fb, - logger_config: LoggerConfig, - ) -> Result - where - FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), - Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, - FAcc: FnOnce([&mut MockAccount; NACC]), - { - let mut accounts: Vec = - vec![MockAccount::default(); NACC + if IS_ANCHOR { 2 } else { 0 }]; - if IS_ANCHOR { - // add the GOLDEN_TOUCH account in the first position - accounts[0].address(*GOLDEN_TOUCH); - // add the l2 contract account in the second position - accounts[1] - .address(*MOCK_TAIKO_L2_ADDRESS) - .code(MOCK_CODES[0].clone()); - } - let account_skipped = if IS_ANCHOR { 2 } else { 0 }; - // Build Accounts modifiers - let account_refs = accounts - .iter_mut() - .skip(account_skipped) - .collect_vec() - .try_into() - .expect("Mismatched len err"); - acc_fns(account_refs); - let accounts_cloned: [MockAccount; NACC] = accounts - .iter_mut() - .skip(account_skipped) - .map(|acc| acc.build()) - .collect_vec() - .try_into() - .expect("Mismatched acc len"); - - let mut transactions = - vec![MockTransaction::default(); NTX + if IS_ANCHOR { 1 } else { 0 }]; - // By default, set the TxIndex and the Nonce values of the multiple transactions - // of the context correlative so that any Ok test passes by default. - // If the user decides to override these values, they'll then be set to whatever - // inputs were provided by the user. - - if IS_ANCHOR { - // add the anchor transaction in the first position - transactions[0] = MockTransaction::new_anchor(); - } - let tx_skipped = if IS_ANCHOR { 1 } else { 0 }; - transactions - .iter_mut() - .enumerate() - .skip(tx_skipped) - .for_each(|(idx, tx)| { - let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); - tx.transaction_idx(idx).nonce(idx - 1); - }); - let tx_refs = transactions.iter_mut().skip(tx_skipped).collect(); - - // Build Tx modifiers. - func_tx(tx_refs, accounts_cloned); - let transactions: Vec = - transactions.iter_mut().map(|tx| tx.build()).collect(); - - // Build Block modifiers - let mut block = MockBlock::default(); - block.transactions.extend_from_slice(&transactions); - func_block(&mut block, transactions).build(); - - let chain_id = block.chain_id; - let block = Block::::from(block); - let accounts = accounts.iter().cloned().map(Account::from).collect_vec(); - - let geth_traces = gen_geth_traces( - chain_id, - block.clone(), - accounts.clone(), - history_hashes.clone(), - logger_config, - )?; - - Ok(Self { - chain_id, - accounts, - history_hashes: history_hashes.unwrap_or_default(), - eth_block: block, - geth_traces, - }) - } - - /// Create a new TestContext which starts with `NACC` default accounts and - /// `NTX` default transactions. Afterwards, we apply the `acc_fns` - /// function to the accounts, the `func_tx` to the transactions and - /// the `func_block` to the block, where each of these functions can - /// mutate their target using the builder pattern. Finally an - /// execution trace is generated of the resulting input block and state. - pub fn new( - history_hashes: Option>, - acc_fns: FAcc, - func_tx: FTx, - func_block: Fb, - ) -> Result - where - FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), - Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, - FAcc: FnOnce([&mut MockAccount; NACC]), - { - Self::new_with_logger_config( - history_hashes, - acc_fns, - func_tx, - func_block, - LoggerConfig::default(), - ) - } - - /// Returns a simple TestContext setup with a single tx executing the - /// bytecode passed as parameters. The balances of the 2 accounts and - /// addresses are the ones used in [`TestContext:: - /// account_0_code_account_1_no_code`]. Extra accounts, txs and/or block - /// configs are set as [`Default`]. - pub fn simple_ctx_with_bytecode( - bytecode: Bytecode, - ) -> Result, Error> { - TestContext::<2, 1, IS_ANCHOR>::new( - None, - account_0_code_account_1_no_code(bytecode), - tx_from_1_to_0, - |block, _txs| block, - ) - } -} - -/// Generates execution traces for the transactions included in the provided -/// Block -pub fn gen_geth_traces( - chain_id: Word, - block: Block, - accounts: Vec, - history_hashes: Option>, - logger_config: LoggerConfig, -) -> Result, Error> { - let trace_config = TraceConfig { - chain_id, - history_hashes: history_hashes.unwrap_or_default(), - block_constants: BlockConstants::try_from(&block)?, - accounts: accounts - .iter() - .map(|account| (account.address, account.clone())) - .collect(), - transactions: block - .transactions - .iter() - .map(eth_types::geth_types::Transaction::from) - .collect(), - logger_config, - taiko: true, - treasury: *MOCK_TAIKO_TREASURY_ADDRESS, - }; - let traces = trace(&trace_config)?; - Ok(traces) -} - -/// Collection of helper functions which contribute to specific rutines on the -/// builder pattern used to construct [`TestContext`]s. -pub mod helpers { - use super::*; - use crate::MOCK_ACCOUNTS; - - /// Generate a simple setup which adds balance to two default accounts from - /// [`static@MOCK_ACCOUNTS`]: - /// - 0x000000000000000000000000000000000cafe111 - /// - 0x000000000000000000000000000000000cafe222 - /// And injects the provided bytecode into the first one. - pub fn account_0_code_account_1_no_code(code: Bytecode) -> impl FnOnce([&mut MockAccount; 2]) { - |accs| { - accs[0] - .address(MOCK_ACCOUNTS[0]) - .balance(eth(10)) - .code(code); - accs[1].address(MOCK_ACCOUNTS[1]).balance(eth(10)); - } - } - - /// Generate a single transaction from the second account of the list to the - /// first one. - pub fn tx_from_1_to_0(mut txs: Vec<&mut MockTransaction>, accs: [MockAccount; 2]) { - txs[0].from(accs[1].address).to(accs[0].address); - } -} diff --git a/taiko-mock/src/transaction.rs b/taiko-mock/src/transaction.rs deleted file mode 100644 index 4b52f89a58..0000000000 --- a/taiko-mock/src/transaction.rs +++ /dev/null @@ -1,373 +0,0 @@ -//! Mock Transaction definition and builder related methods. - -use crate::MOCK_BASEFEE; - -use super::{ - GOLDEN_TOUCH, MOCK_ACCOUNTS, MOCK_ANCHOR_GAS_LIMIT, MOCK_ANCHOR_GAS_PRICE, - MOCK_ANCHOR_TX_VALUE, MOCK_CHAIN_ID, MOCK_GASFEECAP, MOCK_GASPRICE, MOCK_GASTIPCAP, - MOCK_TAIKO_L2_ADDRESS, -}; -use eth_types::{ - geth_types::Transaction as GethTransaction, word, AccessList, Address, Bytes, Hash, - Transaction, Word, U64, -}; -use ethers_core::{ - rand::{CryptoRng, RngCore}, - types::{Eip1559TransactionRequest, OtherFields}, -}; -use ethers_signers::{LocalWallet, Signer}; -use lazy_static::lazy_static; -use rand::SeedableRng; -use rand_chacha::ChaCha20Rng; - -lazy_static! { - /// Collection of correctly hashed and signed Transactions which can be used to test circuits or opcodes that have to check integrity of the Tx itself. - /// Some of the parameters of the Tx are hardcoded such as `nonce`, `value`, `gas_price` etc... - pub static ref CORRECT_MOCK_TXS: Vec = { - let mut rng = ChaCha20Rng::seed_from_u64(2u64); - - vec![MockTransaction::default() - .from(AddrOrWallet::random(&mut rng)) - .to(MOCK_ACCOUNTS[0]) - .nonce(0x103u64) - .value(word!("0x3e8")) - .gas_price(word!("0x4d2")) - .input(Bytes::from(b"hello")) - .build(), - MockTransaction::default() - .from(AddrOrWallet::random(&mut rng)) - .to(MOCK_ACCOUNTS[1]) - .nonce(0x104u64) - .value(word!("0x3e8")) - .gas_price(word!("0x4d2")) - .input(Bytes::from(b"hello")) - .build(), - MockTransaction::default() - .from(AddrOrWallet::random(&mut rng)) - .to(MOCK_ACCOUNTS[2]) - .nonce(0x105u64) - .value(word!("0x3e8")) - .gas_price(word!("0x4d2")) - .input(Bytes::from(b"hello")) - .build(), - MockTransaction::default() - .from(AddrOrWallet::random(&mut rng)) - .to(MOCK_ACCOUNTS[0]) - .nonce(0x106u64) - .value(word!("0x3e8")) - .gas_price(word!("0x4d2")) - .input(Bytes::from(b"hello")) - .build(),] - }; -} - -#[derive(Debug, Clone)] -pub enum AddrOrWallet { - Addr(Address), - Wallet(LocalWallet), -} - -impl Default for AddrOrWallet { - fn default() -> Self { - AddrOrWallet::Addr(Address::default()) - } -} - -impl From
for AddrOrWallet { - fn from(addr: Address) -> Self { - AddrOrWallet::Addr(addr) - } -} - -impl From for AddrOrWallet { - fn from(wallet: LocalWallet) -> Self { - AddrOrWallet::Wallet(wallet) - } -} - -impl AddrOrWallet { - /// Generates a random Wallet from a random secpk256 keypair - pub fn random(rng: &mut R) -> Self { - AddrOrWallet::Wallet(LocalWallet::new(rng)) - } -} - -impl AddrOrWallet { - /// Returns the underlying address associated to the `AddrOrWallet` enum. - pub fn address(&self) -> Address { - match self { - Self::Addr(addr) => *addr, - Self::Wallet(wallet) => wallet.address(), - } - } - - /// Returns true if the enum variant of `self` corresponds to a - /// [`LocalWallet`] structure and not simply and [`Address`]. - const fn is_wallet(&self) -> bool { - matches!(self, Self::Wallet(_)) - } - - /// Returns the underlying wallet stored in the enum. - /// # Panics - /// This function will panic if the enum does not contain a [`LocalWallet`] - /// and instead contains the [`Address`] variant. - pub fn as_wallet(&self) -> LocalWallet { - match self { - Self::Wallet(wallet) => wallet.to_owned(), - _ => panic!("Broken AddrOrWallet invariant"), - } - } -} - -#[derive(Debug, Clone)] -/// Mock structure which represents a Transaction and can be used for tests. -/// It contains all the builder-pattern methods required to be able to specify -/// any of it's details. -pub struct MockTransaction { - pub hash: Option, - pub nonce: u64, - pub block_hash: Hash, - pub block_number: U64, - pub transaction_index: U64, - pub from: AddrOrWallet, - pub to: Option, - pub value: Word, - // gas_price == min(max_fee_per_gas, max_priority_fee_per_gas + base_fee_per_gas) - pub gas_price: Word, - pub gas: Word, - pub input: Bytes, - pub v: Option, - pub r: Option, - pub s: Option, - pub transaction_type: U64, - pub access_list: AccessList, - pub max_priority_fee_per_gas: Word, - pub max_fee_per_gas: Word, - pub chain_id: Word, -} - -impl Default for MockTransaction { - fn default() -> Self { - MockTransaction { - hash: None, - nonce: 0, - block_hash: Hash::zero(), - block_number: U64::zero(), - transaction_index: U64::zero(), - from: AddrOrWallet::Addr(MOCK_ACCOUNTS[0]), - to: None, - value: Word::zero(), - gas_price: *MOCK_GASPRICE, - gas: Word::from(1_000_000u64), - input: Bytes::default(), - v: None, - r: None, - s: None, - transaction_type: U64::zero(), - access_list: AccessList::default(), - max_priority_fee_per_gas: *MOCK_GASTIPCAP, - max_fee_per_gas: *MOCK_GASFEECAP, - chain_id: *MOCK_CHAIN_ID, - } - } -} - -impl From for Transaction { - fn from(mock: MockTransaction) -> Self { - Transaction { - hash: mock.hash.unwrap_or_default(), - nonce: mock.nonce.into(), - block_hash: Some(mock.block_hash), - block_number: Some(mock.block_number), - transaction_index: Some(mock.transaction_index), - from: mock.from.address(), - to: mock.to.map(|addr| addr.address()), - value: mock.value, - gas_price: Some(mock.gas_price), - gas: mock.gas, - input: mock.input, - v: mock.v.unwrap_or_default(), - r: mock.r.unwrap_or_default(), - s: mock.s.unwrap_or_default(), - transaction_type: Some(mock.transaction_type), - access_list: Some(mock.access_list), - max_priority_fee_per_gas: Some(mock.max_priority_fee_per_gas), - max_fee_per_gas: Some(mock.max_fee_per_gas), - chain_id: Some(mock.chain_id), - other: OtherFields::default(), - } - } -} - -impl From for GethTransaction { - fn from(mock: MockTransaction) -> Self { - GethTransaction::from(&Transaction::from(mock)) - } -} - -impl MockTransaction { - /// create a mock anchor transaction - pub fn new_anchor() -> Self { - let mut tx = MockTransaction::default(); - tx.from(*GOLDEN_TOUCH); - tx.to(*MOCK_TAIKO_L2_ADDRESS); - tx.gas(*MOCK_ANCHOR_GAS_LIMIT) - .gas_price(*MOCK_ANCHOR_GAS_PRICE) - .max_priority_fee_per_gas(Word::zero()) - .max_fee_per_gas(*MOCK_BASEFEE) - .from(*GOLDEN_TOUCH) - .to(*MOCK_TAIKO_L2_ADDRESS) - .input(crate::anchor::anchor_call()) - .nonce(0) - .value(*MOCK_ANCHOR_TX_VALUE); - crate::anchor::sign(&mut tx); - tx - } -} - -impl MockTransaction { - /// Tx Hash computed based on the fields of the Tx by - /// default unless `Some(hash)` is specified on build process. - pub fn hash(&mut self, hash: Hash) -> &mut Self { - self.hash = Some(hash); - self - } - - /// Set nonce field for the MockTransaction. - pub fn nonce(&mut self, nonce: u64) -> &mut Self { - self.nonce = nonce; - self - } - - /// Set block_hash field for the MockTransaction. - pub fn block_hash(&mut self, block_hash: Hash) -> &mut Self { - self.block_hash = block_hash; - self - } - - /// Set block_number field for the MockTransaction. - pub fn block_number(&mut self, block_number: u64) -> &mut Self { - self.block_number = U64::from(block_number); - self - } - - /// Set transaction_idx field for the MockTransaction. - pub fn transaction_idx(&mut self, transaction_idx: u64) -> &mut Self { - self.transaction_index = U64::from(transaction_idx); - self - } - - /// Set from field for the MockTransaction. - pub fn from>(&mut self, from: T) -> &mut Self { - self.from = from.into(); - self - } - - /// Set to field for the MockTransaction. - pub fn to>(&mut self, to: T) -> &mut Self { - self.to = Some(to.into()); - self - } - - /// Set value field for the MockTransaction. - pub fn value(&mut self, value: Word) -> &mut Self { - self.value = value; - self - } - - /// Set gas_price field for the MockTransaction. - pub fn gas_price(&mut self, gas_price: Word) -> &mut Self { - self.gas_price = gas_price; - self - } - - /// Set gas field for the MockTransaction. - pub fn gas(&mut self, gas: Word) -> &mut Self { - self.gas = gas; - self - } - - /// Set input field for the MockTransaction. - pub fn input(&mut self, input: Bytes) -> &mut Self { - self.input = input; - self - } - - /// Set sig_data field for the MockTransaction. - pub fn sig_data(&mut self, data: (u64, Word, Word)) -> &mut Self { - self.v = Some(U64::from(data.0)); - self.r = Some(data.1); - self.s = Some(data.2); - self - } - - /// Set transaction_type field for the MockTransaction. - pub fn transaction_type(&mut self, transaction_type: u64) -> &mut Self { - self.transaction_type = U64::from(transaction_type); - self - } - - /// Set access_list field for the MockTransaction. - pub fn access_list(&mut self, access_list: AccessList) -> &mut Self { - self.access_list = access_list; - self - } - - /// Set max_priority_fee_per_gas field for the MockTransaction. - pub fn max_priority_fee_per_gas(&mut self, max_priority_fee_per_gas: Word) -> &mut Self { - self.max_priority_fee_per_gas = max_priority_fee_per_gas; - self - } - - /// Set max_fee_per_gas field for the MockTransaction. - pub fn max_fee_per_gas(&mut self, max_fee_per_gas: Word) -> &mut Self { - self.max_fee_per_gas = max_fee_per_gas; - self - } - - /// Set chain_id field for the MockTransaction. - pub(crate) fn chain_id(&mut self, chain_id: Word) -> &mut Self { - self.chain_id = chain_id; - self - } - - /// Consumes the mutable ref to the MockTransaction returning the structure - /// by value. - pub fn build(&mut self) -> Self { - let tx = Eip1559TransactionRequest::new() - .from(self.from.address()) - .to(self.to.clone().unwrap_or_default().address()) - .nonce(self.nonce) - .value(self.value) - .data(self.input.clone()) - .gas(self.gas) - .max_priority_fee_per_gas(self.max_priority_fee_per_gas) - .max_fee_per_gas(self.max_fee_per_gas) - .chain_id(self.chain_id.low_u64()); - - match (self.v, self.r, self.s) { - (None, None, None) => { - // Compute sig params and set them in case we have a wallet as `from` attr. - if self.from.is_wallet() && self.hash.is_none() { - let sig = self - .from - .as_wallet() - .with_chain_id(self.chain_id.low_u64()) - .sign_transaction_sync(&tx.into()); - // Set sig parameters - self.sig_data((sig.v, sig.r, sig.s)); - } - } - (Some(_), Some(_), Some(_)) => (), - _ => panic!("Either all or none of the SigData params have to be set"), - } - - // Compute tx hash in case is not already set - if self.hash.is_none() { - let tmp_tx = Transaction::from(self.to_owned()); - self.hash(tmp_tx.hash()); - } - - self.to_owned() - } -} diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index 143cffe5a1..6eee0266c5 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -18,7 +18,6 @@ gadgets = { path = "../gadgets" } ethers-core = "=2.0.0" ethers-signers = { version = "=2.0.0", optional = true } mock = { path = "../mock", optional = true } -taiko-mock = { path = "../taiko-mock", optional = true } strum = "0.24" strum_macros = "0.24" rand_xorshift = "0.3" @@ -47,14 +46,13 @@ ethers-signers = "=2.0.0" hex = "0.4.3" itertools = "0.10.1" mock = { path = "../mock" } -taiko-mock = { path = "../taiko-mock" } pretty_assertions = "1.0.0" serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.78" [features] default = [] -test = ["ethers-signers", "mock", "taiko-mock", "bus-mapping/test"] +test = ["ethers-signers", "mock", "bus-mapping/test"] test-circuits = [] warn-unimplemented = ["eth-types/warn-unimplemented"] stats = ["warn-unimplemented", "dep:cli-table"] diff --git a/zkevm-circuits/src/anchor_tx_circuit.rs b/zkevm-circuits/src/anchor_tx_circuit.rs index 55c995d453..bd21d67fce 100644 --- a/zkevm-circuits/src/anchor_tx_circuit.rs +++ b/zkevm-circuits/src/anchor_tx_circuit.rs @@ -7,8 +7,6 @@ pub use dev::TestAnchorTxCircuit; pub(crate) mod sign_verify; #[cfg(any(feature = "test", test))] mod test; -#[cfg(any(feature = "test", test))] -pub(crate) use test::{add_anchor_accounts, add_anchor_tx, sign_tx}; use crate::{ evm_circuit::util::constraint_builder::{BaseConstraintBuilder, ConstrainBuilderCommon}, diff --git a/zkevm-circuits/src/anchor_tx_circuit/test.rs b/zkevm-circuits/src/anchor_tx_circuit/test.rs index 585907fa84..287425323b 100644 --- a/zkevm-circuits/src/anchor_tx_circuit/test.rs +++ b/zkevm-circuits/src/anchor_tx_circuit/test.rs @@ -15,7 +15,7 @@ use bus_mapping::{ }; use eth_types::{ address, bytecode, - geth_types::{GethData, Transaction}, + geth_types::GethData, sign_types::{biguint_to_32bytes_le, ct_option_ok_or, sign, SignData, SECP256K1_Q}, word, Address, Field, ToBigEndian, ToLittleEndian, ToWord, Word, H256, U256, }; @@ -47,56 +47,6 @@ use num_bigint::BigUint; use once_cell::sync::Lazy; use sha3::{Digest, Keccak256}; -pub(crate) fn anchor_sign( - anchor_tx: &Transaction, - chain_id: u64, -) -> Result { - // msg = rlp([nonce, gasPrice, gas, to, value, data, sig_v, r, s]) - let req: TransactionRequest = anchor_tx.into(); - let msg = req.chain_id(chain_id).rlp(); - let msg_hash: [u8; 32] = Keccak256::digest(&msg) - .as_slice() - .to_vec() - .try_into() - .expect("hash length isn't 32 bytes"); - // msg_hash = msg_hash % q - let msg_hash = BigUint::from_bytes_be(msg_hash.as_slice()); - let msg_hash = msg_hash.mod_floor(&*SECP256K1_Q); - let msg_hash_le = biguint_to_32bytes_le(msg_hash); - let msg_hash = ct_option_ok_or( - secp256k1::Fq::from_repr(msg_hash_le), - libsecp256k1::Error::InvalidMessage, - )?; - let k1 = secp256k1::Fq::ONE; - let sk = ct_option_ok_or( - secp256k1::Fq::from_repr(GOLDEN_TOUCH_PRIVATEKEY.to_le_bytes()), - libsecp256k1::Error::InvalidSecretKey, - )?; - let generator = Secp256k1Affine::generator(); - let pk = generator * sk; - let pk = pk.to_affine(); - let (mut sig_r, mut sig_s) = sign(k1, sk, msg_hash); - let gx1 = ct_option_ok_or( - secp256k1::Fq::from_repr(GX1.to_le_bytes()), - libsecp256k1::Error::InvalidSignature, - )?; - assert!(sig_r == gx1); - if sig_s == secp256k1::Fq::ZERO { - let k2 = secp256k1::Fq::ONE + secp256k1::Fq::ONE; - (sig_r, sig_s) = sign(k2, sk, msg_hash); - let gx2 = ct_option_ok_or( - secp256k1::Fq::from_repr(GX2.to_le_bytes()), - libsecp256k1::Error::InvalidSignature, - )?; - assert!(sig_r == gx2); - } - Ok(SignData { - signature: (sig_r, sig_s), - pk, - msg_hash, - }) -} - fn run(block: &Block, sign_hash: Option) -> Result<(), Vec> { let k = log2_ceil( AnchorTxCircuit::::unusable_rows() @@ -113,52 +63,10 @@ fn run(block: &Block, sign_hash: Option) -> Result<(), Vec( - accs: [&mut MockAccount; NACC], - acc_fns: FAcc, - protocol_instance: &ProtocolInstance, -) where - FAcc: FnOnce([&mut MockAccount; NACC]), -{ - let code = bytecode! { - PUSH1(0x01) // value - PUSH1(0x02) // key - SSTORE - - PUSH3(0xbb) - }; - accs[0] - .address(*GOLDEN_TOUCH_ADDRESS) - .balance(Word::from(1u64 << 20)); - accs[1].address(protocol_instance.l2_contract).code(code); - acc_fns(accs); -} - -pub(crate) fn add_anchor_tx( - mut txs: Vec<&mut MockTransaction>, - accs: [MockAccount; NACC], - func_tx: FTx, - extra_func_tx: fn(&mut MockTransaction), - protocol_instance: &ProtocolInstance, -) where - FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), -{ - txs[0] - .gas(protocol_instance.anchor_gas_limit.to_word()) - .from(*GOLDEN_TOUCH_ADDRESS) - .to(protocol_instance.l2_contract) - .input(protocol_instance.anchor_call()) - .nonce(0) - .value(ANCHOR_TX_VALUE.to_word()); - extra_func_tx(txs[0]); - func_tx(txs, accs); -} - fn gen_block( max_txs: usize, max_calldata: usize, protocol_instance: ProtocolInstance, - extra_func_tx: fn(&mut MockTransaction), ) -> Block { let chain_id = (*MOCK_CHAIN_ID).as_u64(); let mut wallets = HashMap::new(); @@ -170,14 +78,10 @@ fn gen_block( wallets.insert(*GOLDEN_TOUCH_ADDRESS, wallet); - let block: GethData = TestContext::<2, NUM_TXS>::new( + let block: GethData = TestContext::<0, NUM_TXS>::new_with_taiko( None, - |accs| { - add_anchor_accounts(accs, |_| {}, &protocol_instance); - }, - |txs, accs| { - add_anchor_tx(txs, accs, |_, _| {}, extra_func_tx, &protocol_instance); - }, + |_accs| {}, + |_txs, _accs| {}, |block, _tx| block, ) .unwrap() @@ -197,16 +101,7 @@ fn gen_block( block } -pub(crate) fn sign_tx(tx: &mut MockTransaction) { - let chain_id = (*MOCK_CHAIN_ID).as_u64(); - let _tx: Transaction = tx.to_owned().into(); - let sig_data = anchor_sign(&_tx, chain_id).unwrap(); - let sig_r = U256::from_little_endian(sig_data.signature.0.to_bytes().as_slice()); - let sig_s = U256::from_little_endian(sig_data.signature.1.to_bytes().as_slice()); - tx.sig_data((2712, sig_r, sig_s)); -} - -fn sign_tx_r_is_gx2(tx: &mut MockTransaction) { +fn sign_tx_r_is_gx2(tx: &mut Transaction) { let msg_hash = *N - *GX1_MUL_PRIVATEKEY; let msg_hash = ct_option_ok_or( secp256k1::Fq::from_repr(msg_hash.to_le_bytes()), @@ -222,7 +117,9 @@ fn sign_tx_r_is_gx2(tx: &mut MockTransaction) { let (sig_r, sig_s) = sign(k2, sk, msg_hash); let sig_r = U256::from_little_endian(sig_r.to_bytes().as_slice()); let sig_s = U256::from_little_endian(sig_s.to_bytes().as_slice()); - tx.sig_data((2712, sig_r, sig_s)); + tx.v = 2712; + tx.r = sig_r; + tx.s = sig_s; } #[test] @@ -235,22 +132,17 @@ fn anchor_tx_circuit_unusable_rows() { #[test] fn anchor_test() { - let protocol_instance = ProtocolInstance { - anchor_gas_limit: 150000, - ..Default::default() - }; - let block = gen_block::<1>(2, 200, protocol_instance, sign_tx); + let protocol_instance = Default::default(); + let block = gen_block::<0>(2, 200, protocol_instance); assert_eq!(run::(&block, None), Ok(())); } #[test] fn anchor_test_when_sign_r_is_gx2() { - let protocol_instance = ProtocolInstance { - anchor_gas_limit: 150000, - ..Default::default() - }; + let protocol_instance = Default::default(); let msg_hash = *N - *GX1_MUL_PRIVATEKEY; let msg_hash = H256::from(msg_hash.to_le_bytes()); - let block = gen_block::<1>(2, 200, protocol_instance, sign_tx_r_is_gx2); + let mut block = gen_block::<0>(2, 200, protocol_instance); + sign_tx_r_is_gx2(&mut block.txs[0]); assert_eq!(run::(&block, Some(msg_hash)), Ok(())); } diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 6b4e46fba8..96cf2e58b4 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -564,11 +564,11 @@ impl ExecutionGadget for BeginTxGadget { mod test { use std::vec; - use crate::{evm_circuit::test::rand_bytes, taiko_test_util::CircuitTestBuilder}; + use crate::{evm_circuit::test::rand_bytes, test_util::CircuitTestBuilder}; use bus_mapping::evm::OpcodeId; use eth_types::{self, bytecode, evm_types::GasCost, word, Bytecode, Word}; - use taiko_mock::{eth, gwei, MockTransaction, TestContext, MOCK_ACCOUNTS}; + use mock::{eth, gwei, MockTransaction, TestContext, MOCK_ACCOUNTS}; fn gas(call_data: &[u8]) -> Word { Word::from( @@ -599,7 +599,7 @@ mod test { fn test_ok(tx: eth_types::Transaction, code: Option) { // Get the execution steps from the external tracer - let ctx = TestContext::<2, 1, true>::new( + let ctx = TestContext::<2, 1>::new_with_taiko( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(10)); @@ -676,7 +676,7 @@ mod test { STOP }; - let ctx = TestContext::<2, 1, true>::new( + let ctx = TestContext::<2, 1>::new_with_taiko( None, |accs| { accs[0].address(to).balance(eth(1)).code(code); @@ -719,7 +719,7 @@ mod test { #[test] fn begin_tx_no_code() { - let ctx = TestContext::<2, 1, true>::new( + let ctx = TestContext::<2, 1>::new_with_taiko( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); @@ -742,7 +742,7 @@ mod test { #[test] fn begin_tx_no_account() { - let ctx = TestContext::<1, 1, true>::new( + let ctx = TestContext::<1, 1>::new_with_taiko( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); @@ -773,7 +773,7 @@ mod test { PUSH1(0) RETURN }; - let ctx = TestContext::<1, 1, true>::new( + let ctx = TestContext::<1, 1>::new_with_taiko( None, |accs| { accs[0] diff --git a/zkevm-circuits/src/lib.rs b/zkevm-circuits/src/lib.rs index 8d750e94c6..62c796821d 100644 --- a/zkevm-circuits/src/lib.rs +++ b/zkevm-circuits/src/lib.rs @@ -33,9 +33,6 @@ pub mod taiko_super_circuit; #[cfg(any(feature = "test", test))] pub mod test_util; -#[cfg(any(feature = "test", test))] -pub mod taiko_test_util; - pub mod anchor_tx_circuit; pub mod tx_circuit; pub mod util; diff --git a/zkevm-circuits/src/taiko_super_circuit/test.rs b/zkevm-circuits/src/taiko_super_circuit/test.rs index 395f9ed4eb..3807bb0ccd 100644 --- a/zkevm-circuits/src/taiko_super_circuit/test.rs +++ b/zkevm-circuits/src/taiko_super_circuit/test.rs @@ -1,6 +1,5 @@ #![allow(unused_imports)] pub use super::*; -use crate::anchor_tx_circuit::{add_anchor_accounts, add_anchor_tx, sign_tx}; use bus_mapping::circuit_input_builder::MetaHash; use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; @@ -39,7 +38,7 @@ fn test_super_circuit( } /// build a block with anchor tx -pub fn block_1tx(protocol_instance: &ProtocolInstance) -> GethData { +pub fn block_1tx() -> GethData { let mut rng = ChaCha20Rng::seed_from_u64(2); let chain_id = (*MOCK_CHAIN_ID).as_u64(); @@ -54,39 +53,25 @@ pub fn block_1tx(protocol_instance: &ProtocolInstance) -> GethData { let addr_a = wallet_a.address(); let addr_b = address!("0x000000000000000000000000000000000000BBBB"); - let mut block: GethData = TestContext::<4, 2>::new( + let mut block: GethData = TestContext::<2, 1>::new_with_taiko( None, |accs| { - add_anchor_accounts( - accs, - |accs| { - accs[2] - .address(addr_b) - .balance(Word::from(1u64 << 20)) - .code(bytecode); - accs[3].address(addr_a).balance(Word::from(1u64 << 20)); - }, - protocol_instance, - ); + accs[0] + .address(addr_b) + .balance(Word::from(1u64 << 20)) + .code(bytecode); + accs[1].address(addr_a).balance(Word::from(1u64 << 20)); }, - |txs, accs| { - add_anchor_tx( - txs, - accs, - |mut txs, accs| { - txs[1] - .from(accs[3].address) - .to(accs[2].address) - .nonce(0) - .gas(Word::from(1_000_000u64)); - let geth_tx: eth_types::Transaction = txs[1].clone().into(); - let req: ethers_core::types::TransactionRequest = (&geth_tx).into(); - let sig = wallet_a.sign_transaction_sync(&req.chain_id(chain_id).into()); - txs[1].sig_data((sig.v, sig.r, sig.s)); - }, - sign_tx, - protocol_instance, - ); + |mut txs, accs| { + txs[0] + .from(accs[1].address) + .to(accs[0].address) + .nonce(0) + .gas(Word::from(1_000_000u64)); + let geth_tx: eth_types::Transaction = txs[0].clone().into(); + let req: ethers_core::types::TransactionRequest = (&geth_tx).into(); + let sig = wallet_a.sign_transaction_sync(&req.chain_id(chain_id).into()); + txs[0].sig_data((sig.v, sig.r, sig.s)); }, |block, _tx| block.number(0xcafeu64), ) @@ -96,7 +81,7 @@ pub fn block_1tx(protocol_instance: &ProtocolInstance) -> GethData { block } -fn block_2tx(protocol_instance: &ProtocolInstance) -> GethData { +fn block_2tx() -> GethData { let mut rng = ChaCha20Rng::seed_from_u64(2); let chain_id = (*MOCK_CHAIN_ID).as_u64(); @@ -111,48 +96,34 @@ fn block_2tx(protocol_instance: &ProtocolInstance) -> GethData { let addr_a = wallet_a.address(); let addr_b = address!("0x000000000000000000000000000000000000BBBB"); - let mut block: GethData = TestContext::<4, 3>::new( + let mut block: GethData = TestContext::<2, 2>::new( None, |accs| { - add_anchor_accounts( - accs, - |accs| { - accs[2] - .address(addr_b) - .balance(Word::from(1u64 << 20)) - .code(bytecode); - accs[3].address(addr_a).balance(Word::from(1u64 << 20)); - }, - protocol_instance, - ); + accs[0] + .address(addr_b) + .balance(Word::from(1u64 << 20)) + .code(bytecode); + accs[1].address(addr_a).balance(Word::from(1u64 << 20)); }, - |txs, accs| { - add_anchor_tx( - txs, - accs, - |mut txs, accs| { - txs[1] - .from(accs[3].address) - .to(accs[2].address) - .nonce(0) - .gas(Word::from(1_000_000u64)); - let geth_tx: eth_types::Transaction = txs[1].clone().into(); - let req: ethers_core::types::TransactionRequest = (&geth_tx).into(); - let sig = wallet_a.sign_transaction_sync(&req.chain_id(chain_id).into()); - txs[1].sig_data((sig.v, sig.r, sig.s)); - txs[2] - .from(accs[3].address) - .to(accs[2].address) - .nonce(1) - .gas(Word::from(1_000_000u64)); - let geth_tx: eth_types::Transaction = txs[2].clone().into(); - let req: ethers_core::types::TransactionRequest = (&geth_tx).into(); - let sig = wallet_a.sign_transaction_sync(&req.chain_id(chain_id).into()); - txs[2].sig_data((sig.v, sig.r, sig.s)); - }, - sign_tx, - protocol_instance, - ); + |mut txs, accs| { + txs[0] + .from(accs[1].address) + .to(accs[0].address) + .nonce(0) + .gas(Word::from(1_000_000u64)); + let geth_tx: eth_types::Transaction = txs[0].clone().into(); + let req: ethers_core::types::TransactionRequest = (&geth_tx).into(); + let sig = wallet_a.sign_transaction_sync(&req.chain_id(chain_id).into()); + txs[0].sig_data((sig.v, sig.r, sig.s)); + txs[1] + .from(accs[1].address) + .to(accs[0].address) + .nonce(1) + .gas(Word::from(1_000_000u64)); + let geth_tx: eth_types::Transaction = txs[1].clone().into(); + let req: ethers_core::types::TransactionRequest = (&geth_tx).into(); + let sig = wallet_a.sign_transaction_sync(&req.chain_id(chain_id).into()); + txs[1].sig_data((sig.v, sig.r, sig.s)); }, |block, _tx| block.number(0xcafeu64), ) @@ -186,7 +157,7 @@ fn serial_test_super_circuit_1tx_1max_tx() { parent_gas_used: 2000, ..Default::default() }; - let mut block = block_1tx(&protocol_instance); + let mut block = block_1tx(); let circuits_params = CircuitsParams { max_txs: 2, max_calldata: 200, @@ -209,7 +180,7 @@ fn taiko_serial_test_super_circuit_1tx_3max_tx() { anchor_gas_limit: 150000, ..Default::default() }; - let block = block_1tx(&protocol_instance); + let block = block_1tx(); let circuits_params = CircuitsParams { max_txs: 3, max_calldata: 200, @@ -229,7 +200,7 @@ fn taiko_serial_test_super_circuit_2tx_3max_tx() { anchor_gas_limit: 150000, ..Default::default() }; - let block = block_2tx(&protocol_instance); + let block = block_2tx(); let circuits_params = CircuitsParams { max_txs: 3, max_calldata: 200, diff --git a/zkevm-circuits/src/taiko_test_util.rs b/zkevm-circuits/src/taiko_test_util.rs deleted file mode 100644 index 8e00536389..0000000000 --- a/zkevm-circuits/src/taiko_test_util.rs +++ /dev/null @@ -1,239 +0,0 @@ -//! Testing utilities - -use crate::{ - evm_circuit::{cached::EvmCircuitCached, EvmCircuit}, - state_circuit::StateCircuit, - util::SubCircuit, - witness::{Block, Rw}, -}; -use bus_mapping::{circuit_input_builder::CircuitsParams, mock::BlockData}; -use eth_types::geth_types::GethData; -use std::cmp; - -use crate::util::log2_ceil; -use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; -use taiko_mock::TestContext; - -const NUM_BLINDING_ROWS: usize = 64; - -#[allow(clippy::type_complexity)] -/// Struct used to easily generate tests for EVM &| State circuits being able to -/// customize all of the steps involved in the testing itself. -/// -/// By default, the tests run through `prover.assert_satisfied_par()` but the -/// builder pattern provides functions that allow to pass different functions -/// that the prover should execute when verifying the CTB correctness. -/// -/// The CTB also includes a mechanism to recieve calls that will modify the -/// block produced from the [`TestContext`] and apply them before starting to -/// compute the proof. -/// -/// ## Example: -/// ```rust, no_run -/// use eth_types::geth_types::Account; -/// use eth_types::{address, bytecode, Address, Bytecode, ToWord, Word, U256, word}; -/// use mock::{TestContext, MOCK_ACCOUNTS, gwei, eth}; -/// use zkevm_circuits::test_util::CircuitTestBuilder; -/// let code = bytecode! { -/// // [ADDRESS, STOP] -/// PUSH32(word!(" -/// 3000000000000000000000000000000000000000000000000000000000000000")) -/// PUSH1(0) -/// MSTORE -/// -/// PUSH1(2) -/// PUSH1(0) -/// RETURN -/// }; -/// let ctx = TestContext::<1, 1>::new( -/// None, -/// |accs| { -/// accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); -/// }, -/// |mut txs, _accs| { -/// txs[0] -/// .from(MOCK_ACCOUNTS[0]) -/// .gas_price(gwei(2)) -/// .gas(Word::from(0x10000)) -/// .value(eth(2)) -/// .input(code.into()); -/// }, -/// |block, _tx| block.number(0xcafeu64), -/// ) -/// .unwrap(); -/// -/// CircuitTestBuilder::new_from_test_ctx(ctx) -/// .block_modifier(Box::new(|block| block.circuits_params.max_evm_rows = (1 << 18) - 100)) -/// .state_checks(Box::new(|prover, evm_rows, lookup_rows| assert!(prover.verify_at_rows_par(evm_rows.iter().cloned(), lookup_rows.iter().cloned()).is_err()))) -/// .run(); -/// ``` -pub struct CircuitTestBuilder { - test_ctx: Option>, - circuits_params: Option, - block: Option>, - evm_checks: Box, &Vec, &Vec)>, - state_checks: Box, &Vec, &Vec)>, - block_modifiers: Vec)>>, -} - -impl CircuitTestBuilder { - /// Generates an empty/set to default `CircuitTestBuilder`. - fn empty() -> Self { - CircuitTestBuilder { - test_ctx: None, - circuits_params: Some(CircuitsParams { - max_txs: 2, - ..Default::default() - }), - block: None, - evm_checks: Box::new(|prover, gate_rows, lookup_rows| { - prover.assert_satisfied_at_rows_par( - gate_rows.iter().cloned(), - lookup_rows.iter().cloned(), - ) - }), - state_checks: Box::new(|prover, gate_rows, lookup_rows| { - prover.assert_satisfied_at_rows_par( - gate_rows.iter().cloned(), - lookup_rows.iter().cloned(), - ) - }), - block_modifiers: vec![], - } - } - - /// Generates a CTBC from a [`TestContext`] passed with all the other fields - /// set to [`Default`]. - pub fn new_from_test_ctx(ctx: TestContext) -> Self { - Self::empty().test_ctx(ctx) - } - - /// Generates a CTBC from a [`Block`] passed with all the other fields - /// set to [`Default`]. - pub fn new_from_block(block: Block) -> Self { - Self::empty().block(block) - } - - /// Allows to produce a [`TestContext`] which will serve as the generator of - /// the Block. - pub fn test_ctx(mut self, ctx: TestContext) -> Self { - self.test_ctx = Some(ctx); - self - } - - /// Allows to pass a non-default [`CircuitsParams`] to the builder. - /// This means that we can increase for example, the `max_rws` or `max_txs`. - pub fn params(mut self, params: CircuitsParams) -> Self { - assert!( - self.block.is_none(), - "circuit_params already provided in the block" - ); - self.circuits_params = Some(params); - self - } - - /// Allows to pass a [`Block`] already built to the constructor. - pub fn block(mut self, block: Block) -> Self { - self.block = Some(block); - self - } - - #[allow(clippy::type_complexity)] - /// Allows to provide checks different than the default ones for the State - /// Circuit verification. - pub fn state_checks( - mut self, - state_checks: Box, &Vec, &Vec)>, - ) -> Self { - self.state_checks = state_checks; - self - } - - #[allow(clippy::type_complexity)] - /// Allows to provide checks different than the default ones for the EVM - /// Circuit verification. - pub fn evm_checks( - mut self, - evm_checks: Box, &Vec, &Vec)>, - ) -> Self { - self.evm_checks = evm_checks; - self - } - - #[allow(clippy::type_complexity)] - /// Allows to provide modifier functions for the [`Block`] that will be - /// generated within this builder. - /// - /// That removes the need in a lot of tests to build the block outside of - /// the builder because they need to modify something particular. - pub fn block_modifier(mut self, modifier: Box)>) -> Self { - self.block_modifiers.push(modifier); - self - } -} - -impl CircuitTestBuilder { - /// Triggers the `CircuitTestBuilder` to convert the [`TestContext`] if any, - /// into a [`Block`] and apply the default or provided block_modifiers or - /// circuit checks to the provers generated for the State and EVM circuits. - pub fn run(self) { - let params = if let Some(block) = self.block.as_ref() { - block.circuits_params - } else { - self.circuits_params.unwrap_or_default() - }; - - let block: Block = if self.block.is_some() { - self.block.unwrap() - } else if self.test_ctx.is_some() { - let block: GethData = self.test_ctx.unwrap().into(); - let mut builder = BlockData::new_from_geth_data_with_params(block.clone(), params) - .new_circuit_input_builder(); - builder - .handle_block(&block.eth_block, &block.geth_traces) - .unwrap(); - // Build a witness block from trace result. - let mut block = - crate::witness::block_convert(&builder.block, &builder.code_db).unwrap(); - - for modifier_fn in self.block_modifiers { - modifier_fn.as_ref()(&mut block); - } - block - } else { - panic!("No attribute to build a block was passed to the CircuitTestBuilder") - }; - - // Run evm circuit test - { - let k = block.get_test_degree(); - - let (active_gate_rows, active_lookup_rows) = EvmCircuit::::get_active_rows(&block); - - let circuit = EvmCircuitCached::get_test_cicuit_from_block(block.clone()); - let prover = MockProver::::run(k, &circuit, vec![]).unwrap(); - - self.evm_checks.as_ref()(prover, &active_gate_rows, &active_lookup_rows) - } - - // Run state circuit test - // TODO: use randomness as one of the circuit public input, since randomness in - // state circuit and evm circuit must be same - { - let rows_needed = StateCircuit::::min_num_rows_block(&block).1; - let k = cmp::max(log2_ceil(rows_needed + NUM_BLINDING_ROWS), 18); - let state_circuit = StateCircuit::::new(block.rws, params.max_rws); - let instance = state_circuit.instance(); - let prover = MockProver::::run(k, &state_circuit, instance).unwrap(); - // Skip verification of Start rows to accelerate testing - let non_start_rows_len = state_circuit - .rows - .iter() - .filter(|rw| !matches!(rw, Rw::Start { .. })) - .count(); - let rows = (params.max_rws - non_start_rows_len..params.max_rws).collect(); - - self.state_checks.as_ref()(prover, &rows, &rows); - } - } -} diff --git a/zkevm-circuits/tests/prover_error.rs b/zkevm-circuits/tests/prover_error.rs index ef70f98246..6a0ff397aa 100644 --- a/zkevm-circuits/tests/prover_error.rs +++ b/zkevm-circuits/tests/prover_error.rs @@ -83,6 +83,7 @@ fn prover_error() { accounts.clone(), Some(history_hashes.clone()), LoggerConfig::default(), + false, ) .expect("gen_geth_traces"); let geth_data = GethData { From 64e5b6ad5da047d5fce6cb0ab197a31830798ddf Mon Sep 17 00:00:00 2001 From: johntaiko Date: Fri, 18 Aug 2023 12:55:34 +0000 Subject: [PATCH 34/55] feat: add taiko flag for tests --- bus-mapping/src/circuit_input_builder.rs | 7 +- .../src/circuit_input_builder/block.rs | 10 +- .../circuit_input_builder/input_state_ref.rs | 6 + .../src/circuit_input_builder/transaction.rs | 5 +- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 44 +++--- mock/src/test_ctx.rs | 41 +++--- zkevm-circuits/src/anchor_tx_circuit.rs | 2 +- zkevm-circuits/src/anchor_tx_circuit/dev.rs | 2 +- zkevm-circuits/src/anchor_tx_circuit/test.rs | 2 +- zkevm-circuits/src/evm_circuit.rs | 22 ++- zkevm-circuits/src/evm_circuit/execution.rs | 5 + .../src/evm_circuit/execution/begin_tx.rs | 10 +- .../src/evm_circuit/execution/end_tx.rs | 134 +++++++++++------- .../evm_circuit/util/constraint_builder.rs | 4 + .../evm_circuit/util/math_gadget/test_util.rs | 1 + zkevm-circuits/src/super_circuit.rs | 1 + zkevm-circuits/src/taiko_pi_circuit.rs | 47 +++--- zkevm-circuits/src/taiko_super_circuit.rs | 15 +- zkevm-circuits/src/witness/block.rs | 16 ++- zkevm-circuits/src/witness/tx.rs | 4 +- 20 files changed, 235 insertions(+), 143 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index a49e7237f3..aa4f782bbb 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -77,7 +77,7 @@ impl Default for CircuitsParams { fn default() -> Self { CircuitsParams { max_rws: 1000, - max_txs: 2, // one for anchor + max_txs: 2, // more one for anchor max_calldata: 256, // TODO: Check whether this value is correct or we should increase/decrease based on // this lib tests @@ -177,6 +177,7 @@ impl<'a> CircuitInputBuilder { eth_block, eth_tx, is_success, + self.block.is_taiko(), ) } @@ -408,7 +409,7 @@ pub struct BuilderClient { cli: GethClient

, chain_id: Word, circuits_params: CircuitsParams, - protocol_instance: ProtocolInstance, + protocol_instance: Option, } /// Get State Accesses from TxExecTraces @@ -468,7 +469,7 @@ impl BuilderClient

{ pub async fn new( client: GethClient

, circuits_params: CircuitsParams, - protocol_instance: ProtocolInstance, + protocol_instance: Option, ) -> Result { let chain_id = client.get_chain_id().await?; diff --git a/bus-mapping/src/circuit_input_builder/block.rs b/bus-mapping/src/circuit_input_builder/block.rs index 85ba424e8f..11bb587d4d 100644 --- a/bus-mapping/src/circuit_input_builder/block.rs +++ b/bus-mapping/src/circuit_input_builder/block.rs @@ -92,7 +92,8 @@ pub struct Block { /// Original block from geth pub eth_block: eth_types::Block, /// Protocol instance from protocol - pub protocol_instance: ProtocolInstance, + /// If this is set, means we are in the taiko context + pub protocol_instance: Option, } impl Block { @@ -103,7 +104,7 @@ impl Block { prev_state_root: Word, eth_block: ð_types::Block, circuits_params: CircuitsParams, - protocol_instance: ProtocolInstance, + protocol_instance: Option, ) -> Result { if eth_block.base_fee_per_gas.is_none() { // FIXME: resolve this once we have proper EIP-1559 support @@ -154,6 +155,11 @@ impl Block { &self.txs } + /// Check if in the taiko context. + pub fn is_taiko(&self) -> bool { + self.protocol_instance.is_some() + } + #[cfg(test)] pub fn txs_mut(&mut self) -> &mut Vec { &mut self.txs diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index e5b8b7cc45..58f8dd32f2 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -43,6 +43,12 @@ pub struct CircuitInputStateRef<'a> { } impl<'a> CircuitInputStateRef<'a> { + /// Check if is a anchor transaction. + pub fn is_anchor_tx(&self) -> bool { + // set protocol_instance and is the first tx + self.block.is_taiko() && self.tx_ctx.is_first_tx() + } + /// Create a new step from a `GethExecStep` pub fn new_step(&self, geth_step: &GethExecStep) -> Result { let call_ctx = self.tx_ctx.call_ctx()?; diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index 238875ea72..86461d2882 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -90,7 +90,7 @@ impl TransactionContext { } /// Return true if it is the first transaction. - pub fn is_anchor(&self) -> bool { + pub fn is_first_tx(&self) -> bool { self.id == 1 } @@ -201,6 +201,7 @@ impl Transaction { eth_block: &EthBlock, eth_tx: ð_types::Transaction, is_success: bool, + is_taiko: bool, ) -> Result { let (found, _) = sdb.get_account(ð_tx.from); if !found { @@ -250,7 +251,7 @@ impl Transaction { }; let mut tx: geth_types::Transaction = eth_tx.into(); // reset gas_price - if eth_tx.transaction_index.unwrap_or_default() == 0.into() { + if eth_tx.transaction_index.unwrap_or_default() == 0.into() && is_taiko { // anchor's gas_price is always 0 tx.gas_price = 0.into(); } else { diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index fba8ca0c19..fb8784442e 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -264,7 +264,7 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result caller_balance_prev, )?; - let base_fee = if state.tx_ctx.is_anchor() { + let base_fee = if state.is_anchor_tx() { 0.into() } else { state.block.base_fee @@ -286,25 +286,31 @@ fn gen_end_tx_steps(state: &mut CircuitInputStateRef) -> Result coinbase_balance_prev, )?; - // add treasury account - let (found, treasury_account) = state - .sdb - .get_account(&state.block.protocol_instance.meta_hash.treasury); - if !found { - return Err(Error::AccountNotFound( - state.block.protocol_instance.meta_hash.treasury, - )); + // transfer base fee to treasury account in taiko context + if state.block.is_taiko() { + let treasury = state + .block + .protocol_instance + .clone() + .unwrap() + .meta_hash + .treasury; + // add treasury account + let (found, treasury_account) = state.sdb.get_account(&treasury); + if !found { + return Err(Error::AccountNotFound(treasury)); + } + let treasury_balance_prev = treasury_account.balance; + let treasury_balance = + treasury_balance_prev + base_fee * (state.tx.gas() - exec_step.gas_left.0); + state.account_write( + &mut exec_step, + treasury, + AccountField::Balance, + treasury_balance, + treasury_balance_prev, + )?; } - let treasury_balance_prev = treasury_account.balance; - let treasury_balance = - treasury_balance_prev + base_fee * (state.tx.gas() - exec_step.gas_left.0); - state.account_write( - &mut exec_step, - state.block.protocol_instance.meta_hash.treasury, - AccountField::Balance, - treasury_balance, - treasury_balance_prev, - )?; // handle tx receipt tag state.tx_receipt_write( diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index c5ad54b4da..f98aee684a 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -134,17 +134,18 @@ impl TestContext { func_tx: FTx, func_block: Fb, logger_config: LoggerConfig, - use_anchor: bool, + is_taiko: bool, ) -> Result where FTx: FnOnce(Vec<&mut MockTransaction>, [MockAccount; NACC]), Fb: FnOnce(&mut MockBlock, Vec) -> &mut MockBlock, FAcc: FnOnce([&mut MockAccount; NACC]), { - let more_accounts = if use_anchor { 3 } else { 1 }; + let more_accounts = if is_taiko { 3 } else { 0 }; let mut accounts: Vec = vec![MockAccount::default(); NACC + more_accounts]; - accounts[0].address(*MOCK_TAIKO_TREASURY_ADDRESS); - if use_anchor { + if is_taiko { + accounts[0].address(*MOCK_TAIKO_TREASURY_ADDRESS); + // from golden touch to l2 contract // add the GOLDEN_TOUCH account in the first position accounts[1].address(*GOLDEN_TOUCH); // add the l2 contract account in the second position @@ -168,30 +169,36 @@ impl TestContext { .try_into() .expect("Mismatched acc len"); - let mut transactions = - vec![MockTransaction::default(); NTX + if use_anchor { 1 } else { 0 }]; + let mut transactions = vec![MockTransaction::default(); NTX + if is_taiko { 1 } else { 0 }]; // By default, set the TxIndex and the Nonce values of the multiple transactions // of the context correlative so that any Ok test passes by default. // If the user decides to override these values, they'll then be set to whatever // inputs were provided by the user. - if use_anchor { + if is_taiko { // add the anchor transaction in the first position transactions[0] = MockTransaction::new_anchor(); } - transactions - .iter_mut() - .enumerate() - .skip(1) - .for_each(|(idx, tx)| { - let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); - tx.transaction_idx(idx).nonce(idx - 1); - }); - let tx_skipped = if use_anchor { 1 } else { 0 }; + let tx_skipped = if is_taiko { 1 } else { 0 }; let tx_refs = transactions.iter_mut().skip(tx_skipped).collect(); // Build Tx modifiers. func_tx(tx_refs, accounts_cloned); + // Sets the transaction_idx and nonce after building the tx modifiers. Hence, if user has + // overridden these values above using the tx modifiers, that will be ignored. + let mut acc_tx_count = vec![0u64; NACC]; + transactions.iter_mut().enumerate().for_each(|(idx, tx)| { + let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); + tx.transaction_idx(idx); + if let Some((pos, from_acc)) = accounts + .iter() + .find_position(|acc| acc.address == tx.from.address()) + { + tx.nonce(from_acc.nonce + acc_tx_count[pos]); + acc_tx_count[pos] += 1; + } + }); + let transactions: Vec = transactions.iter_mut().map(|tx| tx.build()).collect(); @@ -210,7 +217,7 @@ impl TestContext { accounts.clone(), history_hashes.clone(), logger_config, - use_anchor, + is_taiko, )?; Ok(Self { diff --git a/zkevm-circuits/src/anchor_tx_circuit.rs b/zkevm-circuits/src/anchor_tx_circuit.rs index bd21d67fce..327806ccbc 100644 --- a/zkevm-circuits/src/anchor_tx_circuit.rs +++ b/zkevm-circuits/src/anchor_tx_circuit.rs @@ -433,7 +433,7 @@ impl SubCircuit for AnchorTxCircuit { block.circuits_params.max_calldata, block.txs.first().unwrap().clone(), block.txs.clone(), - block.protocol_instance.clone(), + block.protocol_instance.clone().unwrap(), ) } diff --git a/zkevm-circuits/src/anchor_tx_circuit/dev.rs b/zkevm-circuits/src/anchor_tx_circuit/dev.rs index 4125783faa..25015258b2 100644 --- a/zkevm-circuits/src/anchor_tx_circuit/dev.rs +++ b/zkevm-circuits/src/anchor_tx_circuit/dev.rs @@ -23,7 +23,7 @@ impl TestAnchorTxCircuit { /// Create a new test circuit from a block. pub fn new_from_block(block: &witness::Block) -> Self { TestAnchorTxCircuit { - protocol_instance: block.protocol_instance.clone(), + protocol_instance: block.protocol_instance.clone().unwrap(), circuit: AnchorTxCircuit::new_from_block(block), } } diff --git a/zkevm-circuits/src/anchor_tx_circuit/test.rs b/zkevm-circuits/src/anchor_tx_circuit/test.rs index 287425323b..7c628b7fd5 100644 --- a/zkevm-circuits/src/anchor_tx_circuit/test.rs +++ b/zkevm-circuits/src/anchor_tx_circuit/test.rs @@ -97,7 +97,7 @@ fn gen_block( .handle_block(&block.eth_block, &block.geth_traces) .unwrap(); let mut block = block_convert::(&builder.block, &builder.code_db).unwrap(); - block.protocol_instance = protocol_instance; + block.protocol_instance = Some(protocol_instance); block } diff --git a/zkevm-circuits/src/evm_circuit.rs b/zkevm-circuits/src/evm_circuit.rs index 86d1aad98a..7cfaedf9d7 100644 --- a/zkevm-circuits/src/evm_circuit.rs +++ b/zkevm-circuits/src/evm_circuit.rs @@ -68,6 +68,8 @@ pub struct EvmCircuitConfigArgs { pub keccak_table: KeccakTable, /// ExpTable pub exp_table: ExpTable, + /// Taiko + pub is_taiko: bool, } impl SubCircuitConfig for EvmCircuitConfig { @@ -85,6 +87,7 @@ impl SubCircuitConfig for EvmCircuitConfig { copy_table, keccak_table, exp_table, + is_taiko, }: Self::ConfigArgs, ) -> Self { let fixed_table = [(); 4].map(|_| meta.fixed_column()); @@ -101,6 +104,7 @@ impl SubCircuitConfig for EvmCircuitConfig { ©_table, &keccak_table, &exp_table, + is_taiko, )); meta.annotate_lookup_any_column(byte_table[0], || "byte_range"); @@ -356,17 +360,30 @@ pub(crate) mod cached { } } +/// Super Circuit configuration parameters +#[derive(Default)] +pub struct EvmCircuitParams { + is_taiko: bool, +} + // Always exported because of `EXECUTION_STATE_HEIGHT_MAP` impl Circuit for EvmCircuit { type Config = (EvmCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - type Params = (); + type Params = EvmCircuitParams; fn without_witnesses(&self) -> Self { Self::default() } fn configure(meta: &mut ConstraintSystem) -> Self::Config { + Self::configure_with_params(meta, Self::Params::default()) + } + + fn configure_with_params( + meta: &mut ConstraintSystem, + EvmCircuitParams { is_taiko }: Self::Params, + ) -> Self::Config { let tx_table = TxTable::construct(meta); let rw_table = RwTable::construct(meta); let bytecode_table = BytecodeTable::construct(meta); @@ -390,6 +407,7 @@ impl Circuit for EvmCircuit { copy_table, keccak_table, exp_table, + is_taiko, }, ), challenges, @@ -458,7 +476,7 @@ mod evm_circuit_stats { fn evm_circuit_unusable_rows() { assert_eq!( EvmCircuit::::unusable_rows(), - unusable_rows::>(()), + unusable_rows::>(Default::default()), ) } diff --git a/zkevm-circuits/src/evm_circuit/execution.rs b/zkevm-circuits/src/evm_circuit/execution.rs index 4581430c79..f3dfcd5bab 100644 --- a/zkevm-circuits/src/evm_circuit/execution.rs +++ b/zkevm-circuits/src/evm_circuit/execution.rs @@ -331,6 +331,7 @@ impl ExecutionConfig { copy_table: &dyn LookupTable, keccak_table: &dyn LookupTable, exp_table: &dyn LookupTable, + is_taiko: bool, ) -> Self { let mut instrument = Instrument::default(); let q_usable = meta.complex_selector(); @@ -473,6 +474,7 @@ impl ExecutionConfig { &mut height_map, &mut stored_expressions_map, &mut instrument, + is_taiko, )) })() }; @@ -618,6 +620,7 @@ impl ExecutionConfig { height_map: &mut HashMap, stored_expressions_map: &mut HashMap>>, instrument: &mut Instrument, + is_taiko: bool, ) -> G { // Configure the gadget with the max height first so we can find out the actual // height @@ -628,6 +631,7 @@ impl ExecutionConfig { dummy_step_next, challenges, G::EXECUTION_STATE, + is_taiko, ); G::configure(&mut cb); let (_, _, height) = cb.build(); @@ -641,6 +645,7 @@ impl ExecutionConfig { step_next.clone(), challenges, G::EXECUTION_STATE, + is_taiko, ); let gadget = G::configure(&mut cb); diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 96cf2e58b4..985b67570f 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -599,7 +599,7 @@ mod test { fn test_ok(tx: eth_types::Transaction, code: Option) { // Get the execution steps from the external tracer - let ctx = TestContext::<2, 1>::new_with_taiko( + let ctx = TestContext::<2, 1>::new( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(10)); @@ -676,7 +676,7 @@ mod test { STOP }; - let ctx = TestContext::<2, 1>::new_with_taiko( + let ctx = TestContext::<2, 1>::new( None, |accs| { accs[0].address(to).balance(eth(1)).code(code); @@ -719,7 +719,7 @@ mod test { #[test] fn begin_tx_no_code() { - let ctx = TestContext::<2, 1>::new_with_taiko( + let ctx = TestContext::<2, 1>::new( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); @@ -742,7 +742,7 @@ mod test { #[test] fn begin_tx_no_account() { - let ctx = TestContext::<1, 1>::new_with_taiko( + let ctx = TestContext::<1, 1>::new( None, |accs| { accs[0].address(MOCK_ACCOUNTS[0]).balance(eth(20)); @@ -773,7 +773,7 @@ mod test { PUSH1(0) RETURN }; - let ctx = TestContext::<1, 1>::new_with_taiko( + let ctx = TestContext::<1, 1>::new( None, |accs| { accs[0] diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index 3b77f65605..daf9261ff1 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -40,15 +40,16 @@ pub(crate) struct EndTxGadget { sub_gas_price_by_base_fee: AddWordsGadget, sub_fee_cap_by_base_fee: AddWordsGadget, mul_effective_tip_by_gas_used: MulWordByU64Gadget, - mul_base_fee_by_gas_used: MulWordByU64Gadget, coinbase: Cell, coinbase_reward: UpdateBalanceGadget, - treasury: Cell, - treasury_reward: UpdateBalanceGadget, current_cumulative_gas_used: Cell, is_first_tx: IsEqualGadget, is_persistent: Cell, tx_gas_tip_cap: Word, + // taiko + mul_base_fee_by_gas_used: Option>, + treasury: Option>, + treasury_reward: Option>, } impl ExecutionGadget for EndTxGadget { @@ -100,12 +101,17 @@ impl ExecutionGadget for EndTxGadget { let coinbase = cb.query_cell(); cb.block_lookup(BlockContextFieldTag::Coinbase.expr(), None, coinbase.expr()); let base_fee = cb.query_word_rlc(); - cb.condition(is_first_tx.expr(), |cb| { - cb.require_zero("base_fee is zero when tx is first tx", base_fee.expr()); - }); - cb.condition(not::expr(is_first_tx.expr()), |cb| { + + if cb.is_taiko { + cb.condition(is_first_tx.expr(), |cb| { + cb.require_zero("base_fee is zero when tx is first tx", base_fee.expr()); + }); + cb.condition(not::expr(is_first_tx.expr()), |cb| { + cb.block_lookup(BlockContextFieldTag::BaseFee.expr(), None, base_fee.expr()); + }); + } else { cb.block_lookup(BlockContextFieldTag::BaseFee.expr(), None, base_fee.expr()); - }); + } // https://eips.ethereum.org/EIPS/eip-1559 let effective_tip = cb.query_word_rlc(); @@ -114,8 +120,6 @@ impl ExecutionGadget for EndTxGadget { AddWordsGadget::construct(cb, [effective_tip.clone(), base_fee.clone()], tx_gas_price); let mul_effective_tip_by_gas_used = MulWordByU64Gadget::construct(cb, effective_tip.clone(), gas_used.clone()); - let mul_base_fee_by_gas_used = - MulWordByU64Gadget::construct(cb, base_fee.clone(), gas_used.clone()); // effective_tip == min(gas_tip_cap, gas_fee_cap - base_fee) let fee_cap_sub_base_fee = cb.query_word_rlc(); @@ -132,10 +136,6 @@ impl ExecutionGadget for EndTxGadget { min_max_effective_tip.min(), ); - // send base fee to treasury account - let treasury = cb.query_cell(); - cb.block_lookup(BlockContextFieldTag::Treasury.expr(), None, treasury.expr()); - let coinbase_reward = UpdateBalanceGadget::construct( cb, coinbase.expr(), @@ -143,12 +143,27 @@ impl ExecutionGadget for EndTxGadget { None, ); - let treasury_reward = UpdateBalanceGadget::construct( - cb, - treasury.expr(), - vec![mul_base_fee_by_gas_used.product().clone()], - None, - ); + let (mul_base_fee_by_gas_used, treasury, treasury_reward) = if cb.is_taiko { + let mul_base_fee_by_gas_used = + MulWordByU64Gadget::construct(cb, base_fee.clone(), gas_used.clone()); + // send base fee to treasury account + let treasury = cb.query_cell(); + cb.block_lookup(BlockContextFieldTag::Treasury.expr(), None, treasury.expr()); + + let treasury_reward = UpdateBalanceGadget::construct( + cb, + treasury.expr(), + vec![mul_base_fee_by_gas_used.product().clone()], + None, + ); + ( + Some(mul_base_fee_by_gas_used), + Some(treasury), + Some(treasury_reward), + ) + } else { + (None, None, None) + }; // constrain tx receipt fields cb.tx_receipt_lookup( @@ -188,6 +203,8 @@ impl ExecutionGadget for EndTxGadget { gas_used + current_cumulative_gas_used.expr(), ); + let begin_tx_rw_counter = if cb.is_taiko { 11.expr() } else { 10.expr() }; + cb.condition( cb.next.execution_state_selector([ExecutionState::BeginTx]), |cb| { @@ -199,17 +216,19 @@ impl ExecutionGadget for EndTxGadget { ); cb.require_step_state_transition(StepStateTransition { - rw_counter: Delta(11.expr() - is_first_tx.expr()), + rw_counter: Delta(begin_tx_rw_counter - is_first_tx.expr()), ..StepStateTransition::any() }); }, ); + let end_block_rw_counter = if cb.is_taiko { 10.expr() } else { 9.expr() }; + cb.condition( cb.next.execution_state_selector([ExecutionState::EndBlock]), |cb| { cb.require_step_state_transition(StepStateTransition { - rw_counter: Delta(10.expr() - is_first_tx.expr()), + rw_counter: Delta(end_block_rw_counter - is_first_tx.expr()), // We propagate call_id so that EndBlock can get the last tx_id // in order to count processed txs. call_id: Same, @@ -231,15 +250,15 @@ impl ExecutionGadget for EndTxGadget { sub_gas_price_by_base_fee, sub_fee_cap_by_base_fee, mul_effective_tip_by_gas_used, - mul_base_fee_by_gas_used, coinbase, coinbase_reward, - treasury, - treasury_reward, current_cumulative_gas_used, is_first_tx, is_persistent, tx_gas_tip_cap, + mul_base_fee_by_gas_used, + treasury, + treasury_reward, } } @@ -254,8 +273,8 @@ impl ExecutionGadget for EndTxGadget { ) -> Result<(), Error> { let gas_used = tx.gas - step.gas_left.0; let (refund, _) = block.get_rws(step, 2).tx_refund_value_pair(); - let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev), (treasury_balance, treasury_balance_prev)] = - [3, 4, 5].map(|index| block.get_rws(step, index).account_value_pair()); + let [(caller_balance, caller_balance_prev), (coinbase_balance, coinbase_balance_prev)] = + [3, 4].map(|index| block.get_rws(step, index).account_value_pair()); self.tx_id .assign(region, offset, Value::known(F::from(tx.id as u64)))?; self.tx_gas @@ -270,7 +289,7 @@ impl ExecutionGadget for EndTxGadget { F::from(refund), )?; - let base_fee = if tx.is_anchor() { + let base_fee = if block.is_taiko() && tx.is_first_tx() { 0.into() } else { block.context.base_fee @@ -329,13 +348,6 @@ impl ExecutionGadget for EndTxGadget { gas_used, effective_tip * gas_used, )?; - self.mul_base_fee_by_gas_used.assign( - region, - offset, - base_fee, - gas_used, - base_fee * gas_used, - )?; self.coinbase.assign( region, offset, @@ -354,26 +366,38 @@ impl ExecutionGadget for EndTxGadget { vec![effective_tip * gas_used], coinbase_balance, )?; - self.treasury.assign( - region, - offset, - Value::known( - block - .protocol_instance - .meta_hash - .treasury - .to_scalar() - .expect("unexpected Address -> Scalar conversion failure"), - ), - )?; - self.treasury_reward.assign( - region, - offset, - treasury_balance_prev, - vec![base_fee * gas_used], - treasury_balance, - )?; - + if block.is_taiko() { + self.mul_base_fee_by_gas_used.as_ref().unwrap().assign( + region, + offset, + base_fee, + gas_used, + base_fee * gas_used, + )?; + self.treasury.as_ref().unwrap().assign( + region, + offset, + Value::known( + block + .protocol_instance + .as_ref() + .unwrap() + .meta_hash + .treasury + .to_scalar() + .expect("unexpected Address -> Scalar conversion failure"), + ), + )?; + let (treasury_balance, treasury_balance_prev) = + block.get_rws(step, 5).account_value_pair(); + self.treasury_reward.as_ref().unwrap().assign( + region, + offset, + treasury_balance_prev, + vec![base_fee * gas_used], + treasury_balance, + )?; + } let current_cumulative_gas_used: u64 = if tx.id == 1 { 0 } else { diff --git a/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs b/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs index 93ea3d51ca..3998b0e5c9 100644 --- a/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs +++ b/zkevm-circuits/src/evm_circuit/util/constraint_builder.rs @@ -279,6 +279,8 @@ pub(crate) struct EVMConstraintBuilder<'a, F> { conditions: Vec>, constraints_location: ConstraintLocation, stored_expressions: Vec>, + // in taiko context + pub(crate) is_taiko: bool, } impl<'a, F: Field> ConstrainBuilderCommon for EVMConstraintBuilder<'a, F> { @@ -300,6 +302,7 @@ impl<'a, F: Field> EVMConstraintBuilder<'a, F> { next: Step, challenges: &'a Challenges>, execution_state: ExecutionState, + is_taiko: bool, ) -> Self { Self { max_degree: MAX_DEGREE, @@ -321,6 +324,7 @@ impl<'a, F: Field> EVMConstraintBuilder<'a, F> { conditions: Vec::new(), constraints_location: ConstraintLocation::Step, stored_expressions: Vec::new(), + is_taiko, } } diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs index 0541bc0fc1..9d850630c8 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/test_util.rs @@ -131,6 +131,7 @@ impl> Circuit for UnitTestMathGadgetBaseC step_next, &challenges_exprs, ExecutionState::STOP, + false, ); let math_gadget_container = G::configure_gadget_container(&mut cb); let (constraints, stored_expressions, _) = cb.build(); diff --git a/zkevm-circuits/src/super_circuit.rs b/zkevm-circuits/src/super_circuit.rs index cb5deac7f7..98ced60898 100644 --- a/zkevm-circuits/src/super_circuit.rs +++ b/zkevm-circuits/src/super_circuit.rs @@ -204,6 +204,7 @@ impl SubCircuitConfig for SuperCircuitConfig { copy_table, keccak_table, exp_table, + is_taiko: false, }, ); diff --git a/zkevm-circuits/src/taiko_pi_circuit.rs b/zkevm-circuits/src/taiko_pi_circuit.rs index a52300e8f0..ffb2e8a547 100644 --- a/zkevm-circuits/src/taiko_pi_circuit.rs +++ b/zkevm-circuits/src/taiko_pi_circuit.rs @@ -122,28 +122,29 @@ impl PublicData { /// create PublicData from block and taiko pub fn new(block: &witness::Block) -> Self { use bus_mapping::circuit_input_builder::left_shift; - let field9 = left_shift(block.protocol_instance.prover, 96) - + left_shift(block.protocol_instance.parent_gas_used as u64, 64) - + left_shift(block.protocol_instance.gas_used as u64, 32); - - let field10 = left_shift(block.protocol_instance.block_max_gas_limit, 192) - + left_shift(block.protocol_instance.max_transactions_per_block, 128) - + left_shift(block.protocol_instance.max_bytes_per_tx_list, 64); + let protocol_instance = block.protocol_instance.clone().unwrap(); + let field9 = left_shift(protocol_instance.prover, 96) + + left_shift(protocol_instance.parent_gas_used as u64, 64) + + left_shift(protocol_instance.gas_used as u64, 32); + + let field10 = left_shift(protocol_instance.block_max_gas_limit, 192) + + left_shift(protocol_instance.max_transactions_per_block, 128) + + left_shift(protocol_instance.max_bytes_per_tx_list, 64); PublicData { - l1_signal_service: block.protocol_instance.l1_signal_service.to_word(), - l2_signal_service: block.protocol_instance.l2_signal_service.to_word(), - l2_contract: block.protocol_instance.l2_contract.to_word(), - meta_hash: block.protocol_instance.meta_hash.hash().to_word(), - block_hash: block.protocol_instance.block_hash.to_word(), - parent_hash: block.protocol_instance.parent_hash.to_word(), - signal_root: block.protocol_instance.signal_root.to_word(), - graffiti: block.protocol_instance.graffiti.to_word(), - prover: block.protocol_instance.prover, - parent_gas_used: block.protocol_instance.parent_gas_used, - gas_used: block.protocol_instance.gas_used, - block_max_gas_limit: block.protocol_instance.block_max_gas_limit, - max_transactions_per_block: block.protocol_instance.max_transactions_per_block, - max_bytes_per_tx_list: block.protocol_instance.max_bytes_per_tx_list, + l1_signal_service: protocol_instance.l1_signal_service.to_word(), + l2_signal_service: protocol_instance.l2_signal_service.to_word(), + l2_contract: protocol_instance.l2_contract.to_word(), + meta_hash: protocol_instance.meta_hash.hash().to_word(), + block_hash: protocol_instance.block_hash.to_word(), + parent_hash: protocol_instance.parent_hash.to_word(), + signal_root: protocol_instance.signal_root.to_word(), + graffiti: protocol_instance.graffiti.to_word(), + prover: protocol_instance.prover, + parent_gas_used: protocol_instance.parent_gas_used, + gas_used: protocol_instance.gas_used, + block_max_gas_limit: protocol_instance.block_max_gas_limit, + max_transactions_per_block: protocol_instance.max_transactions_per_block, + max_bytes_per_tx_list: protocol_instance.max_bytes_per_tx_list, field9, field10, block_context: block.context.clone(), @@ -761,8 +762,8 @@ mod taiko_pi_circuit_test { block.eth_block.parent_hash = *OMMERS_HASH; block.eth_block.hash = Some(*OMMERS_HASH); - block.protocol_instance.block_hash = *OMMERS_HASH; - block.protocol_instance.parent_hash = *OMMERS_HASH; + block.protocol_instance.as_mut().unwrap().block_hash = *OMMERS_HASH; + block.protocol_instance.as_mut().unwrap().parent_hash = *OMMERS_HASH; block.context.history_hashes = vec![OMMERS_HASH.to_word()]; block.context.block_hash = OMMERS_HASH.to_word(); block.context.number = 300.into(); diff --git a/zkevm-circuits/src/taiko_super_circuit.rs b/zkevm-circuits/src/taiko_super_circuit.rs index 22e36b6a59..b8179e92ff 100644 --- a/zkevm-circuits/src/taiko_super_circuit.rs +++ b/zkevm-circuits/src/taiko_super_circuit.rs @@ -101,6 +101,7 @@ impl SubCircuitConfig for SuperCircuitConfig { copy_table, keccak_table: keccak_table.clone(), exp_table, + is_taiko: true, }, ); @@ -249,9 +250,11 @@ impl Circuit for SuperCircuit { &challenges, )?; config.byte_table.load(&mut layouter)?; - config - .pi_table - .load(&mut layouter, &self.block.protocol_instance, &challenges)?; + config.pi_table.load( + &mut layouter, + self.block.protocol_instance.as_ref().unwrap(), + &challenges, + )?; // rw_table, // bytecode_table, // copy_table, @@ -315,9 +318,9 @@ impl SuperCircuit { protocol_instance: ProtocolInstance, ) -> Result<(u32, Self, Vec>), bus_mapping::Error> { let mut block = block_convert(&builder.block, &builder.code_db).unwrap(); - block.protocol_instance = protocol_instance; - block.protocol_instance.block_hash = block.eth_block.hash.unwrap(); - block.protocol_instance.parent_hash = block.eth_block.parent_hash; + block.protocol_instance = Some(protocol_instance); + block.protocol_instance.as_mut().unwrap().block_hash = block.eth_block.hash.unwrap(); + block.protocol_instance.as_mut().unwrap().parent_hash = block.eth_block.parent_hash; let (_, rows_needed) = Self::min_num_rows_block(&block); let k = log2_ceil(Self::unusable_rows() + rows_needed); log::debug!("super circuit uses k = {}", k); diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index 29dfa905cc..e8710e9694 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -54,7 +54,7 @@ pub struct Block { /// Original Block from geth pub eth_block: eth_types::Block, /// Protocol Instance - pub protocol_instance: ProtocolInstance, + pub protocol_instance: Option, } /// Assignments for pi table @@ -111,6 +111,11 @@ impl Block { self.rws[step.rw_index(index)] } + /// Set protocol instance means in taiko context + pub fn is_taiko(&self) -> bool { + self.protocol_instance.is_some() + } + /// Obtains the expected Circuit degree needed in order to be able to test /// the EvmCircuit with this block without needing to configure the /// `ConstraintSystem`. @@ -173,7 +178,7 @@ pub struct BlockContext { /// The address of the miner for the block pub coinbase: Address, /// The address of the treasury for the base fee - pub treasury: Address, + pub treasury: Option

, /// The gas limit of the block pub gas_limit: u64, /// The number of the block @@ -205,7 +210,7 @@ impl BlockContext { [ Value::known(F::from(BlockContextFieldTag::Treasury as u64)), Value::known(F::ZERO), - Value::known(self.treasury.to_scalar().unwrap()), + Value::known(self.treasury.unwrap_or_default().to_scalar().unwrap()), ], [ Value::known(F::from(BlockContextFieldTag::Timestamp as u64)), @@ -271,7 +276,10 @@ impl From<&circuit_input_builder::Block> for BlockContext { fn from(block: &circuit_input_builder::Block) -> Self { Self { coinbase: block.coinbase, - treasury: block.protocol_instance.meta_hash.treasury, + treasury: block + .protocol_instance + .as_ref() + .map(|pi| pi.meta_hash.treasury), gas_limit: block.gas_limit, number: block.number, timestamp: block.timestamp, diff --git a/zkevm-circuits/src/witness/tx.rs b/zkevm-circuits/src/witness/tx.rs index 3a52048a05..729b78758e 100644 --- a/zkevm-circuits/src/witness/tx.rs +++ b/zkevm-circuits/src/witness/tx.rs @@ -56,8 +56,8 @@ pub struct Transaction { } impl Transaction { - /// The first transaction in a block is the anchor transaction - pub fn is_anchor(&self) -> bool { + /// Return true if it is the first transaction. + pub fn is_first_tx(&self) -> bool { self.id == 1 } From f820a0e6d11067fd08634e2627da322fd045edb5 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Fri, 18 Aug 2023 13:30:18 +0000 Subject: [PATCH 35/55] fix: some break tests --- mock/src/test_ctx.rs | 4 ++-- zkevm-circuits/src/pi_circuit.rs | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index f98aee684a..e15ee53eec 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -186,7 +186,7 @@ impl TestContext { func_tx(tx_refs, accounts_cloned); // Sets the transaction_idx and nonce after building the tx modifiers. Hence, if user has // overridden these values above using the tx modifiers, that will be ignored. - let mut acc_tx_count = vec![0u64; NACC]; + let mut acc_tx_count = vec![0u64; NACC + more_accounts]; transactions.iter_mut().enumerate().for_each(|(idx, tx)| { let idx = u64::try_from(idx).expect("Unexpected idx conversion error"); tx.transaction_idx(idx); @@ -283,7 +283,7 @@ impl TestContext { /// account_0_code_account_1_no_code`]. Extra accounts, txs and/or block /// configs are set as [`Default`]. pub fn simple_ctx_with_bytecode(bytecode: Bytecode) -> Result, Error> { - TestContext::<2, 1>::new_with_taiko( + TestContext::<2, 1>::new( None, account_0_code_account_1_no_code(bytecode), tx_from_1_to_0, diff --git a/zkevm-circuits/src/pi_circuit.rs b/zkevm-circuits/src/pi_circuit.rs index a7a22be423..70d5221997 100644 --- a/zkevm-circuits/src/pi_circuit.rs +++ b/zkevm-circuits/src/pi_circuit.rs @@ -18,7 +18,6 @@ use std::marker::PhantomData; use crate::{ table::{BlockTable, LookupTable, TxFieldTag, TxTable}, - tx_circuit::TX_LEN, util::{random_linear_combine_word as rlc, Challenges, SubCircuit, SubCircuitConfig}, witness, }; @@ -35,6 +34,9 @@ use halo2_proofs::{ #[cfg(any(feature = "test", test, feature = "test-circuits"))] use halo2_proofs::{circuit::SimpleFloorPlanner, plonk::Circuit}; +// FIXME: for now TX_LEN without gas_tip_cap and gas_fee_cap +const TX_LEN: usize = 13; + /// Values of the block table (as in the spec) #[derive(Clone, Default, Debug)] pub struct BlockValues { From 8b1d0a10492efbe03d5b32b4342fd7faba7b6da9 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sat, 19 Aug 2023 05:36:38 +0000 Subject: [PATCH 36/55] fix: use eip1559 signature --- eth-types/src/geth_types.rs | 15 +++++++++++---- mock/src/transaction.rs | 2 +- zkevm-circuits/src/tx_circuit.rs | 12 ++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 80c9ec1c54..81487649da 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -6,7 +6,10 @@ use crate::{ ToWord, Word, U64, }; use ethers_core::{ - types::{transaction::response, Eip1559TransactionRequest, NameOrAddress, TransactionRequest}, + types::{ + transaction::{eip2718::TypedTransaction, response}, + Eip1559TransactionRequest, NameOrAddress, TransactionRequest, + }, utils::get_contract_address, }; use ethers_signers::{LocalWallet, Signer}; @@ -245,9 +248,13 @@ impl Transaction { secp256k1::Fq::from_repr(sig_s_le), Error::Signature(libsecp256k1::Error::InvalidSignature), )?; - // msg = rlp([nonce, gasPrice, gas, to, value, data, sig_v, r, s]) - let req: TransactionRequest = self.into(); - let msg = req.chain_id(chain_id).rlp(); + // msg = rlp([chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gas, to, value, data, + // accessList]) + let req: Eip1559TransactionRequest = self.into(); + let req = req.chain_id(chain_id); + // insert 0x2 at the begin of eip + let req: TypedTransaction = req.into(); + let msg = req.rlp(); let msg_hash: [u8; 32] = Keccak256::digest(&msg) .as_slice() .to_vec() diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 4b52f89a58..9a6393df85 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -163,7 +163,7 @@ impl Default for MockTransaction { v: None, r: None, s: None, - transaction_type: U64::zero(), + transaction_type: U64::from(2), access_list: AccessList::default(), max_priority_fee_per_gas: *MOCK_GASTIPCAP, max_fee_per_gas: *MOCK_GASFEECAP, diff --git a/zkevm-circuits/src/tx_circuit.rs b/zkevm-circuits/src/tx_circuit.rs index 8f55a2338a..0c35dd49f6 100644 --- a/zkevm-circuits/src/tx_circuit.rs +++ b/zkevm-circuits/src/tx_circuit.rs @@ -213,6 +213,18 @@ impl TxCircuit { .evm_word() .map(|challenge| rlc(tx.gas_price.to_le_bytes(), challenge)), ), + ( + TxFieldTag::GasTipCap, + challenges + .evm_word() + .map(|challenge| rlc(tx.gas_tip_cap.to_le_bytes(), challenge)), + ), + ( + TxFieldTag::GasFeeCap, + challenges + .evm_word() + .map(|challenge| rlc(tx.gas_fee_cap.to_le_bytes(), challenge)), + ), ( TxFieldTag::CallerAddress, Value::known(tx.from.to_scalar().expect("tx.from too big")), From 3428db0c034e52fc1ff977a3cd1159e9c3b6a119 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sun, 20 Aug 2023 04:50:27 +0000 Subject: [PATCH 37/55] fix: tests --- geth-utils/gethutil/trace.go | 16 ++++++---------- .../execution/error_invalid_opcode.rs | 5 ++++- zkevm-circuits/src/taiko_pi_circuit.rs | 11 +++++++++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/geth-utils/gethutil/trace.go b/geth-utils/gethutil/trace.go index ed2b5fabc9..13f4182d42 100644 --- a/geth-utils/gethutil/trace.go +++ b/geth-utils/gethutil/trace.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" @@ -155,24 +156,22 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { blockGasLimit := toBigInt(config.Block.GasLimit).Uint64() messages := make([]core.Message, len(config.Transactions)) for i, tx := range config.Transactions { - // If gas price is specified directly, the tx is treated as legacy type. - if tx.GasPrice != nil { - tx.GasFeeCap = tx.GasPrice - tx.GasTipCap = tx.GasPrice - } + // only support EIP-1559 txs + gasPrice := math.BigMin(new(big.Int).Add(toBigInt(tx.GasTipCap), toBigInt(config.Block.BaseFee)), toBigInt(tx.GasFeeCap)) txAccessList := make(types.AccessList, len(tx.AccessList)) for i, accessList := range tx.AccessList { txAccessList[i].Address = accessList.Address txAccessList[i].StorageKeys = accessList.StorageKeys } + messages[i] = core.Message{ From: tx.From, To: tx.To, Nonce: uint64(tx.Nonce), Value: toBigInt(tx.Value), GasLimit: uint64(tx.GasLimit), - GasPrice: toBigInt(tx.GasPrice), + GasPrice: gasPrice, GasFeeCap: toBigInt(tx.GasFeeCap), GasTipCap: toBigInt(tx.GasTipCap), Data: tx.CallData, @@ -188,10 +187,7 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { return nil, fmt.Errorf("txs total gas: %d Exceeds block gas limit: %d", txsGasLimit, blockGasLimit) } - random := common.Hash{} - if config.Block.Difficulty != nil { - random = common.BigToHash(config.Block.Difficulty.ToInt()) - } + random := common.BigToHash(toBigInt(config.Block.Difficulty)) blockCtx := vm.BlockContext{ CanTransfer: core.CanTransfer, diff --git a/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs b/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs index b4db5e92e4..aa8c0ce1de 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_invalid_opcode.rs @@ -81,7 +81,10 @@ mod test { vec![0xf6], vec![0xfe], // Multiple invalid opcodes - vec![0x5c, 0x5e], + // TLOAD 0x5c eip-1153 + // MCOPY 0x5e eip-5656 + // PUSH0 ox5f eip-3855 + vec![], ]; } diff --git a/zkevm-circuits/src/taiko_pi_circuit.rs b/zkevm-circuits/src/taiko_pi_circuit.rs index ffb2e8a547..824a5eb761 100644 --- a/zkevm-circuits/src/taiko_pi_circuit.rs +++ b/zkevm-circuits/src/taiko_pi_circuit.rs @@ -116,7 +116,11 @@ impl PublicData { } fn default() -> Self { - Self::new::(&witness::Block::default()) + let block = witness::Block { + protocol_instance: Some(Default::default()), + ..Default::default() + }; + Self::new::(&block) } /// create PublicData from block and taiko @@ -758,7 +762,10 @@ mod taiko_pi_circuit_test { #[test] fn test_verify() { - let mut block = witness::Block::::default(); + let mut block = witness::Block:: { + protocol_instance: Some(Default::default()), + ..Default::default() + }; block.eth_block.parent_hash = *OMMERS_HASH; block.eth_block.hash = Some(*OMMERS_HASH); From 873da0a62cff632fe1fc2acb5a88a73c0bfb4637 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sun, 20 Aug 2023 08:37:39 +0000 Subject: [PATCH 38/55] fix: all tests --- .../protocol_instance.rs | 18 ++++++--- bus-mapping/src/mock.rs | 2 +- mock/src/test_ctx.rs | 3 ++ zkevm-circuits/src/bin/stats/helpers.rs | 4 +- zkevm-circuits/src/bin/stats/main.rs | 20 ++++++---- zkevm-circuits/src/evm_circuit.rs | 39 +++++++++++++++++-- zkevm-circuits/src/evm_circuit/execution.rs | 6 +-- .../src/evm_circuit/execution/end_tx.rs | 2 +- zkevm-circuits/src/evm_circuit/param.rs | 10 ++++- zkevm-circuits/src/evm_circuit/step.rs | 17 +++++--- zkevm-circuits/src/taiko_super_circuit.rs | 13 +++---- .../src/taiko_super_circuit/test.rs | 30 +++----------- zkevm-circuits/src/test_util.rs | 12 +++++- 13 files changed, 115 insertions(+), 61 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder/protocol_instance.rs b/bus-mapping/src/circuit_input_builder/protocol_instance.rs index 47a965dc81..8ef5cca210 100644 --- a/bus-mapping/src/circuit_input_builder/protocol_instance.rs +++ b/bus-mapping/src/circuit_input_builder/protocol_instance.rs @@ -4,7 +4,10 @@ use std::iter; use eth_types::{Address, Bytes, Hash, ToBigEndian, ToWord, Word, H256}; use keccak256::plain::Keccak; -use mock::{MOCK_ANCHOR_GAS_LIMIT, MOCK_TAIKO_L2_ADDRESS, MOCK_TAIKO_TREASURY_ADDRESS}; +use mock::{ + MOCK_ANCHOR_GAS_LIMIT, MOCK_ANCHOR_L1_HASH, MOCK_ANCHOR_L1_HIGHT, MOCK_ANCHOR_PARENT_GAS_USED, + MOCK_ANCHOR_SIGNAL_ROOT, MOCK_TAIKO_L2_ADDRESS, MOCK_TAIKO_TREASURY_ADDRESS, +}; /// hash(anchor) pub const ANCHOR_TX_METHOD_SIGNATURE: u32 = 0xda69d3db; @@ -48,21 +51,26 @@ pub struct ProtocolInstance { impl Default for ProtocolInstance { fn default() -> Self { Self { + anchor_gas_limit: MOCK_ANCHOR_GAS_LIMIT.as_u64(), + meta_hash: MetaHash { + l1_hash: *MOCK_ANCHOR_L1_HASH, + l1_height: *MOCK_ANCHOR_L1_HIGHT, + treasury: *MOCK_TAIKO_TREASURY_ADDRESS, + ..Default::default() + }, + signal_root: *MOCK_ANCHOR_SIGNAL_ROOT, + parent_gas_used: *MOCK_ANCHOR_PARENT_GAS_USED, l1_signal_service: Address::default(), l2_signal_service: Address::default(), l2_contract: *MOCK_TAIKO_L2_ADDRESS, - meta_hash: MetaHash::default(), block_hash: Hash::default(), parent_hash: Hash::default(), - signal_root: Hash::default(), graffiti: H256::default(), prover: Address::default(), gas_used: 0, - parent_gas_used: 0, block_max_gas_limit: 0, max_transactions_per_block: 0, max_bytes_per_tx_list: 0, - anchor_gas_limit: MOCK_ANCHOR_GAS_LIMIT.as_u64(), } } } diff --git a/bus-mapping/src/mock.rs b/bus-mapping/src/mock.rs index 8997a1a12f..60abe4ce8b 100644 --- a/bus-mapping/src/mock.rs +++ b/bus-mapping/src/mock.rs @@ -40,7 +40,7 @@ impl BlockData { Word::default(), &self.eth_block, self.circuits_params, - Default::default(), + None, ) .unwrap(), ) diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index e15ee53eec..30a2e7878c 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -91,6 +91,8 @@ pub struct TestContext { pub eth_block: eth_types::Block, /// Execution Trace from geth pub geth_traces: Vec, + /// In taiko context + pub is_taiko: bool, } impl From> for GethData { @@ -226,6 +228,7 @@ impl TestContext { history_hashes: history_hashes.unwrap_or_default(), eth_block: block, geth_traces, + is_taiko, }) } diff --git a/zkevm-circuits/src/bin/stats/helpers.rs b/zkevm-circuits/src/bin/stats/helpers.rs index 01117a48c0..b6eff95ff6 100644 --- a/zkevm-circuits/src/bin/stats/helpers.rs +++ b/zkevm-circuits/src/bin/stats/helpers.rs @@ -114,10 +114,12 @@ pub(crate) fn print_circuit_stats_by_states( // circuit input builder Block, the current execution state, and the step index in circuit // input builder tx. fn_height: impl Fn(&circuit_input_builder::Block, ExecutionState, usize) -> usize, + // in taiko context + is_taiko: bool, ) { let mut implemented_states = Vec::new(); for state in ExecutionState::iter() { - let height = state.get_step_height_option(); + let height = state.get_step_height_option(is_taiko); if height.is_some() { implemented_states.push(state); } diff --git a/zkevm-circuits/src/bin/stats/main.rs b/zkevm-circuits/src/bin/stats/main.rs index 30c8fc9a27..c910700c86 100644 --- a/zkevm-circuits/src/bin/stats/main.rs +++ b/zkevm-circuits/src/bin/stats/main.rs @@ -18,16 +18,19 @@ fn main() { let args: Vec = env::args().collect(); match &args[1][..] { - "evm" => evm_states_stats(), - "state" => state_states_stats(), - "copy" => copy_states_stats(), + "evm" => evm_states_stats(false), + "taiko_evm" => evm_states_stats(true), + "state" => state_states_stats(false), + "tako_state" => state_states_stats(true), + "copy" => copy_states_stats(false), + "taiko_copy" => copy_states_stats(true), "exec" => get_exec_steps_occupancy(), &_ => unreachable!("Unsupported arg"), } } /// Prints the stats of EVM circuit per execution state. -fn evm_states_stats() { +fn evm_states_stats(is_taiko: bool) { print_circuit_stats_by_states( |state| { // TODO: Enable CREATE/CREATE2 once they are supported @@ -60,12 +63,13 @@ fn evm_states_stats() { PUSH2(0x50) }, }, - |_, state, _| state.get_step_height_option().unwrap(), + |_, state, _| state.get_step_height_option(is_taiko).unwrap(), + is_taiko, ); } /// Prints the stats of State circuit per execution state. -fn state_states_stats() { +fn state_states_stats(is_taiko: bool) { print_circuit_stats_by_states( |state| { // TODO: Enable CREATE/CREATE2 once they are supported @@ -83,11 +87,12 @@ fn state_states_stats() { let step_next = &block.txs[0].steps()[step_index + 1]; step_next.rwc.0 - step.rwc.0 }, + is_taiko, ); } /// Prints the stats of Copy circuit per execution state. -fn copy_states_stats() { +fn copy_states_stats(is_taiko: bool) { print_circuit_stats_by_states( |state| { // TODO: Enable CREATE/CREATE2 once they are supported @@ -110,6 +115,7 @@ fn copy_states_stats() { .map(|c| c.bytes.len() * 2) .sum::() }, + is_taiko, ); } diff --git a/zkevm-circuits/src/evm_circuit.rs b/zkevm-circuits/src/evm_circuit.rs index 7cfaedf9d7..38830813fc 100644 --- a/zkevm-circuits/src/evm_circuit.rs +++ b/zkevm-circuits/src/evm_circuit.rs @@ -226,7 +226,7 @@ impl EvmCircuit { let mut num_rows = 0; for transaction in &block.txs { for step in &transaction.steps { - num_rows += step.execution_state().get_step_height(); + num_rows += step.execution_state().get_step_height(block.is_taiko()); } } @@ -321,6 +321,15 @@ pub(crate) mod cached { let config = EvmCircuit::::configure(&mut meta); Cache { cs: meta, config } }; + + static ref CACHE_WITH_TAIKO: Cache = { + let mut meta = ConstraintSystem::::default(); + let config = EvmCircuit::::configure_with_params( + &mut meta, + EvmCircuitParams { is_taiko: true }, + ); + Cache { cs: meta, config } + }; } /// Wrapper over the EvmCircuit that behaves the same way and also @@ -333,15 +342,31 @@ pub(crate) mod cached { impl Circuit for EvmCircuitCached { type Config = (EvmCircuitConfig, Challenges); type FloorPlanner = SimpleFloorPlanner; - type Params = (); + type Params = EvmCircuitParams; fn without_witnesses(&self) -> Self { Self(self.0.without_witnesses()) } fn configure(meta: &mut ConstraintSystem) -> Self::Config { - *meta = CACHE.cs.clone(); - CACHE.config.clone() + Self::configure_with_params(meta, Default::default()) + } + + fn params(&self) -> Self::Params { + self.0.params() + } + + fn configure_with_params( + meta: &mut ConstraintSystem, + EvmCircuitParams { is_taiko }: Self::Params, + ) -> Self::Config { + if is_taiko { + *meta = CACHE_WITH_TAIKO.cs.clone(); + CACHE_WITH_TAIKO.config.clone() + } else { + *meta = CACHE.cs.clone(); + CACHE.config.clone() + } } fn synthesize( @@ -380,6 +405,12 @@ impl Circuit for EvmCircuit { Self::configure_with_params(meta, Self::Params::default()) } + fn params(&self) -> Self::Params { + EvmCircuitParams { + is_taiko: self.block.as_ref().unwrap().is_taiko(), + } + } + fn configure_with_params( meta: &mut ConstraintSystem, EvmCircuitParams { is_taiko }: Self::Params, diff --git a/zkevm-circuits/src/evm_circuit/execution.rs b/zkevm-circuits/src/evm_circuit/execution.rs index f3dfcd5bab..6863abc10a 100644 --- a/zkevm-circuits/src/evm_circuit/execution.rs +++ b/zkevm-circuits/src/evm_circuit/execution.rs @@ -937,7 +937,7 @@ impl ExecutionConfig { if next.is_none() { break; } - let height = step.execution_state().get_step_height(); + let height = step.execution_state().get_step_height(block.is_taiko()); // Assign the step witness self.assign_exec_step( @@ -968,7 +968,7 @@ impl ExecutionConfig { ); // return Err(Error::Synthesis); } - let height = ExecutionState::EndBlock.get_step_height(); + let height = ExecutionState::EndBlock.get_step_height(block.is_taiko()); debug_assert_eq!(height, 1); let last_row = evm_rows - 1; log::trace!( @@ -995,7 +995,7 @@ impl ExecutionConfig { } // part3: assign the last EndBlock at offset `evm_rows - 1` - let height = ExecutionState::EndBlock.get_step_height(); + let height = ExecutionState::EndBlock.get_step_height(block.is_taiko()); debug_assert_eq!(height, 1); log::trace!("assign last EndBlock at offset {}", offset); self.assign_exec_step( diff --git a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs index daf9261ff1..cb3eed29ab 100644 --- a/zkevm-circuits/src/evm_circuit/execution/end_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/end_tx.rs @@ -463,7 +463,7 @@ mod test { // Multiple txs test_ok( // Get the execution steps from the external tracer - TestContext::<2, 3>::new( + TestContext::<2, 3>::new_with_taiko( None, account_0_code_account_1_no_code(bytecode! { STOP }), |mut txs, accs| { diff --git a/zkevm-circuits/src/evm_circuit/param.rs b/zkevm-circuits/src/evm_circuit/param.rs index ec761b4e6f..f888a68734 100644 --- a/zkevm-circuits/src/evm_circuit/param.rs +++ b/zkevm-circuits/src/evm_circuit/param.rs @@ -1,4 +1,4 @@ -use super::table::Table; +use super::{table::Table, EvmCircuitParams}; use crate::evm_circuit::{step::ExecutionState, EvmCircuit}; use halo2_proofs::{ halo2curves::bn256::Fr, @@ -109,6 +109,7 @@ pub(crate) const N_BYTES_CALLDATASIZE: usize = N_BYTES_U64; lazy_static::lazy_static! { // Step slot height in evm circuit pub(crate) static ref EXECUTION_STATE_HEIGHT_MAP : HashMap = get_step_height_map(); + pub(crate) static ref EXECUTION_STATE_HEIGHT_MAP_WITH_TAIKO : HashMap = get_step_height_map_with_taiko(); } fn get_step_height_map() -> HashMap { let mut meta = ConstraintSystem::::default(); @@ -116,3 +117,10 @@ fn get_step_height_map() -> HashMap { circuit.0.execution.height_map } + +fn get_step_height_map_with_taiko() -> HashMap { + let mut meta = ConstraintSystem::::default(); + let circuit = EvmCircuit::configure_with_params(&mut meta, EvmCircuitParams { is_taiko: true }); + + circuit.0.execution.height_map +} diff --git a/zkevm-circuits/src/evm_circuit/step.rs b/zkevm-circuits/src/evm_circuit/step.rs index e26c095ac8..82da70e3de 100644 --- a/zkevm-circuits/src/evm_circuit/step.rs +++ b/zkevm-circuits/src/evm_circuit/step.rs @@ -1,4 +1,7 @@ -use super::util::{CachedRegion, CellManager, CellType}; +use super::{ + param::EXECUTION_STATE_HEIGHT_MAP_WITH_TAIKO, + util::{CachedRegion, CellManager, CellType}, +}; use crate::{ evm_circuit::{ param::{EXECUTION_STATE_HEIGHT_MAP, MAX_STEP_HEIGHT, STEP_STATE_HEIGHT, STEP_WIDTH}, @@ -479,12 +482,16 @@ impl ExecutionState { .collect() } - pub fn get_step_height_option(&self) -> Option { - EXECUTION_STATE_HEIGHT_MAP.get(self).copied() + pub fn get_step_height_option(&self, is_taiko: bool) -> Option { + if is_taiko { + EXECUTION_STATE_HEIGHT_MAP_WITH_TAIKO.get(self).copied() + } else { + EXECUTION_STATE_HEIGHT_MAP.get(self).copied() + } } - pub fn get_step_height(&self) -> usize { - self.get_step_height_option() + pub fn get_step_height(&self, is_taiko: bool) -> usize { + self.get_step_height_option(is_taiko) .unwrap_or_else(|| panic!("Execution state unknown: {:?}", self)) } } diff --git a/zkevm-circuits/src/taiko_super_circuit.rs b/zkevm-circuits/src/taiko_super_circuit.rs index b8179e92ff..bc40afdb83 100644 --- a/zkevm-circuits/src/taiko_super_circuit.rs +++ b/zkevm-circuits/src/taiko_super_circuit.rs @@ -295,16 +295,19 @@ impl SuperCircuit { pub fn build( geth_data: GethData, circuits_params: CircuitsParams, - protocol_instance: ProtocolInstance, + mut protocol_instance: ProtocolInstance, ) -> Result<(u32, Self, Vec>, CircuitInputBuilder), bus_mapping::Error> { let block_data = BlockData::new_from_geth_data_with_params(geth_data.clone(), circuits_params); let mut builder = block_data.new_circuit_input_builder(); + protocol_instance.block_hash = geth_data.eth_block.hash.unwrap(); + protocol_instance.parent_hash = geth_data.eth_block.parent_hash; + builder.block.protocol_instance = Some(protocol_instance); builder .handle_block(&geth_data.eth_block, &geth_data.geth_traces) .expect("could not handle block tx"); - let ret = Self::build_from_circuit_input_builder(&builder, protocol_instance)?; + let ret = Self::build_from_circuit_input_builder(&builder)?; Ok((ret.0, ret.1, ret.2, builder)) } @@ -315,12 +318,8 @@ impl SuperCircuit { /// the Public Inputs needed. pub fn build_from_circuit_input_builder( builder: &CircuitInputBuilder, - protocol_instance: ProtocolInstance, ) -> Result<(u32, Self, Vec>), bus_mapping::Error> { - let mut block = block_convert(&builder.block, &builder.code_db).unwrap(); - block.protocol_instance = Some(protocol_instance); - block.protocol_instance.as_mut().unwrap().block_hash = block.eth_block.hash.unwrap(); - block.protocol_instance.as_mut().unwrap().parent_hash = block.eth_block.parent_hash; + let block = block_convert(&builder.block, &builder.code_db).unwrap(); let (_, rows_needed) = Self::min_num_rows_block(&block); let k = log2_ceil(Self::unusable_rows() + rows_needed); log::debug!("super circuit uses k = {}", k); diff --git a/zkevm-circuits/src/taiko_super_circuit/test.rs b/zkevm-circuits/src/taiko_super_circuit/test.rs index 3807bb0ccd..a3738992bf 100644 --- a/zkevm-circuits/src/taiko_super_circuit/test.rs +++ b/zkevm-circuits/src/taiko_super_circuit/test.rs @@ -4,7 +4,10 @@ use bus_mapping::circuit_input_builder::MetaHash; use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; use log::error; -use mock::{TestContext, MOCK_CHAIN_ID}; +use mock::{ + TestContext, MOCK_ANCHOR_GAS_LIMIT, MOCK_ANCHOR_L1_HASH, MOCK_ANCHOR_L1_HIGHT, + MOCK_ANCHOR_PARENT_GAS_USED, MOCK_ANCHOR_SIGNAL_ROOT, MOCK_CHAIN_ID, +}; use rand::SeedableRng; use rand_chacha::ChaCha20Rng; use std::str::FromStr; @@ -144,30 +147,9 @@ fn serial_test_super_circuit_1tx_1max_tx() { let parent_hash = Hash::from_str("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49346") .unwrap(); - let protocol_instance = ProtocolInstance { - anchor_gas_limit: 150000, - block_hash, - parent_hash, - meta_hash: MetaHash { - l1_hash: block_hash, - l1_height: 20, - ..Default::default() - }, - signal_root: block_hash, - parent_gas_used: 2000, - ..Default::default() - }; + let protocol_instance = ProtocolInstance::default(); let mut block = block_1tx(); - let circuits_params = CircuitsParams { - max_txs: 2, - max_calldata: 200, - max_rws: 256, - max_copy_rows: 256, - max_exp_steps: 256, - max_bytecode: 512, - max_evm_rows: 0, - max_keccak_rows: 0, - }; + let circuits_params = CircuitsParams::default(); block.eth_block.hash = Some(block_hash); block.eth_block.parent_hash = parent_hash; block.history_hashes = vec![block.eth_block.parent_hash.to_word()]; diff --git a/zkevm-circuits/src/test_util.rs b/zkevm-circuits/src/test_util.rs index 99ba2dfd56..2b026640a4 100644 --- a/zkevm-circuits/src/test_util.rs +++ b/zkevm-circuits/src/test_util.rs @@ -6,7 +6,10 @@ use crate::{ util::SubCircuit, witness::{Block, Rw}, }; -use bus_mapping::{circuit_input_builder::CircuitsParams, mock::BlockData}; +use bus_mapping::{ + circuit_input_builder::{CircuitsParams, ProtocolInstance}, + mock::BlockData, +}; use eth_types::geth_types::GethData; use std::cmp; @@ -190,9 +193,14 @@ impl CircuitTestBuilder { let block: Block = if self.block.is_some() { self.block.unwrap() } else if self.test_ctx.is_some() { - let block: GethData = self.test_ctx.unwrap().into(); + let test_ctx = self.test_ctx.unwrap(); + let is_taiko = test_ctx.is_taiko; + let block: GethData = test_ctx.into(); let mut builder = BlockData::new_from_geth_data_with_params(block.clone(), params) .new_circuit_input_builder(); + if is_taiko { + builder.block.protocol_instance = Some(ProtocolInstance::default()); + } builder .handle_block(&block.eth_block, &block.geth_traces) .unwrap(); From 4322b329c7b96b5ab020c785c9ff5b1b176ec54f Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sun, 20 Aug 2023 08:59:29 +0000 Subject: [PATCH 39/55] fix: only support gas_tip_cap and gas_fee_cap --- bus-mapping/src/evm/opcodes/gasprice.rs | 6 +++++- geth-utils/src/lib.rs | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bus-mapping/src/evm/opcodes/gasprice.rs b/bus-mapping/src/evm/opcodes/gasprice.rs index 44f0c60de4..c042372d76 100644 --- a/bus-mapping/src/evm/opcodes/gasprice.rs +++ b/bus-mapping/src/evm/opcodes/gasprice.rs @@ -95,7 +95,11 @@ mod gasprice_tests { (op_gasprice.rw(), op_gasprice.op()), ( RW::WRITE, - &StackOp::new(1, StackAddress(1023usize), two_gwei) + &StackOp::new( + 1, + StackAddress(1023usize), + builder.block.txs()[0].tx.gas_price + ) ) ); diff --git a/geth-utils/src/lib.rs b/geth-utils/src/lib.rs index 60a237164f..07716e927f 100644 --- a/geth-utils/src/lib.rs +++ b/geth-utils/src/lib.rs @@ -97,7 +97,8 @@ mod test { "from": "0x00000000000000000000000000000000000000fe", "to": "0x00000000000000000000000000000000000000ff", "gas_limit": "0x5208", - "gas_price": "0x77359400" + "gas_tip_cap": "0x77359400", + "gas_fee_cap": "0x77359400" } ] }"#, @@ -131,7 +132,8 @@ mod test { "from": "0x00000000000000000000000000000000000000fe", "to": "0x00000000000000000000000000000000000000ff", "gas_limit": "0x5208", - "gas_price": "0x1111" + "gas_tip_cap": "0x1111", + "gas_fee_cap": "0x1111" } ] }"#, @@ -150,7 +152,8 @@ mod test { ] }"#, ] { - assert!(trace(config).is_err()) + let _trace = trace(config); + assert!(_trace.is_err()) } } } From 10f4077151c15ef82066d19b6dc0ae2b38e758a2 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sun, 20 Aug 2023 09:24:13 +0000 Subject: [PATCH 40/55] chore: ignore unhelpful tests --- Makefile | 2 +- zkevm-circuits/src/pi_circuit.rs | 10 +++++----- zkevm-circuits/src/root_circuit.rs | 5 +++-- zkevm-circuits/src/super_circuit.rs | 5 +++-- zkevm-circuits/src/taiko_super_circuit/test.rs | 10 ++-------- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 84eff15d85..92abd72d92 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ test: ## Run tests for all the workspace members # Run light tests @cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks --exclude testool # Run heavy tests serially to avoid OOM - @cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks --exclude testool serial_ -- --ignored --test-threads 1 + @cargo test --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks --exclude testool serial_ -- --ignored # --test-threads 1 test_doc: ## Test the docs diff --git a/zkevm-circuits/src/pi_circuit.rs b/zkevm-circuits/src/pi_circuit.rs index 70d5221997..123428bea2 100644 --- a/zkevm-circuits/src/pi_circuit.rs +++ b/zkevm-circuits/src/pi_circuit.rs @@ -3,8 +3,11 @@ mod param; #[cfg(any(feature = "test", test, feature = "test-circuits"))] mod dev; -#[cfg(any(feature = "test", test))] -mod test; + +// FIXME: ignore unused long-time running tests +// #[cfg(any(feature = "test", test))] +// #[cfg(any(feature = "test", test))] +// mod test; use eth_types::{ geth_types::{BlockConstants, Transaction}, @@ -34,9 +37,6 @@ use halo2_proofs::{ #[cfg(any(feature = "test", test, feature = "test-circuits"))] use halo2_proofs::{circuit::SimpleFloorPlanner, plonk::Circuit}; -// FIXME: for now TX_LEN without gas_tip_cap and gas_fee_cap -const TX_LEN: usize = 13; - /// Values of the block table (as in the spec) #[derive(Clone, Default, Debug)] pub struct BlockValues { diff --git a/zkevm-circuits/src/root_circuit.rs b/zkevm-circuits/src/root_circuit.rs index e1bfa9b25c..9370a28179 100644 --- a/zkevm-circuits/src/root_circuit.rs +++ b/zkevm-circuits/src/root_circuit.rs @@ -17,8 +17,9 @@ pub mod taiko_aggregation; pub use taiko_aggregation::TaikoAggregationCircuit; -#[cfg(any(feature = "test", test))] -mod test; +// FIXME: ignore unused long-time running tests +// #[cfg(any(feature = "test", test))] +// mod test; #[cfg(any(feature = "test", test, feature = "test-circuits"))] pub use self::RootCircuit as TestRootCircuit; diff --git a/zkevm-circuits/src/super_circuit.rs b/zkevm-circuits/src/super_circuit.rs index 98ced60898..32734b4ea7 100644 --- a/zkevm-circuits/src/super_circuit.rs +++ b/zkevm-circuits/src/super_circuit.rs @@ -50,8 +50,9 @@ //! - [x] Tx Circuit //! - [ ] MPT Circuit -#[cfg(any(feature = "test", test))] -pub(crate) mod test; +// FIXME: ignore unused long-time running tests +// #[cfg(any(feature = "test", test))] +// pub(crate) mod test; use crate::{ bytecode_circuit::circuit::{ diff --git a/zkevm-circuits/src/taiko_super_circuit/test.rs b/zkevm-circuits/src/taiko_super_circuit/test.rs index a3738992bf..75c6f7de0f 100644 --- a/zkevm-circuits/src/taiko_super_circuit/test.rs +++ b/zkevm-circuits/src/taiko_super_circuit/test.rs @@ -158,10 +158,7 @@ fn serial_test_super_circuit_1tx_1max_tx() { #[ignore] #[test] fn taiko_serial_test_super_circuit_1tx_3max_tx() { - let protocol_instance = ProtocolInstance { - anchor_gas_limit: 150000, - ..Default::default() - }; + let protocol_instance = ProtocolInstance::default(); let block = block_1tx(); let circuits_params = CircuitsParams { max_txs: 3, @@ -178,10 +175,7 @@ fn taiko_serial_test_super_circuit_1tx_3max_tx() { #[ignore] #[test] fn taiko_serial_test_super_circuit_2tx_3max_tx() { - let protocol_instance = ProtocolInstance { - anchor_gas_limit: 150000, - ..Default::default() - }; + let protocol_instance = ProtocolInstance::default(); let block = block_2tx(); let circuits_params = CircuitsParams { max_txs: 3, From fb15f1637b451df73b4ebaca4c450a88f0091a3a Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sun, 20 Aug 2023 09:43:42 +0000 Subject: [PATCH 41/55] fix: taiko_super tests --- zkevm-circuits/src/pi_circuit.rs | 1 + zkevm-circuits/src/taiko_super_circuit/test.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/zkevm-circuits/src/pi_circuit.rs b/zkevm-circuits/src/pi_circuit.rs index 123428bea2..c656ccc555 100644 --- a/zkevm-circuits/src/pi_circuit.rs +++ b/zkevm-circuits/src/pi_circuit.rs @@ -21,6 +21,7 @@ use std::marker::PhantomData; use crate::{ table::{BlockTable, LookupTable, TxFieldTag, TxTable}, + tx_circuit::TX_LEN, util::{random_linear_combine_word as rlc, Challenges, SubCircuit, SubCircuitConfig}, witness, }; diff --git a/zkevm-circuits/src/taiko_super_circuit/test.rs b/zkevm-circuits/src/taiko_super_circuit/test.rs index 75c6f7de0f..f661af7a4e 100644 --- a/zkevm-circuits/src/taiko_super_circuit/test.rs +++ b/zkevm-circuits/src/taiko_super_circuit/test.rs @@ -99,7 +99,7 @@ fn block_2tx() -> GethData { let addr_a = wallet_a.address(); let addr_b = address!("0x000000000000000000000000000000000000BBBB"); - let mut block: GethData = TestContext::<2, 2>::new( + let mut block: GethData = TestContext::<2, 2>::new_with_taiko( None, |accs| { accs[0] From 1c8cb90dc8997d49266815a62cb02d84fbe0de7f Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sun, 20 Aug 2023 11:51:24 +0000 Subject: [PATCH 42/55] fix: naming style --- mock/src/test_ctx.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index 30a2e7878c..6b7e982197 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -303,7 +303,7 @@ pub fn gen_geth_traces( accounts: Vec, history_hashes: Option>, logger_config: LoggerConfig, - use_anchor: bool, + is_taiko: bool, ) -> Result, Error> { let trace_config = TraceConfig { chain_id, @@ -319,7 +319,7 @@ pub fn gen_geth_traces( .map(eth_types::geth_types::Transaction::from) .collect(), logger_config, - taiko: use_anchor, + taiko: is_taiko, }; let traces = trace(&trace_config)?; Ok(traces) From 46c5125600abcf8b351d9d0324d262d6f9e60b2d Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 2 Jun 2023 19:07:26 +0800 Subject: [PATCH 43/55] feat: add `shanghai` feature and make CI pass with Shanghai geth traces (#1424) 1. Add Shanghai related fields to chain config in geth-utils. 2. EIP-3651 (Warm COINBASE): add a new access-list write for coinbase to Begin TX. 3. Part of EIP-3860 (Limit and meter initcode): only add gas cost of init code to Begin TX (missing gas cost changes in Create and OOG Create). Issue https://github.com/privacy-scaling-explorations/zkevm-circuits/issues/1362 Local related PRs: https://github.com/scroll-tech/zkevm-circuits/pull/497 https://github.com/scroll-tech/zkevm-circuits/pull/500 https://github.com/scroll-tech/zkevm-circuits/pull/507 Reference previous PR: https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/1361 - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) Unit test cases of CI could pass with Shanghai geth traces. --------- Co-authored-by: Zhang Zhuo --- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 14 ++- bus-mapping/src/evm/opcodes/extcodesize.rs | 4 +- eth-types/src/evm_types.rs | 2 + external-tracer/src/lib.rs | 5 +- geth-utils/gethutil/trace.go | 31 ++++--- geth-utils/src/lib.rs | 3 +- mock/src/anchor.rs | 6 +- mock/src/test_ctx.rs | 2 +- .../src/evm_circuit/execution/begin_tx.rs | 88 ++++++++++++++++--- 9 files changed, 111 insertions(+), 44 deletions(-) diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index fb8784442e..a65e2561be 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -59,8 +59,8 @@ fn gen_begin_tx_steps(state: &mut CircuitInputStateRef) -> Result Result for u64 { } } +/// Once per word of the init code when creating a contract. +pub const INIT_CODE_WORD_GAS: u64 = 2; /// Quotient for max refund of gas used pub const MAX_REFUND_QUOTIENT_OF_GAS_USED: usize = 5; /// Gas stipend when CALL or CALLCODE is attached with value. diff --git a/external-tracer/src/lib.rs b/external-tracer/src/lib.rs index 28f8cd35d9..539777bda3 100644 --- a/external-tracer/src/lib.rs +++ b/external-tracer/src/lib.rs @@ -29,18 +29,15 @@ pub struct TraceConfig { /// Configuration structure for `logger.Config` #[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "PascalCase")] pub struct LoggerConfig { /// enable memory capture - #[serde(rename = "EnableMemory")] pub enable_memory: bool, /// disable stack capture - #[serde(rename = "DisableStack")] pub disable_stack: bool, /// disable storage capture - #[serde(rename = "DisableStorage")] pub disable_storage: bool, /// enable return data capture - #[serde(rename = "EnableReturnData")] pub enable_return_data: bool, } diff --git a/geth-utils/gethutil/trace.go b/geth-utils/gethutil/trace.go index 13f4182d42..39cd78b894 100644 --- a/geth-utils/gethutil/trace.go +++ b/geth-utils/gethutil/trace.go @@ -130,22 +130,21 @@ func newUint64(val uint64) *uint64 { return &val } func Trace(config TraceConfig) ([]*ExecutionResult, error) { chainConfig := params.ChainConfig{ - ChainID: toBigInt(config.ChainID), - HomesteadBlock: big.NewInt(0), - DAOForkBlock: big.NewInt(0), - DAOForkSupport: true, - EIP150Block: big.NewInt(0), - EIP155Block: big.NewInt(0), - EIP158Block: big.NewInt(0), - ByzantiumBlock: big.NewInt(0), - ConstantinopleBlock: big.NewInt(0), - PetersburgBlock: big.NewInt(0), - IstanbulBlock: big.NewInt(0), - MuirGlacierBlock: big.NewInt(0), - BerlinBlock: big.NewInt(0), - LondonBlock: big.NewInt(0), - // FIXME: EIP-3860 - // ShanghaiTime: newUint64(0), + ChainID: toBigInt(config.ChainID), + HomesteadBlock: big.NewInt(0), + DAOForkBlock: big.NewInt(0), + DAOForkSupport: true, + EIP150Block: big.NewInt(0), + EIP155Block: big.NewInt(0), + EIP158Block: big.NewInt(0), + ByzantiumBlock: big.NewInt(0), + ConstantinopleBlock: big.NewInt(0), + PetersburgBlock: big.NewInt(0), + IstanbulBlock: big.NewInt(0), + MuirGlacierBlock: big.NewInt(0), + BerlinBlock: big.NewInt(0), + LondonBlock: big.NewInt(0), + ShanghaiTime: newUint64(0), MergeNetsplitBlock: nil, TerminalTotalDifficulty: common.Big0, TerminalTotalDifficultyPassed: true, diff --git a/geth-utils/src/lib.rs b/geth-utils/src/lib.rs index 07716e927f..66f1539306 100644 --- a/geth-utils/src/lib.rs +++ b/geth-utils/src/lib.rs @@ -152,8 +152,7 @@ mod test { ] }"#, ] { - let _trace = trace(config); - assert!(_trace.is_err()) + assert!(trace(config).is_err()) } } } diff --git a/mock/src/anchor.rs b/mock/src/anchor.rs index 8de3170c64..9d406869ed 100644 --- a/mock/src/anchor.rs +++ b/mock/src/anchor.rs @@ -7,7 +7,7 @@ use eth_types::{ sign_types::{biguint_to_32bytes_le, ct_option_ok_or, sign as eth_sign, SignData, SECP256K1_Q}, word, Bytes, ToBigEndian, ToLittleEndian, ToWord, Word, U256, }; -use ethers_core::types::Eip1559TransactionRequest; +use ethers_core::types::{transaction::eip2718::TypedTransaction, Eip1559TransactionRequest}; use halo2_proofs::{ arithmetic::Field as _, halo2curves::{ @@ -29,7 +29,9 @@ static GX2: Lazy = fn fixd_k_sign(anchor_tx: &Transaction, chain_id: u64) -> Result { // msg = rlp([nonce, gasPrice, gas, to, value, data, sig_v, r, s]) let req: Eip1559TransactionRequest = anchor_tx.into(); - let msg = req.chain_id(chain_id).rlp(); + let req = req.chain_id(chain_id); + let req: TypedTransaction = req.into(); + let msg = req.rlp(); let msg_hash: [u8; 32] = Keccak256::digest(&msg) .as_slice() .to_vec() diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index 6b7e982197..a985aa903c 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -286,7 +286,7 @@ impl TestContext { /// account_0_code_account_1_no_code`]. Extra accounts, txs and/or block /// configs are set as [`Default`]. pub fn simple_ctx_with_bytecode(bytecode: Bytecode) -> Result, Error> { - TestContext::<2, 1>::new( + TestContext::new( None, account_0_code_account_1_no_code(bytecode), tx_from_1_to_0, diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 985b67570f..dc1a2f7fca 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -1,7 +1,7 @@ use crate::{ evm_circuit::{ execution::ExecutionGadget, - param::{N_BYTES_ACCOUNT_ADDRESS, N_BYTES_GAS, N_BYTES_WORD}, + param::{N_BYTES_ACCOUNT_ADDRESS, N_BYTES_GAS, N_BYTES_U64, N_BYTES_WORD}, step::ExecutionState, util::{ and, @@ -12,14 +12,16 @@ use crate::{ }, is_precompiled, math_gadget::{ - ContractCreateGadget, IsEqualGadget, IsZeroGadget, MulWordByU64Gadget, - RangeCheckGadget, + ConstantDivisionGadget, ContractCreateGadget, IsEqualGadget, IsZeroGadget, + MulWordByU64Gadget, RangeCheckGadget, }, not, or, select, CachedRegion, Cell, StepRws, Word, }, witness::{Block, Call, ExecStep, Transaction}, }, - table::{AccountFieldTag, CallContextFieldTag, TxFieldTag as TxContextFieldTag}, + table::{ + AccountFieldTag, BlockContextFieldTag, CallContextFieldTag, TxFieldTag as TxContextFieldTag, + }, util::Expr, }; use eth_types::{evm_types::GasCost, Field, ToLittleEndian, ToScalar}; @@ -42,6 +44,7 @@ pub(crate) struct BeginTxGadget { tx_value: Word, tx_call_data_length: Cell, tx_call_data_gas_cost: Cell, + tx_call_data_word_length: ConstantDivisionGadget, reversion_info: ReversionInfo, sufficient_gas_left: RangeCheckGadget, transfer_with_gas_fee: TransferWithGasFeeGadget, @@ -51,6 +54,12 @@ pub(crate) struct BeginTxGadget { create: ContractCreateGadget, callee_not_exists: IsZeroGadget, is_caller_callee_equal: Cell, + // EIP-3651 (Warm COINBASE) + coinbase: Cell, + // Caller, callee and a list addresses are added to the access list before + // coinbase, and may be duplicate. + // + is_coinbase_warm: Cell, } impl ExecutionGadget for BeginTxGadget { @@ -126,13 +135,25 @@ impl ExecutionGadget for BeginTxGadget { let mul_gas_fee_by_gas = MulWordByU64Gadget::construct(cb, tx_gas_price.clone(), tx_gas.expr()); + let tx_call_data_word_length = + ConstantDivisionGadget::construct(cb, tx_call_data_length.expr() + 31.expr(), 32); + + // Calculate gas cost of init code for EIP-3860. + let init_code_gas_cost = select::expr( + tx_is_create.expr(), + tx_call_data_word_length.quotient().expr() + * eth_types::evm_types::INIT_CODE_WORD_GAS.expr(), + 0.expr(), + ); + // TODO: Take gas cost of access list (EIP 2930) into consideration. // Use intrinsic gas let intrinsic_gas_cost = select::expr( tx_is_create.expr(), GasCost::CREATION_TX.expr(), GasCost::TX.expr(), - ) + tx_call_data_gas_cost.expr(); + ) + tx_call_data_gas_cost.expr() + + init_code_gas_cost; // Check gas_left is sufficient let gas_left = tx_gas.expr() - intrinsic_gas_cost; @@ -157,6 +178,18 @@ impl ExecutionGadget for BeginTxGadget { None, ); // rwc_delta += 1 + // Query coinbase address. + let coinbase = cb.query_cell(); + let is_coinbase_warm = cb.query_bool(); + cb.block_lookup(BlockContextFieldTag::Coinbase.expr(), None, coinbase.expr()); + cb.account_access_list_write( + tx_id.expr(), + coinbase.expr(), + 1.expr(), + is_coinbase_warm.expr(), + None, + ); // rwc_delta += 1 + // Read code_hash of callee let phase2_code_hash = cb.query_cell_phase2(); let is_empty_code_hash = @@ -261,8 +294,9 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsPersistent // - Write CallContext IsSuccess // - Write Account (Caller) Nonce - // - Write TxAccessListAccount - // - Write TxAccessListAccount + // - Write TxAccessListAccount (Caller) + // - Write TxAccessListAccount (Callee) + // - Write TxAccessListAccount (Coinbase) for EIP-3651 // - a TransferWithGasFeeGadget // - Write Account (Callee) Nonce (Reversible) // - Write CallContext Depth @@ -278,7 +312,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsRoot // - Write CallContext IsCreate // - Write CallContext CodeHash - rw_counter: Delta(21.expr() + transfer_with_gas_fee.rw_delta()), + rw_counter: Delta(22.expr() + transfer_with_gas_fee.rw_delta()), call_id: To(call_id.expr()), is_root: To(true.expr()), is_create: To(tx_is_create.expr()), @@ -317,11 +351,12 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsPersistent // - Write CallContext IsSuccess // - Write Account Nonce - // - Write TxAccessListAccount - // - Write TxAccessListAccount + // - Write TxAccessListAccount (Caller) + // - Write TxAccessListAccount (Callee) + // - Write TxAccessListAccount (Coinbase) for EIP-3651 // - Read Account CodeHash // - a TransferWithGasFeeGadget - rw_counter: Delta(8.expr() + transfer_with_gas_fee.rw_delta()), + rw_counter: Delta(9.expr() + transfer_with_gas_fee.rw_delta()), call_id: To(call_id.expr()), ..StepStateTransition::any() }); @@ -361,8 +396,9 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsPersistent // - Write CallContext IsSuccess // - Write Account Nonce - // - Write TxAccessListAccount - // - Write TxAccessListAccount + // - Write TxAccessListAccount (Caller) + // - Write TxAccessListAccount (Callee) + // - Write TxAccessListAccount (Coinbase) for EIP-3651 // - Read Account CodeHash // - a TransferWithGasFeeGadget // - Write CallContext Depth @@ -378,7 +414,7 @@ impl ExecutionGadget for BeginTxGadget { // - Write CallContext IsRoot // - Write CallContext IsCreate // - Write CallContext CodeHash - rw_counter: Delta(21.expr() + transfer_with_gas_fee.rw_delta()), + rw_counter: Delta(22.expr() + transfer_with_gas_fee.rw_delta()), call_id: To(call_id.expr()), is_root: To(true.expr()), is_create: To(tx_is_create.expr()), @@ -405,6 +441,7 @@ impl ExecutionGadget for BeginTxGadget { tx_value, tx_call_data_length, tx_call_data_gas_cost, + tx_call_data_word_length, reversion_info, sufficient_gas_left, transfer_with_gas_fee, @@ -414,6 +451,8 @@ impl ExecutionGadget for BeginTxGadget { create, callee_not_exists, is_caller_callee_equal, + coinbase, + is_coinbase_warm, } } @@ -431,6 +470,8 @@ impl ExecutionGadget for BeginTxGadget { let mut rws = StepRws::new(block, step); rws.offset_add(7); + + let is_coinbase_warm = rws.next().tx_access_list_value_pair().1; let mut callee_code_hash = zero; if !is_precompiled(&tx.callee_address) && !tx.is_create { callee_code_hash = rws.next().account_value_pair().1; @@ -503,6 +544,8 @@ impl ExecutionGadget for BeginTxGadget { offset, Value::known(F::from(tx.call_data_gas_cost)), )?; + self.tx_call_data_word_length + .assign(region, offset, tx.call_data_length as u128 + 31)?; self.reversion_info.assign( region, offset, @@ -556,6 +599,23 @@ impl ExecutionGadget for BeginTxGadget { None, )?; + self.coinbase.assign( + region, + offset, + Value::known( + block + .context + .coinbase + .to_scalar() + .expect("unexpected Address -> Scalar conversion failure"), + ), + )?; + self.is_coinbase_warm.assign( + region, + offset, + Value::known(F::from(is_coinbase_warm as u64)), + )?; + Ok(()) } } From 83027a2fc2c37ed763c39d5667a9fa904684b097 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Sun, 20 Aug 2023 13:54:31 +0000 Subject: [PATCH 44/55] fix: remove legacy tx signature --- eth-types/src/geth_types.rs | 19 ++----------------- eth-types/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 81487649da..6304efb5b0 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -8,7 +8,7 @@ use crate::{ use ethers_core::{ types::{ transaction::{eip2718::TypedTransaction, response}, - Eip1559TransactionRequest, NameOrAddress, TransactionRequest, + Eip1559TransactionRequest, NameOrAddress, }, utils::get_contract_address, }; @@ -193,21 +193,6 @@ impl From<&crate::Transaction> for Transaction { } } -impl From<&Transaction> for TransactionRequest { - fn from(tx: &Transaction) -> TransactionRequest { - TransactionRequest { - from: Some(tx.from), - to: tx.to.map(NameOrAddress::Address), - gas: Some(tx.gas_limit.to_word()), - gas_price: Some(tx.gas_price), - value: Some(tx.value), - data: Some(tx.call_data.clone()), - nonce: Some(tx.nonce.to_word()), - ..Default::default() - } - } -} - impl From<&Transaction> for Eip1559TransactionRequest { fn from(tx: &Transaction) -> Eip1559TransactionRequest { Eip1559TransactionRequest { @@ -348,7 +333,7 @@ impl GethData { let wallet = wallets.get(&tx.from).unwrap(); assert_eq!(Word::from(wallet.chain_id()), self.chain_id); let geth_tx: Transaction = (&*tx).into(); - let req: TransactionRequest = (&geth_tx).into(); + let req: Eip1559TransactionRequest = (&geth_tx).into(); let sig = wallet.sign_transaction_sync(&req.chain_id(self.chain_id.as_u64()).into()); tx.v = U64::from(sig.v); tx.r = sig.r; diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index e3417d6e50..f2e23e7345 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -723,7 +723,7 @@ mod eth_types_test { ..Default::default() }; - let req: ethers_core::types::TransactionRequest = tx.into(); + let req: ethers_core::types::Eip1559TransactionRequest = tx.into(); assert_eq!(req.to, None); Ok(()) } From be39d56ab72a867fc420cbb637ad4fefa9cd286a Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 03:39:55 +0000 Subject: [PATCH 45/55] fix: taiko super circuit benchmarks --- circuit-benchmarks/src/taiko_super_circuit.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/circuit-benchmarks/src/taiko_super_circuit.rs b/circuit-benchmarks/src/taiko_super_circuit.rs index 9318835689..f184ff0bde 100644 --- a/circuit-benchmarks/src/taiko_super_circuit.rs +++ b/circuit-benchmarks/src/taiko_super_circuit.rs @@ -158,10 +158,7 @@ fn gen_application_snark( max_evm_rows: 0, max_keccak_rows: 0, }; - let protocol_instance = ProtocolInstance { - anchor_gas_limit: 150000, - ..Default::default() - }; + let protocol_instance = ProtocolInstance::default(); let (_, super_circuit, _, _) = SuperCircuit::<_>::build(block_1tx(), circuits_params, protocol_instance).unwrap(); From 0b21c043a2df6b0def0c0cfdf3831bd7fbf15cd3 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 05:29:16 +0000 Subject: [PATCH 46/55] emm: need more than degree 24 to run aggregation --- circuit-benchmarks/src/taiko_super_circuit.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/circuit-benchmarks/src/taiko_super_circuit.rs b/circuit-benchmarks/src/taiko_super_circuit.rs index f184ff0bde..2b3ec07205 100644 --- a/circuit-benchmarks/src/taiko_super_circuit.rs +++ b/circuit-benchmarks/src/taiko_super_circuit.rs @@ -42,6 +42,9 @@ use snark_verifier::{ verifier::SnarkVerifier, }; +const MIN_APP_DEGREE: u32 = 18; +const MIN_AGG_DEGREE: u32 = 24; + /// Number of limbs to decompose a elliptic curve base field element into. pub const LIMBS: usize = 4; /// Number of bits of each decomposed limb. @@ -175,11 +178,11 @@ fn gen_application_snark( } fn create_root_super_circuit_prover_sdk() { - let params_app = gen_srs(18); + let params_app = gen_srs(MIN_APP_DEGREE); let aggregation_type = T.into(); let snarks = [(); 1].map(|_| gen_application_snark(¶ms_app, aggregation_type)); - let params = gen_srs(22); + let params = gen_srs(MIN_AGG_DEGREE); let mut snark_roots = Vec::new(); for snark in snarks { let pcd_circuit = TaikoAggregationCircuit::::new(¶ms, [snark]).unwrap(); @@ -220,7 +223,7 @@ fn create_root_super_circuit_prover_sdk } println!("gen blocks agg snark"); - let params = gen_srs(22); + let params = gen_srs(MIN_AGG_DEGREE); let agg_circuit = TaikoAggregationCircuit::::new(¶ms, snark_roots).unwrap(); println!("new root agg circuit {}", agg_circuit); @@ -281,14 +284,12 @@ fn create_root_super_circuit_prover_sdk // for N super circuit -> 1 root circuit integration fn create_1_level_root_super_circuit_prover_sdk() { let agg_type = T.into(); - let app_degree = 18; - let min_k_aggretation = 22; - let mut params_app = gen_srs(min_k_aggretation); - params_app.downsize(app_degree); + let mut params_app = gen_srs(MIN_AGG_DEGREE); + params_app.downsize(MIN_APP_DEGREE); let snarks = [(); 1].map(|_| gen_application_snark(¶ms_app, agg_type)); println!("gen blocks agg snark"); - let params = gen_srs(min_k_aggretation); + let params = gen_srs(MIN_AGG_DEGREE); let agg_circuit = TaikoAggregationCircuit::::new(¶ms, snarks).unwrap(); let start0 = start_timer!(|| "gen vk & pk"); // let pk = gen_pk( From fb475b2ecb717f57bd82524c623380ac52e25215 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 06:54:53 +0000 Subject: [PATCH 47/55] fix: add treasury into state db --- bus-mapping/src/circuit_input_builder.rs | 16 ++++++++++++++-- bus-mapping/src/mock.rs | 2 +- integration-tests/src/lib.rs | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index aa4f782bbb..845a9bee89 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -416,6 +416,7 @@ pub struct BuilderClient { pub fn get_state_accesses( eth_block: &EthBlock, geth_traces: &[eth_types::GethExecTrace], + protocol_instance: &Option, ) -> Result { let mut block_access_trace = vec![Access::new( None, @@ -431,6 +432,15 @@ pub fn get_state_accesses( let tx_access_trace = gen_state_access_trace(eth_block, tx, geth_trace)?; block_access_trace.extend(tx_access_trace); } + if let Some(pi) = protocol_instance { + block_access_trace.push(Access::new( + None, + RW::WRITE, + AccessValue::Account { + address: pi.meta_hash.treasury, + }, + )); + } Ok(AccessSet::from(block_access_trace)) } @@ -529,8 +539,9 @@ impl BuilderClient

{ pub fn get_state_accesses( eth_block: &EthBlock, geth_traces: &[eth_types::GethExecTrace], + protocol_instance: &Option, ) -> Result { - get_state_accesses(eth_block, geth_traces) + get_state_accesses(eth_block, geth_traces, protocol_instance) } /// Step 3. Query geth for all accounts, storage keys, and codes from @@ -614,7 +625,8 @@ impl BuilderClient

{ > { let (eth_block, geth_traces, history_hashes, prev_state_root) = self.get_block(block_num).await?; - let access_set = Self::get_state_accesses(ð_block, &geth_traces)?; + let access_set = + Self::get_state_accesses(ð_block, &geth_traces, &self.protocol_instance)?; let (proofs, codes) = self.get_state(block_num, access_set).await?; let (state_db, code_db) = Self::build_state_code_db(proofs, codes); let builder = self.gen_inputs_from_state( diff --git a/bus-mapping/src/mock.rs b/bus-mapping/src/mock.rs index 60abe4ce8b..facd8ff2ac 100644 --- a/bus-mapping/src/mock.rs +++ b/bus-mapping/src/mock.rs @@ -53,7 +53,7 @@ impl BlockData { let mut sdb = StateDB::new(); let mut code_db = CodeDB::new(); - let access_set = get_state_accesses(&geth_data.eth_block, &geth_data.geth_traces) + let access_set = get_state_accesses(&geth_data.eth_block, &geth_data.geth_traces, &None) .expect("state accesses"); // Initialize all accesses accounts to zero for addr in access_set.state.keys() { diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 8a814a1492..80feb38fa4 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -173,7 +173,7 @@ pub async fn build_circuit_input_builder_block(block_num: u64) { cli.get_block(block_num).await.unwrap(); // 2. Get State Accesses from TxExecTraces - let access_set = get_state_accesses(ð_block, &geth_trace).unwrap(); + let access_set = get_state_accesses(ð_block, &geth_trace, &None).unwrap(); trace!("AccessSet: {:#?}", access_set); // 3. Query geth for all accounts, storage keys, and codes from Accesses From ada675da2ae2bd8ed46ed059299666fd94c03aef Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 07:48:13 +0000 Subject: [PATCH 48/55] feat: add CircuitExt for zkchain --- zkevm-circuits/src/evm_circuit.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zkevm-circuits/src/evm_circuit.rs b/zkevm-circuits/src/evm_circuit.rs index 38830813fc..8e56553fbf 100644 --- a/zkevm-circuits/src/evm_circuit.rs +++ b/zkevm-circuits/src/evm_circuit.rs @@ -5,6 +5,7 @@ use halo2_proofs::{ circuit::{Layouter, SimpleFloorPlanner, Value}, plonk::*, }; +use snark_verifier_sdk::CircuitExt; mod execution; pub mod param; @@ -391,6 +392,16 @@ pub struct EvmCircuitParams { is_taiko: bool, } +impl CircuitExt for EvmCircuit { + fn num_instance(&self) -> Vec { + self.instance().iter().map(|v| v.len()).collect_vec() + } + + fn instances(&self) -> Vec> { + self.instance() + } +} + // Always exported because of `EXECUTION_STATE_HEIGHT_MAP` impl Circuit for EvmCircuit { type Config = (EvmCircuitConfig, Challenges); From f11d6fcfd69e77810098bf960e10e1c144eab12d Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 10:00:11 +0000 Subject: [PATCH 49/55] fix: eip-4399 use mix_hash instead of difficulty --- zkevm-circuits/src/witness/block.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index e8710e9694..0cfba5b716 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -12,7 +12,7 @@ use bus_mapping::{ }, Error, }; -use eth_types::{Address, Field, ToBigEndian, ToLittleEndian, ToScalar, ToWord, Word}; +use eth_types::{Address, Field, ToBigEndian, ToLittleEndian, ToScalar, ToWord, Word, H256}; use halo2_proofs::circuit::Value; use super::{tx::tx_convert, Bytecode, ExecStep, Rw, RwMap, Transaction}; @@ -187,6 +187,8 @@ pub struct BlockContext { pub timestamp: Word, /// The difficulty of the blcok pub difficulty: Word, + /// The mix hash of the block + pub mix_hash: Option, /// The base fee, the minimum amount of gas fee for a transaction pub base_fee: Word, /// The hash of previous blocks @@ -225,8 +227,14 @@ impl BlockContext { [ Value::known(F::from(BlockContextFieldTag::Difficulty as u64)), Value::known(F::ZERO), - randomness - .map(|randomness| rlc::value(&self.difficulty.to_le_bytes(), randomness)), + { + let difficulty = if self.difficulty.is_zero() { + self.mix_hash.unwrap_or_default().to_fixed_bytes() + } else { + self.difficulty.to_le_bytes() + }; + randomness.map(|randomness| rlc::value(&difficulty, randomness)) + }, ], [ Value::known(F::from(BlockContextFieldTag::GasLimit as u64)), @@ -284,6 +292,7 @@ impl From<&circuit_input_builder::Block> for BlockContext { number: block.number, timestamp: block.timestamp, difficulty: block.difficulty, + mix_hash: block.eth_block.mix_hash, base_fee: block.base_fee, history_hashes: block.history_hashes.clone(), chain_id: block.chain_id, From 1eb138fb6cf9e27b90154835d51bffa6622a9f87 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 10:19:08 +0000 Subject: [PATCH 50/55] fix: endian --- zkevm-circuits/src/witness/block.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index 0cfba5b716..a2fbd1c7fc 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -228,12 +228,16 @@ impl BlockContext { Value::known(F::from(BlockContextFieldTag::Difficulty as u64)), Value::known(F::ZERO), { - let difficulty = if self.difficulty.is_zero() { - self.mix_hash.unwrap_or_default().to_fixed_bytes() + if self.difficulty.is_zero() { + rlc_be_bytes( + &self.mix_hash.unwrap_or_default().to_fixed_bytes(), + randomness, + ) } else { - self.difficulty.to_le_bytes() - }; - randomness.map(|randomness| rlc::value(&difficulty, randomness)) + randomness.map(|randomness| { + rlc::value(&self.difficulty.to_le_bytes(), randomness) + }) + } }, ], [ From fdc28988c8a4d80d4c3a5146f8b3c85203845466 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 10:50:06 +0000 Subject: [PATCH 51/55] fix: update anchor method signature --- bus-mapping/src/circuit_input_builder/protocol_instance.rs | 2 +- mock/src/anchor.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder/protocol_instance.rs b/bus-mapping/src/circuit_input_builder/protocol_instance.rs index 8ef5cca210..b44aa4ad95 100644 --- a/bus-mapping/src/circuit_input_builder/protocol_instance.rs +++ b/bus-mapping/src/circuit_input_builder/protocol_instance.rs @@ -10,7 +10,7 @@ use mock::{ }; /// hash(anchor) -pub const ANCHOR_TX_METHOD_SIGNATURE: u32 = 0xda69d3db; +pub const ANCHOR_TX_METHOD_SIGNATURE: u32 = 0x3d384a4b; /// Taiko witness #[derive(Debug, Clone)] diff --git a/mock/src/anchor.rs b/mock/src/anchor.rs index 9d406869ed..138be37d76 100644 --- a/mock/src/anchor.rs +++ b/mock/src/anchor.rs @@ -88,7 +88,7 @@ pub fn sign(tx: &mut MockTransaction) { /// gen anchor call // anchor(l1_hash,signal_root,l1_height,parent_gas_used) pub fn anchor_call() -> Bytes { - const METHOD_SIGNATURE: u32 = 0xda69d3db; + const METHOD_SIGNATURE: u32 = 0x3d384a4b; let mut result = Vec::new(); result.extend_from_slice(&METHOD_SIGNATURE.to_be_bytes()); result.extend_from_slice(&MOCK_ANCHOR_L1_HASH.to_fixed_bytes()); From 2b91ea2c5ac0b802fa4bfec676e127da1c5e3864 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 21 Aug 2023 11:04:44 +0000 Subject: [PATCH 52/55] fix: add evm sha3 --- zkevm-circuits/src/taiko_super_circuit.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zkevm-circuits/src/taiko_super_circuit.rs b/zkevm-circuits/src/taiko_super_circuit.rs index bc40afdb83..6e14f4b70c 100644 --- a/zkevm-circuits/src/taiko_super_circuit.rs +++ b/zkevm-circuits/src/taiko_super_circuit.rs @@ -246,7 +246,10 @@ impl Circuit for SuperCircuit { .load(&mut layouter, &self.block.context, randomness)?; config.keccak_table.dev_load( &mut layouter, - vec![&self.pi_circuit.public_data.rpi_bytes()], + self.block + .sha3_inputs + .iter() + .chain(std::iter::once(&self.pi_circuit.public_data.rpi_bytes())), &challenges, )?; config.byte_table.load(&mut layouter)?; From 5c3d641a9b51839fe4754fb3bb7e2aa18000bce5 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Tue, 22 Aug 2023 00:33:21 +0000 Subject: [PATCH 53/55] fix(comment): typo or mistake --- eth-types/src/geth_types.rs | 2 +- zkevm-circuits/src/evm_circuit.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 6304efb5b0..86750a7599 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -237,7 +237,7 @@ impl Transaction { // accessList]) let req: Eip1559TransactionRequest = self.into(); let req = req.chain_id(chain_id); - // insert 0x2 at the begin of eip + // insert 0x2 at the begin of rlp let req: TypedTransaction = req.into(); let msg = req.rlp(); let msg_hash: [u8; 32] = Keccak256::digest(&msg) diff --git a/zkevm-circuits/src/evm_circuit.rs b/zkevm-circuits/src/evm_circuit.rs index 8e56553fbf..46056ae18e 100644 --- a/zkevm-circuits/src/evm_circuit.rs +++ b/zkevm-circuits/src/evm_circuit.rs @@ -386,7 +386,7 @@ pub(crate) mod cached { } } -/// Super Circuit configuration parameters +/// Evm Circuit configuration parameters #[derive(Default)] pub struct EvmCircuitParams { is_taiko: bool, From 4fdac73bc6fcfd6dfc4ee337d60115bfb9ea9207 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Tue, 22 Aug 2023 01:43:42 +0000 Subject: [PATCH 54/55] feat: remove difficulty after eip-4399 aka POS --- .../src/circuit_input_builder/block.rs | 10 ++++--- bus-mapping/src/evm/opcodes/stackonlyop.rs | 6 ++-- eth-types/src/geth_types.rs | 8 +++--- geth-utils/gethutil/trace.go | 17 +++++------ mock/src/block.rs | 6 ++-- mock/src/lib.rs | 4 ++- testool/src/statetest/executor.rs | 4 +-- testool/src/statetest/json.rs | 10 ++++--- testool/src/statetest/spec.rs | 9 ++---- testool/src/statetest/yaml.rs | 8 ++++-- zkevm-circuits/src/pi_circuit.rs | 28 +++++++++++-------- zkevm-circuits/src/witness/block.rs | 22 ++++----------- 12 files changed, 63 insertions(+), 69 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder/block.rs b/bus-mapping/src/circuit_input_builder/block.rs index 11bb587d4d..76958f9db8 100644 --- a/bus-mapping/src/circuit_input_builder/block.rs +++ b/bus-mapping/src/circuit_input_builder/block.rs @@ -8,7 +8,7 @@ use crate::{ operation::{OperationContainer, RWCounter}, Error, }; -use eth_types::{evm_unimplemented, Address, Word}; +use eth_types::{evm_unimplemented, Address, Hash, Word}; use std::collections::HashMap; /// Context of a [`Block`] which can mutate in a [`Transaction`]. @@ -69,8 +69,8 @@ pub struct Block { pub number: Word, /// difficulty pub timestamp: Word, - /// gas limit - pub difficulty: Word, + /// mix hash + pub mix_hash: Hash, /// base fee pub base_fee: Word, /// State root of the previous block @@ -126,7 +126,9 @@ impl Block { .low_u64() .into(), timestamp: eth_block.timestamp, - difficulty: eth_block.difficulty, + mix_hash: eth_block + .mix_hash + .ok_or(Error::EthTypeError(eth_types::Error::IncompleteBlock))?, base_fee: eth_block.base_fee_per_gas.unwrap_or_default(), prev_state_root, container: OperationContainer::new(), diff --git a/bus-mapping/src/evm/opcodes/stackonlyop.rs b/bus-mapping/src/evm/opcodes/stackonlyop.rs index 21ec6bdcfe..dc609a6099 100644 --- a/bus-mapping/src/evm/opcodes/stackonlyop.rs +++ b/bus-mapping/src/evm/opcodes/stackonlyop.rs @@ -54,12 +54,12 @@ mod stackonlyop_tests { bytecode, evm_types::{OpcodeId, StackAddress}, geth_types::GethData, - word, Bytecode, Word, + word, Bytecode, ToWord, Word, }; use itertools::Itertools; use mock::{ test_ctx::{helpers::*, TestContext}, - MOCK_BASEFEE, MOCK_DIFFICULTY, MOCK_GASLIMIT, + MOCK_BASEFEE, MOCK_GASLIMIT, MOCK_MIX_HASH, }; use pretty_assertions::assert_eq; use std::ops::{BitOr, BitXor}; @@ -375,7 +375,7 @@ mod stackonlyop_tests { STOP }, vec![], - vec![StackOp::new(1, StackAddress(1023), *MOCK_DIFFICULTY)], + vec![StackOp::new(1, StackAddress(1023), MOCK_MIX_HASH.to_word())], ); } diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 86750a7599..7f6151514b 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -72,7 +72,7 @@ pub struct BlockConstants { /// U64 type is required to serialize into proper hex with 0x prefix pub number: U64, /// difficulty - pub difficulty: Word, + pub mix_hash: Hash, /// gas limit pub gas_limit: Word, /// base fee @@ -87,7 +87,7 @@ impl TryFrom<&Block> for BlockConstants { coinbase: block.author.ok_or(Error::IncompleteBlock)?, timestamp: block.timestamp, number: block.number.ok_or(Error::IncompleteBlock)?, - difficulty: block.difficulty, + mix_hash: block.mix_hash.ok_or(Error::IncompleteBlock)?, gas_limit: block.gas_limit, base_fee: block.base_fee_per_gas.ok_or(Error::IncompleteBlock)?, }) @@ -100,7 +100,7 @@ impl BlockConstants { coinbase: Address, timestamp: Word, number: U64, - difficulty: Word, + mix_hash: Hash, gas_limit: Word, base_fee: Word, ) -> BlockConstants { @@ -108,7 +108,7 @@ impl BlockConstants { coinbase, timestamp, number, - difficulty, + mix_hash, gas_limit, base_fee, } diff --git a/geth-utils/gethutil/trace.go b/geth-utils/gethutil/trace.go index 39cd78b894..5aa6f89bb6 100644 --- a/geth-utils/gethutil/trace.go +++ b/geth-utils/gethutil/trace.go @@ -83,12 +83,12 @@ func FormatLogs(logs []logger.StructLog) []StructLogRes { } type Block struct { - Coinbase common.Address `json:"coinbase"` - Timestamp *hexutil.Big `json:"timestamp"` - Number *hexutil.Big `json:"number"` - Difficulty *hexutil.Big `json:"difficulty"` - GasLimit *hexutil.Big `json:"gas_limit"` - BaseFee *hexutil.Big `json:"base_fee"` + Coinbase common.Address `json:"coinbase"` + Timestamp *hexutil.Big `json:"timestamp"` + Number *hexutil.Big `json:"number"` + GasLimit *hexutil.Big `json:"gas_limit"` + BaseFee *hexutil.Big `json:"base_fee"` + MixHash common.Hash `json:"mix_hash"` } type Account struct { @@ -186,8 +186,6 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { return nil, fmt.Errorf("txs total gas: %d Exceeds block gas limit: %d", txsGasLimit, blockGasLimit) } - random := common.BigToHash(toBigInt(config.Block.Difficulty)) - blockCtx := vm.BlockContext{ CanTransfer: core.CanTransfer, Transfer: core.Transfer, @@ -202,10 +200,9 @@ func Trace(config TraceConfig) ([]*ExecutionResult, error) { Coinbase: config.Block.Coinbase, BlockNumber: toBigInt(config.Block.Number), Time: toBigInt(config.Block.Timestamp).Uint64(), - Difficulty: toBigInt(config.Block.Difficulty), BaseFee: toBigInt(config.Block.BaseFee), GasLimit: blockGasLimit, - Random: &random, + Random: &config.Block.MixHash, } // Setup state db with accounts from argument diff --git a/mock/src/block.rs b/mock/src/block.rs index 4123312933..ae0c778877 100644 --- a/mock/src/block.rs +++ b/mock/src/block.rs @@ -1,6 +1,6 @@ //! Mock Block definition and builder related methods. -use crate::{MockTransaction, MOCK_BASEFEE, MOCK_CHAIN_ID, MOCK_DIFFICULTY, MOCK_GASLIMIT}; +use crate::{MockTransaction, MOCK_BASEFEE, MOCK_CHAIN_ID, MOCK_GASLIMIT, MOCK_MIX_HASH}; use eth_types::{Address, Block, Bytes, Hash, Transaction, Word, H64, U64}; use ethers_core::types::{Bloom, OtherFields}; @@ -54,13 +54,13 @@ impl Default for MockBlock { extra_data: Bytes::default(), logs_bloom: None, timestamp: Word::from(123456789u64), - difficulty: *MOCK_DIFFICULTY, + mix_hash: *MOCK_MIX_HASH, total_difficulty: Word::zero(), + difficulty: Word::zero(), seal_fields: Vec::new(), uncles: Vec::new(), transactions: Vec::new(), size: Word::zero(), - mix_hash: Hash::zero(), nonce: H64::zero(), chain_id: *MOCK_CHAIN_ID, } diff --git a/mock/src/lib.rs b/mock/src/lib.rs index 7512272e34..e6c7ec7246 100644 --- a/mock/src/lib.rs +++ b/mock/src/lib.rs @@ -1,4 +1,6 @@ //! Mock types and functions to generate GethData used for tests +use std::str::FromStr; + use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Hash, Word}; use ethers_signers::LocalWallet; use lazy_static::lazy_static; @@ -34,7 +36,7 @@ lazy_static! { /// Mock chain ID value pub static ref MOCK_CHAIN_ID: Word = Word::from(1338u64); /// Mock DIFFICULTY value - pub static ref MOCK_DIFFICULTY: Word = Word::from(0x200000u64); + pub static ref MOCK_MIX_HASH: Hash = Hash::from_str("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347").unwrap(); /// Mock accounts loaded with ETH to use for test cases. pub static ref MOCK_ACCOUNTS: Vec

= vec![ address!("0x000000000000000000000000000000000cafe111"), diff --git a/testool/src/statetest/executor.rs b/testool/src/statetest/executor.rs index c2c365d8f1..d738de1fb5 100644 --- a/testool/src/statetest/executor.rs +++ b/testool/src/statetest/executor.rs @@ -131,7 +131,7 @@ fn into_traceconfig(st: StateTest) -> (String, TraceConfig, StateTestResult) { coinbase: st.env.current_coinbase, timestamp: U256::from(st.env.current_timestamp), number: U64::from(st.env.current_number), - difficulty: st.env.current_difficulty, + mix_hash: st.env.current_mix_hash, gas_limit: U256::from(st.env.current_gas_limit), base_fee: U256::one(), }, @@ -222,7 +222,7 @@ pub fn run_test( author: Some(trace_config.block_constants.coinbase), timestamp: trace_config.block_constants.timestamp, number: Some(U64::from(trace_config.block_constants.number.as_u64())), - difficulty: trace_config.block_constants.difficulty, + mix_hash: Some(trace_config.block_constants.mix_hash), gas_limit: trace_config.block_constants.gas_limit, base_fee_per_gas: Some(trace_config.block_constants.base_fee), transactions, diff --git a/testool/src/statetest/json.rs b/testool/src/statetest/json.rs index 0b89dc6c56..467222edd9 100644 --- a/testool/src/statetest/json.rs +++ b/testool/src/statetest/json.rs @@ -13,7 +13,7 @@ use std::collections::HashMap; #[serde(rename_all = "camelCase")] struct TestEnv { current_coinbase: String, - current_difficulty: String, + current_mix_hash: String, current_gas_limit: String, current_number: String, current_timestamp: String, @@ -192,7 +192,7 @@ impl<'a> JsonStateTestBuilder<'a> { fn parse_env(env: &TestEnv) -> Result { Ok(Env { current_coinbase: parse::parse_address(&env.current_coinbase)?, - current_difficulty: parse::parse_u256(&env.current_difficulty)?, + current_mix_hash: parse::parse_hash(&env.current_mix_hash)?, current_gas_limit: parse::parse_u64(&env.current_gas_limit)?, current_number: parse::parse_u64(&env.current_number)?, current_timestamp: parse::parse_u64(&env.current_timestamp)?, @@ -305,7 +305,7 @@ mod test { }, "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", - "currentDifficulty" : "0x20000", + "currentMixHash" : "0x20000", "currentGasLimit" : "0xFF112233445566", "currentNumber" : "1", "currentTimestamp" : "1000", @@ -371,7 +371,9 @@ mod test { id: "add11_d0_g0_v0".to_string(), env: Env { current_coinbase: Address::from_str("0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba")?, - current_difficulty: U256::from(131072u64), + current_mix_hash: H256::from_str( + "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + )?, current_gas_limit: 0xFF112233445566, current_number: 1, current_timestamp: 1000, diff --git a/testool/src/statetest/spec.rs b/testool/src/statetest/spec.rs index 10f61f4cbd..5045e24ced 100644 --- a/testool/src/statetest/spec.rs +++ b/testool/src/statetest/spec.rs @@ -6,7 +6,7 @@ use std::{collections::HashMap, str::FromStr}; #[derive(PartialEq, Eq, Debug, Clone)] pub struct Env { pub current_coinbase: Address, - pub current_difficulty: U256, + pub current_mix_hash: H256, pub current_gas_limit: u64, pub current_number: u64, pub current_timestamp: u64, @@ -90,10 +90,7 @@ impl std::fmt::Display for StateTest { } table.add_row(row!["coinbase", format!("{:?}", self.env.current_coinbase)]); - table.add_row(row![ - "difficulty", - format!("{}", self.env.current_difficulty) - ]); + table.add_row(row!["mix_hash", format!("{}", self.env.current_mix_hash)]); table.add_row(row!["number", format!("{}", self.env.current_number)]); table.add_row(row!["timestamp", format!("{}", self.env.current_timestamp)]); table.add_row(row!["prev_hash", format!("{:?}", self.env.previous_hash)]); @@ -262,7 +259,7 @@ impl StateTest { id: String::default(), env: Env { current_coinbase: *mock::MOCK_COINBASE, - current_difficulty: U256::default(), + current_mix_hash: H256::default(), current_gas_limit: 16000000, current_number: 1, current_timestamp: 1, diff --git a/testool/src/statetest/yaml.rs b/testool/src/statetest/yaml.rs index fadd4fc682..22fb507c95 100644 --- a/testool/src/statetest/yaml.rs +++ b/testool/src/statetest/yaml.rs @@ -204,7 +204,7 @@ impl<'a> YamlStateTestBuilder<'a> { fn parse_env(yaml: &Yaml) -> Result { Ok(Env { current_coinbase: Self::parse_address(&yaml["currentCoinbase"])?, - current_difficulty: Self::parse_u256(&yaml["currentDifficulty"])?, + current_mix_hash: Self::parse_hash(&yaml["currentMixHash"])?, current_gas_limit: Self::parse_u64(&yaml["currentGasLimit"])?, current_number: Self::parse_u64(&yaml["currentNumber"])?, current_timestamp: Self::parse_u64(&yaml["currentTimestamp"])?, @@ -436,7 +436,7 @@ mod test { arith: env: currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba - currentDifficulty: 0x20000 + currentMixHash: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347 currentGasLimit: {{ gas_limit }} currentNumber: 1 currentTimestamp: 1000 @@ -600,7 +600,9 @@ arith: id: "arith_d0_g0_v0".into(), env: Env { current_coinbase: address!("0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"), - current_difficulty: U256::from(0x20000u64), + current_mix_hash: H256::from_str( + "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + )?, current_number: 1, current_timestamp: 1000, current_gas_limit: 100000000, diff --git a/zkevm-circuits/src/pi_circuit.rs b/zkevm-circuits/src/pi_circuit.rs index c656ccc555..2e9edae155 100644 --- a/zkevm-circuits/src/pi_circuit.rs +++ b/zkevm-circuits/src/pi_circuit.rs @@ -45,7 +45,7 @@ pub struct BlockValues { gas_limit: u64, number: u64, timestamp: u64, - difficulty: Word, + mix_hash: H256, base_fee: Word, // NOTE: BaseFee was added by EIP-1559 and is ignored in legacy headers. chain_id: u64, history_hashes: Vec, @@ -125,7 +125,7 @@ impl PublicData { gas_limit: self.block_constants.gas_limit.as_u64(), number: self.block_constants.number.as_u64(), timestamp: self.block_constants.timestamp.as_u64(), - difficulty: self.block_constants.difficulty, + mix_hash: self.block_constants.mix_hash, base_fee: self.block_constants.base_fee, chain_id: self.chain_id.as_u64(), history_hashes, @@ -926,21 +926,23 @@ impl PiCircuitConfig { raw_pi_vals[offset] = timestamp; offset += 1; - // difficulty - let difficulty = rlc(block_values.difficulty.to_le_bytes(), randomness); + let mut mix_hash_bytes = block_values.mix_hash.to_fixed_bytes(); + mix_hash_bytes.reverse(); + // mix hash + let mix_hash = rlc(mix_hash_bytes, randomness); region.assign_advice( - || "difficulty", + || "mix_hash", self.block_table.value, offset, - || Value::known(difficulty), + || Value::known(mix_hash), )?; region.assign_advice( - || "difficulty", + || "mix_hash", self.raw_public_inputs, offset, - || Value::known(difficulty), + || Value::known(mix_hash), )?; - raw_pi_vals[offset] = difficulty; + raw_pi_vals[offset] = mix_hash; offset += 1; // base_fee @@ -1164,7 +1166,7 @@ impl SubCircuit for PiCircuit { coinbase: block.context.coinbase, timestamp: block.context.timestamp, number: block.context.number.as_u64().into(), - difficulty: block.context.difficulty, + mix_hash: block.context.mix_hash, gas_limit: block.context.gas_limit.into(), base_fee: block.context.base_fee, }, @@ -1487,8 +1489,10 @@ fn raw_public_inputs_col( // timestamp result[offset] = F::from(block.timestamp); offset += 1; - // difficulty - result[offset] = rlc(block.difficulty.to_le_bytes(), randomness); + // mix hash + let mut mix_hash_bytes = block.mix_hash.to_fixed_bytes(); + mix_hash_bytes.reverse(); + result[offset] = rlc(mix_hash_bytes, randomness); offset += 1; // base_fee result[offset] = rlc(block.base_fee.to_le_bytes(), randomness); diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index a2fbd1c7fc..bee18e10a3 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -185,10 +185,10 @@ pub struct BlockContext { pub number: Word, /// The timestamp of the block pub timestamp: Word, - /// The difficulty of the blcok - pub difficulty: Word, /// The mix hash of the block - pub mix_hash: Option, + // after eip-4399, the difficulty is always zero, we need to use the mix hash instead of + // difficulty. + pub mix_hash: H256, /// The base fee, the minimum amount of gas fee for a transaction pub base_fee: Word, /// The hash of previous blocks @@ -227,18 +227,7 @@ impl BlockContext { [ Value::known(F::from(BlockContextFieldTag::Difficulty as u64)), Value::known(F::ZERO), - { - if self.difficulty.is_zero() { - rlc_be_bytes( - &self.mix_hash.unwrap_or_default().to_fixed_bytes(), - randomness, - ) - } else { - randomness.map(|randomness| { - rlc::value(&self.difficulty.to_le_bytes(), randomness) - }) - } - }, + rlc_be_bytes(&self.mix_hash.to_fixed_bytes(), randomness), ], [ Value::known(F::from(BlockContextFieldTag::GasLimit as u64)), @@ -295,8 +284,7 @@ impl From<&circuit_input_builder::Block> for BlockContext { gas_limit: block.gas_limit, number: block.number, timestamp: block.timestamp, - difficulty: block.difficulty, - mix_hash: block.eth_block.mix_hash, + mix_hash: block.mix_hash, base_fee: block.base_fee, history_hashes: block.history_hashes.clone(), chain_id: block.chain_id, From c1af675ebc057f6b9d02c3a3eca868cc8a505c64 Mon Sep 17 00:00:00 2001 From: johntaiko Date: Mon, 28 Aug 2023 13:43:38 +0000 Subject: [PATCH 55/55] fix: opcode state print --- eth-types/src/evm_types/opcode_ids.rs | 4 +++- zkevm-circuits/src/bin/stats/helpers.rs | 4 +--- zkevm-circuits/src/bin/stats/main.rs | 20 +++++++------------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/eth-types/src/evm_types/opcode_ids.rs b/eth-types/src/evm_types/opcode_ids.rs index 0bb7d69347..db6a96d26d 100644 --- a/eth-types/src/evm_types/opcode_ids.rs +++ b/eth-types/src/evm_types/opcode_ids.rs @@ -743,6 +743,7 @@ impl OpcodeId { OpcodeId::MSIZE => (1, 1024), OpcodeId::GAS => (1, 1024), OpcodeId::JUMPDEST => (0, 1024), + OpcodeId::PUSH0 => (1, 1024), OpcodeId::PUSH1 => (1, 1024), OpcodeId::PUSH2 => (1, 1024), OpcodeId::PUSH3 => (1, 1024), @@ -945,6 +946,7 @@ impl From for OpcodeId { 0x58u8 => OpcodeId::PC, 0x59u8 => OpcodeId::MSIZE, 0x5bu8 => OpcodeId::JUMPDEST, + 0x5fu8 => OpcodeId::PUSH0, 0x60u8 => OpcodeId::PUSH1, 0x61u8 => OpcodeId::PUSH2, 0x62u8 => OpcodeId::PUSH3, @@ -1098,6 +1100,7 @@ impl FromStr for OpcodeId { "PC" => OpcodeId::PC, "MSIZE" => OpcodeId::MSIZE, "JUMPDEST" => OpcodeId::JUMPDEST, + "PUSH0" => OpcodeId::PUSH0, "PUSH1" => OpcodeId::PUSH1, "PUSH2" => OpcodeId::PUSH2, "PUSH3" => OpcodeId::PUSH3, @@ -1165,7 +1168,6 @@ impl FromStr for OpcodeId { "RETURN" => OpcodeId::RETURN, "REVERT" => OpcodeId::REVERT, "INVALID" => OpcodeId::INVALID(0xfe), - "PUSH0" => OpcodeId::INVALID(0x5f), "SHA3" | "KECCAK256" => OpcodeId::SHA3, "ADDRESS" => OpcodeId::ADDRESS, "BALANCE" => OpcodeId::BALANCE, diff --git a/zkevm-circuits/src/bin/stats/helpers.rs b/zkevm-circuits/src/bin/stats/helpers.rs index b6eff95ff6..502084458c 100644 --- a/zkevm-circuits/src/bin/stats/helpers.rs +++ b/zkevm-circuits/src/bin/stats/helpers.rs @@ -114,12 +114,10 @@ pub(crate) fn print_circuit_stats_by_states( // circuit input builder Block, the current execution state, and the step index in circuit // input builder tx. fn_height: impl Fn(&circuit_input_builder::Block, ExecutionState, usize) -> usize, - // in taiko context - is_taiko: bool, ) { let mut implemented_states = Vec::new(); for state in ExecutionState::iter() { - let height = state.get_step_height_option(is_taiko); + let height = state.get_step_height_option(false); if height.is_some() { implemented_states.push(state); } diff --git a/zkevm-circuits/src/bin/stats/main.rs b/zkevm-circuits/src/bin/stats/main.rs index c910700c86..da7749b040 100644 --- a/zkevm-circuits/src/bin/stats/main.rs +++ b/zkevm-circuits/src/bin/stats/main.rs @@ -18,19 +18,16 @@ fn main() { let args: Vec = env::args().collect(); match &args[1][..] { - "evm" => evm_states_stats(false), - "taiko_evm" => evm_states_stats(true), - "state" => state_states_stats(false), - "tako_state" => state_states_stats(true), - "copy" => copy_states_stats(false), - "taiko_copy" => copy_states_stats(true), + "evm" => evm_states_stats(), + "state" => state_states_stats(), + "copy" => copy_states_stats(), "exec" => get_exec_steps_occupancy(), &_ => unreachable!("Unsupported arg"), } } /// Prints the stats of EVM circuit per execution state. -fn evm_states_stats(is_taiko: bool) { +fn evm_states_stats() { print_circuit_stats_by_states( |state| { // TODO: Enable CREATE/CREATE2 once they are supported @@ -63,13 +60,12 @@ fn evm_states_stats(is_taiko: bool) { PUSH2(0x50) }, }, - |_, state, _| state.get_step_height_option(is_taiko).unwrap(), - is_taiko, + |_, state, _| state.get_step_height_option(false).unwrap(), ); } /// Prints the stats of State circuit per execution state. -fn state_states_stats(is_taiko: bool) { +fn state_states_stats() { print_circuit_stats_by_states( |state| { // TODO: Enable CREATE/CREATE2 once they are supported @@ -87,12 +83,11 @@ fn state_states_stats(is_taiko: bool) { let step_next = &block.txs[0].steps()[step_index + 1]; step_next.rwc.0 - step.rwc.0 }, - is_taiko, ); } /// Prints the stats of Copy circuit per execution state. -fn copy_states_stats(is_taiko: bool) { +fn copy_states_stats() { print_circuit_stats_by_states( |state| { // TODO: Enable CREATE/CREATE2 once they are supported @@ -115,7 +110,6 @@ fn copy_states_stats(is_taiko: bool) { .map(|c| c.bytes.len() * 2) .sum::() }, - is_taiko, ); }