From 1da3f7ea1df94312e7c6818c17bf4109f888e547 Mon Sep 17 00:00:00 2001
From: perekopskiy <53865202+perekopskiy@users.noreply.github.com>
Date: Thu, 5 Sep 2024 18:02:27 +0300
Subject: [PATCH] feat(eth-watch): do not query events from earliest block
(#2810)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## What ❔
Removes querying from the earliest batch in eth watch. Instead queries
for constant block range and splits queried range in parts if needed
## Why ❔
Vanilla reth doesn't allow eth_logs requests where block range is
greater than 1_000_000. This changes allows eth watch to work with this
limitation.
## Checklist
- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
---
core/node/eth_watch/src/client.rs | 139 +++++++++++++++++-------------
1 file changed, 78 insertions(+), 61 deletions(-)
diff --git a/core/node/eth_watch/src/client.rs b/core/node/eth_watch/src/client.rs
index 8d465109994..67e603041e6 100644
--- a/core/node/eth_watch/src/client.rs
+++ b/core/node/eth_watch/src/client.rs
@@ -88,75 +88,34 @@ impl EthHttpQueryClient {
}
}
- async fn get_filter_logs(
+ fn get_default_address_list(&self) -> Vec