we do need fetch_sub

This commit is contained in:
Bryan Stitt 2022-09-21 02:48:02 +00:00
parent d98b6aeff3
commit 6054c3f340
2 changed files with 3 additions and 3 deletions

@ -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

@ -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 {