Commit Graph

56 Commits

Author SHA1 Message Date
Bryan Stitt
6cb2accd0d dedicated error for lagged servers 2023-10-23 18:46:53 -07:00
Bryan Stitt
042707eca2 maybe getting rid of this arc will fix streaming taking twice 2023-10-17 00:33:32 -07:00
Bryan Stitt
20a0b99f3a move future block check outside the wait future 2023-10-16 11:04:02 -07:00
Bryan Stitt
ce3fbca7b6 fix eth_sendRawTransaction 2023-10-13 19:41:59 -07:00
Bryan Stitt
57f8c4bd40 split web3_proxy/src/jsonrpc.rs into multiple files and DRY it up 2023-10-11 00:12:20 -07:00
Bryan Stitt
a10a283023 trust just removing uncles from the cache 2023-10-10 14:21:54 -07:00
Bryan Stitt
78edfee6b9 timeout and server selection fixes
add a short connect timeout separate from the overall request timeout.

also fix a bug when only 1 server was in the rpc list causing a very tight loop that made tokio sad
2023-10-09 23:30:17 -07:00
Bryan Stitt
ab16f6b2e8 check for MDBX_PANIC 2023-10-09 09:38:58 -07:00
Bryan Stitt
aeb30787dd more openssl and no rmp
i like rustls, but we can't use it on everything and so our compile times are bad
2023-10-07 00:35:22 -07:00
Bryan Stitt
6756559ec2 wow this got big 2023-10-07 00:35:22 -07:00
Bryan Stitt
f0b6465069
streaming responses 2 (#219)
* streaming responses compile, still small TODOs & cleanup

* refactor to allow short curcuits on uncacheable requests (#220)

* refactor to allow short curcuits on uncacheable requests

* handle error inside an Arc from moka

* arc instead of box

* lint

* more lint

* add bonus rate limits and keep all semaphores after rate limits (#221)

* add bonus rate limits and keep all semaphores after rate limits

* remove stale todos

* better function names

* cargo upgrade and update

* make some panics warn. more todo

* pass request_metadata through so streaming responses include their final size

* remove stale TODO

* remove more stale todos

* add file i missed

* make to_json_string work well enough

* check config for free_subscriptions

---------

Co-authored-by: Rory Neithinger <rory@llamanodes.com>
2023-09-26 18:18:06 -07:00
Bryan Stitt
e76bef272f put rate limit things into data 2023-08-24 13:25:14 -07:00
Bryan Stitt
10a8620044 fix method not found jsonrpc error codes 2023-08-17 15:32:22 -07:00
Bryan Stitt
e0f700189b fix error code on method not implemented and error_response user_response bools 2023-08-17 13:44:26 -07:00
Bryan Stitt
8ea587120b handle functions that need the block num instead of the hash 2023-08-08 15:50:34 -07:00
Bryan Stitt
d25884dfbb dont cache responses larger than 2MB 2023-08-02 15:22:26 -07:00
Bryan Stitt
7cd91af3a8 don't cache nulls 2023-07-31 14:26:07 -07:00
Bryan Stitt
c831a810b4 error level for anyhow errors 2023-07-25 15:15:03 -07:00
Bryan Stitt
439ac49495 jsonrpc formatted errors for JsonRejection 2023-07-24 16:25:58 -07:00
Bryan Stitt
ae8a12047e tarpit strange methods 2023-07-20 14:32:52 -07:00
Bryan Stitt
ac2d9049be improve flushing and buffering of stats 2023-07-19 22:55:14 -07:00
Bryan Stitt
efa189d101 less anyhow and fix tests 2023-07-14 18:31:00 -07:00
Bryan Stitt
0046a02a4a
Global db (#191)
* dont migrate on start. just connect

* it compiles

* that log is loud

* get transaction from a local clone

* import the trait

* put the test app into a thread instead of tokio::spawn

* fix one test

* try db before rpcs

* db connection is too slow. need to wait for it

* do db setup once while spawning
2023-07-14 18:30:01 -07:00
Bryan Stitt
37e3d0be2b you cant do a runtime in a drop like this apparently 2023-07-14 01:19:27 -07:00
Bryan Stitt
0f7e370c92 drop flume. just use tokio
i dont know if this is the problem, but this will also get compile times down
2023-07-10 23:08:06 -07:00
Bryan Stitt
af4ca0f450 distinguish some errors 2023-07-09 22:49:29 -07:00
Bryan Stitt
ffef36dafe more tracing cleanup 2023-07-06 04:36:02 -07:00
Bryan Stitt
b13e5b2440 move more logs to tracing and possible stripe payment fix
maybe RawValue does need to_string instead of just get
2023-07-03 12:17:30 -07:00
Bryan Stitt
280e2075d3
Fix Issue 65 Pt. 2 (#153)
* change subuser balance logic and add message to access denied errors

* clearer import

* comments

* comments
2023-06-28 23:00:34 -07:00
Bryan Stitt
ebceb0d7d6 descriptive text on NotImplemented errors 2023-06-28 21:47:06 -07:00
Bryan Stitt
fba41b9bc2 lots of tracing improvements 2023-06-28 21:30:00 -07:00
Bryan Stitt
3cfbc5baa4 improve cache keys and allow failures while parsing params 2023-06-28 17:42:49 -07:00
Bryan Stitt
df865292a7 add another layer of retries 2023-06-28 15:12:16 -07:00
Bryan Stitt
917dfc914f handle more jsonrpc errors as HTTP 200 2023-06-26 22:40:00 -07:00
Bryan Stitt
009fdbe2cf make references compile 2023-06-26 21:38:41 -07:00
yenicelik
4c157cfcf7 made paymentrequired error code instead of introducing a new one 2023-06-25 15:05:27 -04:00
yenicelik
935681fde7 stats subuser + premium access logic 2023-06-25 14:29:54 -04:00
Bryan Stitt
fef03f089f less verbose db_conn and db_replica helpers 2023-06-24 11:11:07 -07:00
Bryan Stitt
8f76d9320d support EIP1271 login 2023-06-24 09:48:31 -07:00
Bryan Stitt
fd661689a3
Tracing (#144)
* tracing

* add tracing and features to match

* use just one hostname crate

* cargo upgrade

* set up pretty logger and sentry layer
2023-06-23 16:28:45 -07:00
Bryan Stitt
2f78e64c5d create empty balance entry if none exists 2023-06-18 16:25:25 -07:00
Bryan Stitt
6deeabe1e1 pretty print errors 2023-06-18 16:14:06 -07:00
Bryan Stitt
5d9365449f simplify max item weight by having the weigher send MAX for big things 2023-06-16 16:14:11 -07:00
Bryan Stitt
a083bc652d
Handle uncle transactions (#129)
* add more columns to handle uncled transactions

* handle payment uncles

* put relations back

* include all the new columns

* lower log levels

* improve block caching

if we have a block with a number, its canonical. uncles don't get returned

* improve disconnect logic

* lint

* clear first changed for new_top_config_receiver

* better logs around config changing

* i guess we do want one apply top_config at the start

* check correct variable for data limits
2023-06-16 00:46:27 -07:00
Bryan Stitt
49c60ac1b5 improve websocket error handling 2023-06-15 09:50:21 -07:00
Bryan Stitt
18835e09da allow empty batches 2023-06-12 21:51:08 -07:00
Bryan Stitt
4a9c1a0ce6 move user registration into a dedicated function 2023-06-09 18:31:47 -07:00
Bryan Stitt
1f3040f6c7 automated tiers 2023-06-09 12:21:55 -07:00
Bryan Stitt
1d05bc5e89 lower log levels 2023-06-08 11:26:09 -07:00
Bryan Stitt
40bee30730 back to moka 2023-06-07 17:30:05 -07:00