From 88a5a948433100b5ddefef40565c49f6ca94f143 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Fri, 1 Nov 2024 21:32:34 +0100 Subject: [PATCH] fix: fastlane and storage map --- crates/bundler/src/fastlane.rs | 8 ++------ crates/mempool/src/validate/utils.rs | 4 +++- crates/primitives/src/constants.rs | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/bundler/src/fastlane.rs b/crates/bundler/src/fastlane.rs index 71c7161b..d855fead 100644 --- a/crates/bundler/src/fastlane.rs +++ b/crates/bundler/src/fastlane.rs @@ -61,12 +61,8 @@ where let mut options = ConditionalOptions { known_accounts, ..Default::default() }; if let Some(block) = block { - if let Some(block_number) = block.number { - options.block_number_min = Some(block_number.into()); - options.block_number_max = Some((block_number + 100).into()); // around 10 minutes - options.timestamp_min = Some(block.timestamp.as_u64()); - options.timestamp_max = Some(block.timestamp.as_u64() + 420); // around 15 minutes - } + options.timestamp_min = Some(block.timestamp.as_u64()); + options.timestamp_max = Some(block.timestamp.as_u64() + 420); // around 15 minutes } let tx = diff --git a/crates/mempool/src/validate/utils.rs b/crates/mempool/src/validate/utils.rs index e1031bfe..7bd6bb6b 100644 --- a/crates/mempool/src/validate/utils.rs +++ b/crates/mempool/src/validate/utils.rs @@ -102,7 +102,9 @@ pub fn extract_storage_map(js_trace: &JsTracerFrame) -> StorageMap { for l in js_trace.calls_from_entry_point.iter() { for (addr, acc) in l.access.iter() { - storage_map.slots.insert(*addr, acc.reads.clone()); + if !storage_map.slots.contains_key(addr) { + storage_map.slots.insert(*addr, acc.reads.clone()); + } } } diff --git a/crates/primitives/src/constants.rs b/crates/primitives/src/constants.rs index d9da3b4c..bfded0d1 100644 --- a/crates/primitives/src/constants.rs +++ b/crates/primitives/src/constants.rs @@ -85,7 +85,7 @@ pub mod flashbots_relay_endpoints { /// Fastlane relay endpoints pub mod fastlane_relay_endpoints { // polygon - pub const FASTLANE_POLYGON: &str = "https://polygon-test-rpc.fastlane.xyz"; + pub const FASTLANE_POLYGON: &str = "https://polygon-rpc.fastlane.xyz/"; } /// Supported chains