Commit Graph

101 Commits

Author SHA1 Message Date
Bryan Stitt
8cfbbfe1b3 use default derive helpers 2023-06-24 20:39:46 -07:00
Bryan Stitt
1d6e1ef9af polish error logs 2023-06-24 15:24:46 -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
b7935f77fc spawn recording latency 2023-06-19 17:46:58 -07:00
Bryan Stitt
c3ae4ded2b move data to the right places 2023-06-18 21:42:16 -07:00
Bryan Stitt
825ba006f1 move floats and durations around for latency tracking 2023-06-18 10:46:22 -07:00
Bryan Stitt
e54299beca rolling median for choosing tier 2023-06-18 09:53:36 -07:00
Bryan Stitt
b8f429d70a improvements to popularity_contesst 2023-06-13 11:51:19 -07:00
Bryan Stitt
c771479d94 use WyRand instead of Xoshiro 2023-06-12 19:46:36 -07:00
Bryan Stitt
1a8f799969
we need our own Reconnect (#124)
* first pass at handling different return data limits

* put ws_provider in an arcswap

* add min max_latency

* add min max_latency

* subscribe with reconnect

* better logging around reconnect

* select on both watches

* subscribe to the correct watch
2023-06-12 18:58:51 -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
651f0fcad3 lint 2023-05-23 14:51:34 -07:00
Bryan Stitt
78f247fc6c split http and ws provider 2023-05-23 14:40:34 -07:00
Bryan Stitt
3ac15558e3 fix decay time 2023-05-22 15:43:39 -07:00
Bryan Stitt
91eeee23e2 use ether's reconnects instead of our own which need a lock (wip) 2023-05-22 15:32:27 -07:00
Bryan Stitt
2080739865
Quick cache (#70)
* quick cache and allocate less

* improve /status cache

* prepare to cache raw transaction hashes so we dont dos our backends

* simple benchmark for /health and /status

* mut not needed with atomics

* DRY all the status pages

* use u64 instead of bytes for subscriptions

* fix setting earliest_retry_at and improve logs

* Revert "use kanal instead of flume or tokio channels (#68)"

This reverts commit 510612d343fc51338a8a4282dcc229b50097835b.

* fix automatic retries

* put relaxed back

* convert error message time to seconds

* assert instead of debug_assert while we debug

* ns instead of seconds

* disable peak_latency for now

* null is the default

* cargo fmt

* comments

* remove request caching for now

* log on exit

* unit weigher for now

* make cache smaller. we need a weigher for prod. just debugging

* oops. we need async

* add todo

* no need for to_string on a RawValue
2023-05-13 11:13:02 -07:00
Bryan Stitt
74a602bc9c wip 2023-05-12 23:20:59 -07:00
Bryan Stitt
a3b97fda9b lint 2023-05-12 23:04:56 -07:00
Bryan Stitt
c54970da0a change ordering and move fetch_add and fetch_sub 2023-05-12 23:00:03 -07:00
Bryan Stitt
36cc884112 Merge remote-tracking branch 'origin/main' into devel 2023-05-11 20:05:47 -07:00
Rory Trent
ec11e210ee
Peak ewma (#63)
* use peak-ewma instead of head for latency calculation

* Implement some suggested changes from PR

* move latency to new package in workspace root

* fix unit tests which now require peak_latency on Web3Rpc

* Switch to atomics for peak-ewma

This change is to avoid locking from tokio::sync::watch.

* add decay calculation to latency reads in peak-ewma

* Add some tests for peak-ewma

* Sensible latency defaults and not blocking on full

* Cleanup and a couple additional comments
2023-05-11 13:09:15 -07:00
Bryan Stitt
1fab1b1d46 oops. lower this log level 2023-04-24 11:21:53 -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
Bryan Stitt
7250a0c155 upgrade ethers to 2.0.2 2023-04-10 15:01:36 -07:00
Bryan Stitt
b460f1701a rename revert_handler to error_handler 2023-04-05 15:34:28 -07:00
yenicelik
0069e76040 latest changes from bryan 2023-04-04 14:40:22 +02:00
yenicelik
0bb3a2dc06 simple changes around bryans comments 2023-03-31 12:43:41 +01:00
yenicelik
345fa6c513 git status 2023-03-30 13:42:56 +01:00
Bryan Stitt
2205a472fd add optional tokio-console and improve reconnect logic 2023-03-22 18:43:13 -07:00
Bryan Stitt
8eff48611c more direct consensus finding code
this hopefully has less bugs. speed isn't super important since this isn't on the host path.
2023-03-22 13:10:15 -07:00
Bryan Stitt
eb4d05a520 stats v2
rebased all my commits and squashed them down to one
2023-03-04 20:48:49 +01:00
Bryan Stitt
738815244d change ewma calculation 2023-02-16 00:26:58 -08:00
Bryan Stitt
4916188d5c theres a perf regression in here somewhere 2023-02-15 21:54:07 -08:00
Bryan Stitt
91cab8ffe2 comment 2023-02-15 21:09:39 -08:00
Bryan Stitt
3c9576c13b yes health, no channel 2023-02-15 15:52:42 -08:00
Bryan Stitt
056670d29a health check and latency recordings 2023-02-15 15:31:59 -08:00
Bryan Stitt
1fb4dd6ccc i think it works 2023-02-15 12:33:43 -08:00
Bryan Stitt
c65ffc9ce0 getting close 2023-02-14 17:41:40 -08:00
Bryan Stitt
70105bc7bb variable rename 2023-02-12 10:22:20 -08:00
Bryan Stitt
c008f50943 use http and ws providers in a single config 2023-02-12 01:40:01 -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
f2d35ba5eb remove metered in favor of influxdb stats 2023-02-05 18:17:26 -08:00
Bryan Stitt
f2260ecdba don't require hard limit send 2023-01-25 10:01:36 -08:00
Bryan Stitt
cffc60e7f6 improve responses when blocks are not available 2023-01-24 22:45:20 -08:00
Bryan Stitt
694e552b5d improve waiting for sync when rate limited 2023-01-24 20:45:03 -08:00
Bryan Stitt
90d3371eee improved rate limiting on websockets 2023-01-18 16:17:47 -08:00
Bryan Stitt
d7c75f843e add stub try_proxy_connection 2023-01-16 22:54:40 -08:00
Bryan Stitt
f27c764a07 more logs 2022-12-19 15:59:01 -08:00
Bryan Stitt
2a19d9791b more logging 2022-12-19 13:53:38 -08:00