Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: --debug.etherscan for fake consensus client #8082

Merged
merged 29 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
826722f
feat: --debug.etherscan for fake consensus client
sevazhidkov May 3, 2024
603db3e
add todo to handle errors gracefully
sevazhidkov May 3, 2024
7789774
fix clippy
sevazhidkov May 3, 2024
90bea52
Merge remote-tracking branch 'origin/main' into seva/rpc-consensus
sevazhidkov May 8, 2024
e11d850
add genericness over block provider
sevazhidkov May 10, 2024
aa2acf9
Merge remote-tracking branch 'origin/main' into seva/rpc-consensus
sevazhidkov May 10, 2024
9807037
lock update
sevazhidkov May 10, 2024
5e8116c
Merge remote-tracking branch 'upstream/main' into seva/rpc-consensus
sevazhidkov May 17, 2024
ef3b066
move get_or_fetch_previous_block to associated trait method of block …
sevazhidkov May 17, 2024
ed22651
more gentle error handling for etherscan
sevazhidkov May 17, 2024
7c40a26
remove todo
sevazhidkov May 17, 2024
0e6cae9
clippy
sevazhidkov May 17, 2024
cc12182
remove dependency on opentls
sevazhidkov May 17, 2024
8cdb032
chore: smol touchups
mattsse May 22, 2024
9f96d0b
Merge remote-tracking branch 'refs/remotes/upstream/main' into seva/r…
sevazhidkov May 23, 2024
c3d56e6
review fixes
sevazhidkov May 30, 2024
64a0788
Merge remote-tracking branch 'refs/remotes/upstream/main' into seva/r…
sevazhidkov May 30, 2024
9b24ae7
use only ws endpoint
sevazhidkov May 30, 2024
223ccf9
clippy
sevazhidkov May 30, 2024
06497af
update cli field descriptions
sevazhidkov May 30, 2024
bbb0420
fmt
sevazhidkov May 30, 2024
2ecb0f9
autoimpl for trait
sevazhidkov May 30, 2024
1b231f2
Merge remote-tracking branch 'refs/remotes/upstream/main' into seva/r…
sevazhidkov Jun 9, 2024
d1d3ec8
Merge remote-tracking branch 'refs/remotes/upstream/main' into seva/r…
sevazhidkov Jun 9, 2024
ffbf684
lock bump
sevazhidkov Jun 9, 2024
b7d4744
clippy
sevazhidkov Jun 9, 2024
6bd3617
clippy
sevazhidkov Jun 9, 2024
f837517
Merge remote-tracking branch 'origin/main' into seva/rpc-consensus
shekhirin Jun 10, 2024
c2da02b
chore: touchups
mattsse Jun 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 170 additions & 3 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ members = [
"crates/consensus/beacon/",
"crates/consensus/common/",
"crates/consensus/consensus/",
"crates/consensus/debug-client/",
"crates/ethereum-forks/",
"crates/e2e-test-utils/",
"crates/engine-primitives/",
"crates/errors/",
Expand Down Expand Up @@ -246,6 +248,7 @@ reth-codecs-derive = { path = "crates/storage/codecs/derive" }
reth-config = { path = "crates/config" }
reth-consensus = { path = "crates/consensus/consensus" }
reth-consensus-common = { path = "crates/consensus/common" }
reth-consensus-debug-client = { path = "crates/consensus/debug-client" }
reth-db = { path = "crates/storage/db", default-features = false }
reth-db-api = { path = "crates/storage/db-api" }
reth-db-common = { path = "crates/storage/db-common" }
Expand Down
6 changes: 6 additions & 0 deletions book/cli/reth/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,12 @@ Debug:
--debug.max-block <MAX_BLOCK>
Runs the sync only up to the specified block

--debug.etherscan [<ETHERSCAN_API_URL>]
Runs a fake consensus client that advances the chain using recent block hashes on Etherscan. If specified, requires an `ETHERSCAN_API_KEY` environment variable

--debug.rpc-consensus-ws <RPC_CONSENSUS_WS>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

limiting this to ws is reasonable, no need to also support HTTP polling

Runs a fake consensus client using blocks fetched from an RPC `WebSocket` endpoint

--debug.skip-fcu <SKIP_FCU>
If provided, the engine will skip `n` consecutive FCUs

Expand Down
34 changes: 34 additions & 0 deletions crates/consensus/debug-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "reth-consensus-debug-client"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
# reth
reth-node-api.workspace = true
reth-node-core.workspace = true
reth-rpc-api.workspace = true
reth-rpc-types.workspace = true
reth-rpc-builder.workspace = true
reth-tracing.workspace = true

# ethereum
alloy-consensus = { workspace = true, features = ["serde"] }
alloy-eips.workspace = true
alloy-provider = { workspace = true, features = ["ws"] }

auto_impl.workspace = true
futures.workspace = true
eyre.workspace = true
reqwest = { workspace = true, features = ["rustls-tls", "json"] }
serde = { workspace = true, features = ["derive"] }
tokio = { workspace = true, features = ["time"] }

ringbuffer = "0.15.0"
Loading
Loading