diff --git a/Cross.toml b/Cross.toml index c65b3608..e7d99827 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,6 +1,6 @@ [build] pre-build = [ - "apt-get update && apt-get -y upgrade && apt-get install -y wget pkg-config llvm-dev libclang-6.0-dev clang-6.0 libssl-dev", + "apt-get update && apt-get -y upgrade && apt-get install -y wget pkg-config llvm-dev libclang-6.0-dev clang-6.0 libssl-dev ca-certificates", "wget -c https://github.com/ethereum/solidity/releases/download/v0.8.20/solc-static-linux && mv solc-static-linux /usr/local/bin/solc && chmod a+x /usr/local/bin/solc" ] diff --git a/bin/silius/src/bundler.rs b/bin/silius/src/bundler.rs index 2257009b..7cc9ec29 100644 --- a/bin/silius/src/bundler.rs +++ b/bin/silius/src/bundler.rs @@ -542,7 +542,7 @@ where if let Some(chain) = chain { if !CHAINS.contains(&chain) { warn!("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - warn!("Chain {:?} is not officially supported yet! You could possibly meet a lot of problems with silius. Use at your own risk!!", chain); + warn!("Chain {:?} is not officially supported yet! You could possibly meet a lot of problems with Silius. Use at your own risk!", chain); warn!("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } diff --git a/crates/mempool/src/validate/sanity/sender.rs b/crates/mempool/src/validate/sanity/sender.rs index d84005e5..dc909813 100644 --- a/crates/mempool/src/validate/sanity/sender.rs +++ b/crates/mempool/src/validate/sanity/sender.rs @@ -51,11 +51,15 @@ impl SanityCheck for Sender { return Ok(()); } - let uo_prev = mempool - .get_all_by_sender(&uo.sender) - .iter() - .find(|uo_prev| uo_prev.nonce == uo.nonce) - .cloned(); + let mut uo_prev: Option = None; + + if !helper.val_config.ignore_prev { + uo_prev = mempool + .get_all_by_sender(&uo.sender) + .iter() + .find(|uo_prev| uo_prev.nonce == uo.nonce) + .cloned(); + } if let Some(uo_prev) = uo_prev { if uo.max_fee_per_gas < diff --git a/crates/mempool/src/validate/validator.rs b/crates/mempool/src/validate/validator.rs index 5f660a3e..53ae1677 100644 --- a/crates/mempool/src/validate/validator.rs +++ b/crates/mempool/src/validate/validator.rs @@ -251,6 +251,7 @@ where min_stake: Some(reputation.min_stake()), min_unstake_delay: Some(reputation.min_unstake_delay()), topic: None, + ignore_prev: false, }; } @@ -269,6 +270,7 @@ where if let Some(uo) = mempool.get_prev_by_sender(uo) { out.prev_hash = Some(uo.hash); } + debug!("Simulate user operation from {:?}", uo.sender); let sim_res = self.simulate_validation(uo).await?; diff --git a/crates/p2p/src/service/mod.rs b/crates/p2p/src/service/mod.rs index 02248dcf..0548d1d0 100644 --- a/crates/p2p/src/service/mod.rs +++ b/crates/p2p/src/service/mod.rs @@ -304,6 +304,7 @@ impl Network { min_stake: Some(canonical_mempool_config.min_stake), min_unstake_delay: None, topic: Some(message.topic.to_string()), + ignore_prev: false, } }) .expect("mempool channel should be open all the time"); @@ -424,7 +425,7 @@ impl Network { verified_at_block_hash, validation_config, } => { - info!("Received user {user_operation:?} from ep {ep:?} verified in {verified_at_block_hash:?} to gossip over p2p!"); + info!("Received user operation (verified at {verified_at_block_hash:?}) to gossip over p2p: {user_operation:?}"); let user_op = VerifiedUserOperation::new( user_operation.user_operation.clone(), @@ -444,6 +445,7 @@ impl Network { min_stake: Some(first_mempool_config.min_stake), min_unstake_delay: None, topic: Some(first_mempool_topic.to_string()), + ignore_prev: true, }, }) .expect("mempool channel should be open all the time"); @@ -463,6 +465,7 @@ impl Network { min_stake: Some(canonical_mempool_config.min_stake), min_unstake_delay: None, topic: Some(canonical_mempool_topic.to_string()), + ignore_prev: true, }, }) .expect("mempool channel should be open all the time"); diff --git a/crates/primitives/src/simulation.rs b/crates/primitives/src/simulation.rs index f6e2be7d..4928d950 100644 --- a/crates/primitives/src/simulation.rs +++ b/crates/primitives/src/simulation.rs @@ -45,6 +45,7 @@ pub struct ValidationConfig { pub min_stake: Option, pub min_unstake_delay: Option, pub topic: Option, + pub ignore_prev: bool, } /// Code hash - hash of the code of the contract