From b61b00de3bf5837ab2ffa49d87800d8079705f4f Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 10 Jul 2022 18:06:20 +0000 Subject: [PATCH] todos --- TODO.md | 6 +++++- web3-proxy/src/connection.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index b4e60d02..0fef52ad 100644 --- a/TODO.md +++ b/TODO.md @@ -38,10 +38,14 @@ - [x] connection pool for redis - [ ] automatically route to archive server when necessary - originally, no processing was done to params; they were just serde_json::RawValue. this is probably fastest, but we need to look for "latest" and count elements, so we have to use serde_json::Value + - when getting the next server, filtering on "archive" isn't going to work well. + - [ ] we need a list of "Arc" just of archive servers. we can route to any of them even if they are behind by many blocks + - [ ] if the requested block is ahead of the best block, return without querying any backend servers - [ ] handle log subscriptions - [ ] basic request method stats - [x] http servers should check block at the very start - [ ] Got warning: "WARN subscribe_new_heads:send_block: web3_proxy::connection: unable to get block from https://rpc.ethermine.org: Deserialization Error: expected value at line 1 column 1. Response: error code: 1015". this is cloudflare rate limiting on fetching a block, but this is a private rpc. why is there a block subscription? +- [ ] if the fastest server is at rate limits, when it gets a new head block, we can't serve any requests. only publish our pending_synced_connections (and update head block) when a quorum with open requests is reached ## V1 @@ -100,4 +104,4 @@ - [ ] flashbots specific methods - [ ] flashbots protect fast mode or not? probably fast matches most user's needs, but no reverts is nice. - [ ] https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint#authentication maybe have per-user keys. or pass their header on if its set -- [ ] if no redis set, but public rate limits are set, exit with an error \ No newline at end of file +- [ ] if no redis set, but public rate limits are set, exit with an error diff --git a/web3-proxy/src/connection.rs b/web3-proxy/src/connection.rs index bcd014da..64b31206 100644 --- a/web3-proxy/src/connection.rs +++ b/web3-proxy/src/connection.rs @@ -99,7 +99,7 @@ impl Serialize for Web3Connection { state.serialize_field( "active_requests", - &self.active_requests.load(atomic::Ordering::Acquire), + &self.active_requests.load(atomic::Ordering::Relaxed), )?; state.end()