From f06304e202abe6f9a266f8db488915e155764edb Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 17 Aug 2022 22:19:34 +0000 Subject: [PATCH] temp fix for routing to eth_getTransactionByHash and eth_getTransactionReceipt --- TODO.md | 5 +++++ web3_proxy/src/app.rs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 38281cb0..639e0ad5 100644 --- a/TODO.md +++ b/TODO.md @@ -90,6 +90,11 @@ - whenever blocks were slow, we started checking as fast as possible - [x] create user script should allow setting requests per minute - [x] cache api keys that are not in the database +- [ ] requests for "Get transactions receipts" are routed to the private_rpcs and not the balanced_rpcs. do this better. + - [x] quick fix, send to balanced_rpcs for now. we will just live with errors on new transactions. + - this was intentional so that recently confirmed transactions go to a server that is more likely to have the tx. + - but under heavy load, we hit their rate limits. need a "retry_until_success" function that goes to balanced_rpcs. or maybe store in redis the txids that we broadcast privately and use that to route. + - [ ] figure out rate limits for private rpcs. eden v1 gives 500 error instead of a code for rate limits - [-] basic request method stats (using the user_id and other fields that are in the tracing frame) - [ ] use siwe messages and signatures for sign up and login - [ ] "chain is forked" message is wrong. it includes nodes just being on different heights of the same chain. need a smarter check diff --git a/web3_proxy/src/app.rs b/web3_proxy/src/app.rs index c9637044..64578df7 100644 --- a/web3_proxy/src/app.rs +++ b/web3_proxy/src/app.rs @@ -865,7 +865,8 @@ impl Web3ProxyApp { } let response = match method { - "eth_getTransactionByHash" | "eth_getTransactionReceipt" => { + "temporarily disabled" => { + // "eth_getTransactionByHash" | "eth_getTransactionReceipt" => { // TODO: try_send_all serially with retries instead of parallel self.private_rpcs .try_send_all_upstream_servers(request, min_block_needed)