diff --git a/TODO.md b/TODO.md index 77d0ba75..16ceb811 100644 --- a/TODO.md +++ b/TODO.md @@ -154,7 +154,7 @@ These are roughly in order of completition - WARN http_request: redis_rate_limit::errors: redis error err=Response was of incompatible type: "Response type not string compatible." (response was int(500237)) id=01GC6514JWN5PS1NCWJCGJTC94 method=POST - [x] web3_proxy_error_count{path = "backend_rpc/request"} is inflated by a bunch of reverts. do not log reverts as warn. - erigon gives `method=eth_call reqid=986147 t=1.151551ms err="execution reverted"` -- [ ] opt-in debug mode that inspects responses for reverts and saves the request to the database for the user +- [ ] opt-in debug mode that inspects responses for reverts and saves the request to the database for the user. let them choose a % to log (or maybe x/second). someone like curve logging all reverts will be a BIG database very quickly - this must be opt-in or spawned since it will slow things down and will make their calls less private - [-] add configurable size limits to all the Caches - [ ] Api keys need option to lock to IP, cors header, referer, etc @@ -167,7 +167,7 @@ These are roughly in order of completition - [ ] Ulid instead of Uuid for database ids - might have to use Uuid in sea-orm and then convert to Ulid on display - [ ] database migration to change user_keys.requests_per_minute to bigint (max of 18446744073709551615) -- [ ] change user creation script to have a "unlimited requests per minute" flag that sets it to 18446744073709551615 +- [ ] change user creation script to have a "unlimited requests per minute" flag that sets it to u64::MAX (18446744073709551615) ## V1 diff --git a/web3_proxy/src/rpcs/request.rs b/web3_proxy/src/rpcs/request.rs index 6e2c1da4..d447bb27 100644 --- a/web3_proxy/src/rpcs/request.rs +++ b/web3_proxy/src/rpcs/request.rs @@ -107,7 +107,7 @@ impl OpenRequestHandle { Web3Provider::Ws(provider) => provider.request(method, params).await, }; - // no need to do conn.active_requests.fetch_sub because Drop will do that + conn.active_requests.fetch_sub(1, atomic::Ordering::AcqRel); // TODO: i think ethers already has trace logging (and does it much more fancy) if let Err(err) = &response {