Skip to content

Commit

Permalink
feat: websockets (#1)
Browse files Browse the repository at this point in the history
This PR:

1. Replaces the polling of JSON-RPC to a websockets subscription to the
local node.
2. Prior to updating the shared state, a sanity check is done in order
to ensure the latest block received by websockets can actually be polled
by JSON-RPC, ensuring the same path used by services is checked.
  • Loading branch information
mfw78 authored Apr 22, 2024
1 parent 6d863b6 commit 0188ff6
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 71 deletions.
202 changes: 200 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ alloy = { git = "https://github.com/alloy-rs/alloy", rev = "bfd0fda", features =
"network",
"providers",
"provider-http",
"provider-ws",
"rpc-client",
"rpc-types-eth",
] }
Expand All @@ -30,6 +31,7 @@ tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync"] }
tracing = { version = "0.1.40", features = ["attributes"] }
tracing-opentelemetry = "0.23.0"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
url = "2.5.0"
warp = "0.3.7"

[profile.maxperf]
Expand Down
Loading

0 comments on commit 0188ff6

Please sign in to comment.