Commit Graph

277 Commits

Author SHA1 Message Date
Bryan Stitt
7bd44b01df lint and fixes that rls missed cuz of the version change 2023-10-26 11:04:17 -07:00
Bryan Stitt
3fd046c89f include backend_rpcs when fixing eth_sendRawTransaction arrays 2023-10-25 12:33:39 -07:00
Bryan Stitt
5fb64614fe use pin for some sleeps 2023-10-23 23:06:02 -07:00
Bryan Stitt
32935644de Revert "streaming responses require premium instead of debug responses"
This reverts commit 0a4a6d783237af53a3fc4fa4892d891a2357b547.
2023-10-23 17:31:23 -07:00
Bryan Stitt
0a4a6d7832 streaming responses require premium instead of debug responses 2023-10-23 15:47:19 -07:00
Bryan Stitt
45fb2e5ea6 require premium for debug module 2023-10-23 15:38:44 -07:00
Bryan Stitt
4b44e787cb return early if no bytes given for the transaction 2023-10-23 13:45:51 -07:00
Bryan Stitt
2019888957 improve eth_sendRawTransaction 2023-10-20 12:02:03 -07:00
Bryan Stitt
2de4654fb2 check one more error message 2023-10-17 10:05:49 -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
369abae2fa make rdkafka fully optional 2023-10-16 12:06:10 -07:00
Bryan Stitt
b030773881 rewest timeout should be shorter than erigons 2023-10-16 11:10:46 -07:00
Bryan Stitt
7a81b1654b disable compression 2023-10-16 11:08:59 -07:00
Bryan Stitt
ce3fbca7b6 fix eth_sendRawTransaction 2023-10-13 19:41:59 -07:00
Bryan Stitt
7cd7257058 update comments 2023-10-13 18:01:11 -07:00
Bryan Stitt
aa3b40e03f add a spot for retries 2023-10-13 00:22:57 -07:00
Bryan Stitt
93533eabc7 Revert "try a RwLock (more should be done if this works)"
This reverts commit 9aa33dae2d3869965ba131e8e561338f2298fd56.
2023-10-12 23:33:25 -07:00
Bryan Stitt
9786fb58b2 use select_all more 2023-10-12 19:23:22 -07:00
Bryan Stitt
6bd5ca3277 only select on the balanced handle 2023-10-12 16:52:39 -07:00
Bryan Stitt
f73fd66b89 dont sleep at start
that was a gross fix anyways
2023-10-12 16:25:26 -07:00
Bryan Stitt
4009995bb3 move retries into request_with_metadata 2023-10-11 20:58:13 -07:00
Bryan Stitt
9aa33dae2d try a RwLock (more should be done if this works) 2023-10-11 10:55:45 -07:00
Bryan Stitt
e43309abc0 move permits around and start rpcs slower 2023-10-11 04:18:53 -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
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
cc2eb9e862 no more overflow on the pending txid firehose 2023-10-07 03:41:11 -07:00
Bryan Stitt
c1df05f8b6 fix sort order (hopefully) 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
f704d1c4aa more refs will cut down on cloning an Arc multiple times that isn't really necessary 2023-10-07 00:35:22 -07:00
Bryan Stitt
9258d36e6a refactor rpc selection 2023-10-07 00:35:22 -07:00
Bryan Stitt
d6e9f61ee2 only send to 2 servers (not 3x2) 2023-10-06 00:04:46 -07:00
Bryan Stitt
249ad884fc only send to 3 servers 2023-10-05 20:28:22 -07:00
Bryan Stitt
32862937ad fix newHead serialization 2023-10-05 11:01:24 -07:00
Bryan Stitt
f153b2b805
add method/params to duplicate stream (#224)
Co-authored-by: Rory Neithinger <rory@llamanodes.com>
2023-10-04 21:53:46 -07:00
Bryan Stitt
c1c127e6bd try_send_all_synced_connections for getting transactions 2023-10-03 21:35:25 -07:00
Bryan Stitt
dd3fc165e3 error instead of panic 2023-10-03 19:05:15 -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
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
f79c8adbf9
add a shared pool of bonus concurrency (#218) 2023-09-25 12:34:00 -07:00
Bryan Stitt
3aee9071ad require active premium for most websocket subscriptions
only newHeads is allowed without premium
2023-09-25 10:38:55 -07:00
Bryan Stitt
9b2f27862d remove unnecessary yield_nows 2023-09-21 11:22:20 -07:00
Bryan Stitt
dc037e663a
tokio spawn the cached future (#217)
* tokio spawn the cached future

* lint
2023-09-20 10:11:07 -07:00
Bryan Stitt
8a0c2dfdc1 try timeout inside the cache get again but with shorter timeouts 2023-09-19 18:37:49 -07:00
Bryan Stitt
0437d9bfc9 sigh 2023-09-19 15:38:40 -07:00
Bryan Stitt
fe2493236e missing & 2023-09-19 15:28:53 -07:00
Bryan Stitt
e137d813af this fix got lost in rebases 2023-09-19 15:28:07 -07:00
Bryan Stitt
8b08828473 make it compile. my editor didnt show any errors 🤷 2023-09-19 14:57:42 -07:00
Bryan Stitt
10c4ffc9d2 smarter archive retry 2023-09-19 10:56:54 -07:00
Bryan Stitt
60ffbdfbb2 move the timeout outside the try_get_with 2023-09-19 09:24:07 -07:00
Bryan Stitt
6d4d8ea840 minor refactor of error retry logic 2023-09-18 23:17:55 -07:00