From 2d482de600531ffd9d43c6578fd224edfdd26be0 Mon Sep 17 00:00:00 2001 From: elmattic Date: Thu, 30 Oct 2025 15:21:56 +0100 Subject: [PATCH 1/2] Remove check --- src/rpc/methods/eth/filter/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rpc/methods/eth/filter/mod.rs b/src/rpc/methods/eth/filter/mod.rs index d571dc52f86b..cc98a2320199 100644 --- a/src/rpc/methods/eth/filter/mod.rs +++ b/src/rpc/methods/eth/filter/mod.rs @@ -353,15 +353,17 @@ impl EthEventHandler { msg_idx: i as u64, msg_cid: message.cid(), }; - if collected_events.len() >= ctx.eth_event_handler.max_filter_results { - bail!("filter matches too many events, try a more restricted filter"); - } + // if collected_events.len() >= ctx.eth_event_handler.max_filter_results { + // bail!("filter matches too many events, try a more restricted filter"); + // } collected_events.push(ce); event_count += 1; } } } + tracing::warn!("Matched events: {}", collected_events.len()); + Ok(()) } From 1e2088f6f7002f42386c35dbeeb9d33cf7820408 Mon Sep 17 00:00:00 2001 From: elmattic Date: Thu, 30 Oct 2025 19:12:14 +0100 Subject: [PATCH 2/2] Revert prev commit and use quasi policy --- src/rpc/methods/eth/filter/mod.rs | 8 +++----- src/tool/subcommands/api_cmd/api_compare_tests.rs | 12 ++++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/rpc/methods/eth/filter/mod.rs b/src/rpc/methods/eth/filter/mod.rs index cc98a2320199..d571dc52f86b 100644 --- a/src/rpc/methods/eth/filter/mod.rs +++ b/src/rpc/methods/eth/filter/mod.rs @@ -353,17 +353,15 @@ impl EthEventHandler { msg_idx: i as u64, msg_cid: message.cid(), }; - // if collected_events.len() >= ctx.eth_event_handler.max_filter_results { - // bail!("filter matches too many events, try a more restricted filter"); - // } + if collected_events.len() >= ctx.eth_event_handler.max_filter_results { + bail!("filter matches too many events, try a more restricted filter"); + } collected_events.push(ce); event_count += 1; } } } - tracing::warn!("Matched events: {}", collected_events.len()); - Ok(()) } diff --git a/src/tool/subcommands/api_cmd/api_compare_tests.rs b/src/tool/subcommands/api_cmd/api_compare_tests.rs index 96144554c724..96e999044b77 100644 --- a/src/tool/subcommands/api_cmd/api_compare_tests.rs +++ b/src/tool/subcommands/api_cmd/api_compare_tests.rs @@ -1746,7 +1746,8 @@ fn eth_tests_with_tipset(store: &Arc, shared_tipset: &Tipset },)) .unwrap(), ) - .sort_policy(SortPolicy::All), + .sort_policy(SortPolicy::All) + .policy_on_rejected(PolicyOnRejected::PassWithQuasiIdenticalError), RpcTest::identity( EthGetLogs::request((EthFilterSpec { from_block: Some(format!("0x{:x}", shared_tipset.epoch())), @@ -1756,7 +1757,8 @@ fn eth_tests_with_tipset(store: &Arc, shared_tipset: &Tipset },)) .unwrap(), ) - .sort_policy(SortPolicy::All), + .sort_policy(SortPolicy::All) + .policy_on_rejected(PolicyOnRejected::PassWithQuasiIdenticalError), RpcTest::identity( EthGetLogs::request((EthFilterSpec { from_block: Some(format!("0x{:x}", shared_tipset.epoch() - 100)), @@ -1765,7 +1767,8 @@ fn eth_tests_with_tipset(store: &Arc, shared_tipset: &Tipset },)) .unwrap(), ) - .sort_policy(SortPolicy::All), + .sort_policy(SortPolicy::All) + .policy_on_rejected(PolicyOnRejected::PassWithQuasiIdenticalError), RpcTest::identity( EthGetLogs::request((EthFilterSpec { address: Some(EthAddressList::Single( @@ -1775,7 +1778,8 @@ fn eth_tests_with_tipset(store: &Arc, shared_tipset: &Tipset },)) .unwrap(), ) - .sort_policy(SortPolicy::All), + .sort_policy(SortPolicy::All) + .policy_on_rejected(PolicyOnRejected::PassWithQuasiIdenticalError), RpcTest::identity(EthGetFilterLogs::request((FilterID::new().unwrap(),)).unwrap()) .policy_on_rejected(PolicyOnRejected::PassWithIdenticalError), RpcTest::identity(EthGetFilterChanges::request((FilterID::new().unwrap(),)).unwrap())