From c10a0e9d3cb081498393d9bd4c80130354686842 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 5 Dec 2022 16:35:51 -0800 Subject: [PATCH] better error context --- TODO.md | 4 ++++ web3_proxy/src/rpcs/connection.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index e8cb397b..c5569070 100644 --- a/TODO.md +++ b/TODO.md @@ -268,6 +268,10 @@ These are roughly in order of completition These are not yet ordered. There might be duplicates. We might not actually need all of these. +- [ ] soft limit needs more thought + - it should be the min of total_sum_soft_limit (from only non-lagged servers) and min_sum_soft_limit + - otherwise it won't track anything and will just give errors. + - but if web3 proxy has just started, we should give some time otherwise we will thundering herd the first server that responds - [ ] connection pool for websockets. use tokio-tungstenite directly. no need for ethers providers since serde_json is enough for us - this should also get us closer to being able to do our own streaming json parser where we can - [ ] get `oldest_allowed` out of config. or calculate automatically based on block time. diff --git a/web3_proxy/src/rpcs/connection.rs b/web3_proxy/src/rpcs/connection.rs index 0fdd1f00..eff0a072 100644 --- a/web3_proxy/src/rpcs/connection.rs +++ b/web3_proxy/src/rpcs/connection.rs @@ -200,7 +200,7 @@ impl Web3Connection { Level::Debug.into(), ) .await? - .context("no block!")?; + .context("no block during check_block_data_limit!")?; if SavedBlock::from(head_block).syncing() { // if the node is syncing, we can't check its block data limit