Commit Graph

71 Commits

Author SHA1 Message Date
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
a9d5006ced get rid of async recursion 2023-10-10 23:32:50 -07:00
Bryan Stitt
86f70332be use web3_rpcs.blocks_by_hash.get instead of something that might make queries 2023-10-10 20:54:17 -07:00
Bryan Stitt
e917a11d6c
Suprisingly large refactor to get ids everywhere (#222)
* cargo upgrade --incompatible and update

* first draft at suprisingly_large_refactor_to_get_ids_everywhere

* put app in a task_local

* ref cleanup

* use a OnceLock instead of a tokio local

* test more methods

* APP isn't set in all tests

* it compiles. tests fail. todos still open

* use the app only when necessary

* more tests. less panic

* less verbose debug impl

* short enum names

* move kafka and secrets to their own files

* main tests pass

* add debug chain block time

* helper for stats that ignores internal stats

* Update Jenkinsfile (#223)

* more tests

---------

Co-authored-by: Pewxz <124064710+pewxz@users.noreply.github.com>
2023-10-03 13:46:27 -07:00
Bryan Stitt
abe516c21e turn down logging on eth_getLogs for now 2023-09-29 10:37:49 -07:00
Bryan Stitt
e4d3a736d0 return an error earlier 2023-09-19 19:22:28 -07:00
Bryan Stitt
1fd8f6f383
Deduped broadcast channel (#209)
* upgrade and start adding deduped_broadcast

* basic test

* accept arg for cache ttl

* first pass at bringing the tx firehose back

* try_send instead of send since there aren't always receivers

* deduped broadcaster needs the try send

* track counts and include in /status

* use config for enable subscribe_txs
2023-09-13 12:05:47 -07:00
Bryan Stitt
54341c4654 learn to cache more 2023-08-15 16:37:53 -07:00
Bryan Stitt
70d75d5acb exit early when empty params array 2023-08-15 16:20:25 -07:00
Bryan Stitt
b742a25729 dont return max depth so we can do cannonical block faster 2023-08-15 16:12:40 -07:00
Bryan Stitt
3f932b9d57 also bump cli version 2023-08-08 15:58:21 -07:00
Bryan Stitt
a844c5f624 remove accidental todos 2023-08-08 15:52:11 -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
74224977b7 Revert "Revert "remove max_tries for now""
This reverts commit 5fbcb75157cd012b723c9d2b37bb7947e5e05aa5.
2023-08-03 09:15:31 -07:00
Bryan Stitt
5fbcb75157 Revert "remove max_tries for now"
This reverts commit e0d7d11398163bb8554cd6736d1dbc7f55caaa24.
2023-08-03 00:22:45 -07:00
Bryan Stitt
e0d7d11398 remove max_tries for now
i think this is causing problematic looping
2023-08-02 22:07:28 -07:00
Bryan Stitt
ca92b3646c cache eth_feeHistory and eth_gasPrice 2023-07-28 10:41:23 -07:00
Bryan Stitt
1185b2d0f9 cache eth_maxPriorityFeePerGas with the head block 2023-07-28 10:38:12 -07:00
Bryan Stitt
dce3540ee3 less authorization and remove pending txs for now 2023-07-13 11:01:16 -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
2ea53cc396 could not get block from params should be error level 2023-07-09 22:52:29 -07:00
Bryan Stitt
b476a56ad6 check for U64 instead of just BlockNumber
i thouht block number would be smart enough to deserialize, but it seems like not
2023-07-07 15:28:24 -07:00
Bryan Stitt
512bcf305b lint 2023-07-07 14:06:35 -07:00
Bryan Stitt
f6fea1541b this is warn, not an error 2023-07-07 12:21:25 -07:00
Bryan Stitt
0e3fdfa0ea cache eth_getLogs fromBlock properly 2023-07-05 23:13:42 -07:00
Bryan Stitt
357701bccc no need to check the caches, we have latest block 2023-06-29 00:06:58 -07:00
Bryan Stitt
ebceb0d7d6 descriptive text on NotImplemented errors 2023-06-28 21:47:06 -07:00
Bryan Stitt
d0e77237fa raise log level 2023-06-28 21:38:57 -07:00
Bryan Stitt
fba41b9bc2 lots of tracing improvements 2023-06-28 21:30:00 -07:00
Bryan Stitt
e8d992168c more logs and retries 2023-06-28 18:36:17 -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
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
3c2f95de10
Improve max wait and timeouts (#137)
* pass max wait with more functions

* move rpc_head_str higher up to use it in all the logs

* refresh consensus at double the block time

* new pricing that also includes archive check

* lint

* don't clone method

* put caches into one list

they serialize with their name, so it will still be easy to tell them apart

* more consistent waiting. still waits more than I want right now

* clean up default max waits

* more timeouts
2023-06-20 14:22:14 -07:00
Bryan Stitt
d64761403b Cow instead of String 2023-05-30 23:17:05 -07:00
Bryan Stitt
fd8bba4bdd most of these are for the whole app, not just the frontend 2023-05-30 21:26:11 -07:00
Bryan Stitt
cebe8ed1ea
Request refactor (#99)
* wip

* AsRef finally works like i wanted

* actually return the block

* start adding async trait

* remove stale import

* include id in the error response when possible

* remove stale comments
2023-05-30 16:32:34 -07:00
Bryan Stitt
56fdf48129
Send transactions to protected and public rpcs (#57)
* move protected transactions into their own function and dry stats sending

* cargo upgrade

* comments

* time to live instead of time to idle

* minor workaround for eth_chainId

* cargo upgrade
2023-04-24 11:00:12 -07:00
Rory Neithinger
ffdf25787f Merge branch 'stats_v3' of github.com:yenicelik/web3-proxy into Web3ProxyError 2023-03-31 23:23:30 -07:00
Rory Neithinger
beac7ee017 better error handling for proxy_web3_rpc() 2023-03-19 18:52:28 -07:00
Bryan Stitt
b480e92259 don't panic if param is not set 2023-03-09 09:32:30 -08:00
Bryan Stitt
6067369ee3 add inotify and rpc disconnect 2023-02-27 12:50:57 -08:00
Bryan Stitt
475e521918 cache getLogs with blockhash 2023-02-26 23:08:00 -08:00
Bryan Stitt
580965ef83 get instead of remove 2023-02-24 23:31:10 -08:00
Bryan Stitt
824a6fa1f0 well it compiles. doesnt work yet. but it compiles 2023-02-14 12:14:50 -08:00
Bryan Stitt
c008f50943 use http and ws providers in a single config 2023-02-12 01:40:01 -08:00
Bryan Stitt
f1bc00082a include to_block more places 2023-02-10 20:45:57 -08:00
Bryan Stitt
0f280ce483 cargo upgrade and shorten variable names
also begin adding a latency tracker for rpc stats
2023-02-06 09:55:27 -08:00
Bryan Stitt
0fcff5947a one more take 2023-01-31 11:05:29 -08:00
Bryan Stitt
a76a45f63a clone instead of take 2023-01-31 09:47:19 -08:00