From 942200bff4e2ee985aaca70f982953ea786f923b Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Mon, 31 Mar 2025 21:13:35 +0200 Subject: [PATCH] fix: mark chain as global and update usage (#15409) --- .github/workflows/sync.yml | 4 ++-- book/cli/reth/db/checksum.md | 10 ++++++++++ book/cli/reth/db/clear.md | 10 ++++++++++ book/cli/reth/db/clear/mdbx.md | 10 ++++++++++ book/cli/reth/db/clear/static-file.md | 10 ++++++++++ book/cli/reth/db/diff.md | 10 ++++++++++ book/cli/reth/db/drop.md | 10 ++++++++++ book/cli/reth/db/get.md | 10 ++++++++++ book/cli/reth/db/get/mdbx.md | 10 ++++++++++ book/cli/reth/db/get/static-file.md | 10 ++++++++++ book/cli/reth/db/list.md | 10 ++++++++++ book/cli/reth/db/path.md | 10 ++++++++++ book/cli/reth/db/stats.md | 10 ++++++++++ book/cli/reth/db/version.md | 10 ++++++++++ book/cli/reth/stage/dump/account-hashing.md | 10 ++++++++++ book/cli/reth/stage/dump/execution.md | 10 ++++++++++ book/cli/reth/stage/dump/merkle.md | 10 ++++++++++ book/cli/reth/stage/dump/storage-hashing.md | 10 ++++++++++ book/cli/reth/stage/unwind/num-blocks.md | 10 ++++++++++ book/cli/reth/stage/unwind/to-block.md | 10 ++++++++++ crates/cli/commands/src/common.rs | 3 ++- 21 files changed, 194 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index a19ca08d71..952cab361a 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -58,7 +58,7 @@ jobs: | grep ${{ matrix.chain.tip }} - name: Run stage unwind for 100 blocks run: | - ${{ matrix.chain.bin }} stage --chain ${{ matrix.chain.chain }} unwind num-blocks 100 + ${{ matrix.chain.bin }} stage unwind num-blocks 100 --chain ${{ matrix.chain.chain }} - name: Run stage unwind to block hash run: | - ${{ matrix.chain.bin }} stage --chain ${{ matrix.chain.chain }} unwind to-block ${{ matrix.chain.unwind-target }} + ${{ matrix.chain.bin }} stage unwind to-block ${{ matrix.chain.unwind-target }} --chain ${{ matrix.chain.chain }} diff --git a/book/cli/reth/db/checksum.md b/book/cli/reth/db/checksum.md index a422454fd0..cab918cd2d 100644 --- a/book/cli/reth/db/checksum.md +++ b/book/cli/reth/db/checksum.md @@ -36,6 +36,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/clear.md b/book/cli/reth/db/clear.md index 554499a36d..646ec98311 100644 --- a/book/cli/reth/db/clear.md +++ b/book/cli/reth/db/clear.md @@ -28,6 +28,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/clear/mdbx.md b/book/cli/reth/db/clear/mdbx.md index 50f3731467..dab2e2eeab 100644 --- a/book/cli/reth/db/clear/mdbx.md +++ b/book/cli/reth/db/clear/mdbx.md @@ -27,6 +27,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/clear/static-file.md b/book/cli/reth/db/clear/static-file.md index 78f2b9cbce..a0348c2f97 100644 --- a/book/cli/reth/db/clear/static-file.md +++ b/book/cli/reth/db/clear/static-file.md @@ -31,6 +31,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/diff.md b/book/cli/reth/db/diff.md index efb9e7d32e..ebdf2781c4 100644 --- a/book/cli/reth/db/diff.md +++ b/book/cli/reth/db/diff.md @@ -60,6 +60,16 @@ Database: --output The output directory for the diff report. +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/drop.md b/book/cli/reth/db/drop.md index c23f6d93c5..0b76272a3f 100644 --- a/book/cli/reth/db/drop.md +++ b/book/cli/reth/db/drop.md @@ -26,6 +26,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/get.md b/book/cli/reth/db/get.md index 266e46e5ca..cdafd16a60 100644 --- a/book/cli/reth/db/get.md +++ b/book/cli/reth/db/get.md @@ -28,6 +28,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/get/mdbx.md b/book/cli/reth/db/get/mdbx.md index 18fa76edaa..fbc034cf94 100644 --- a/book/cli/reth/db/get/mdbx.md +++ b/book/cli/reth/db/get/mdbx.md @@ -36,6 +36,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/get/static-file.md b/book/cli/reth/db/get/static-file.md index 8c15191384..e4f0394bd6 100644 --- a/book/cli/reth/db/get/static-file.md +++ b/book/cli/reth/db/get/static-file.md @@ -37,6 +37,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/list.md b/book/cli/reth/db/list.md index 9b64a70a07..5a274ded47 100644 --- a/book/cli/reth/db/list.md +++ b/book/cli/reth/db/list.md @@ -69,6 +69,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/path.md b/book/cli/reth/db/path.md index a711acad0d..81f37868ce 100644 --- a/book/cli/reth/db/path.md +++ b/book/cli/reth/db/path.md @@ -23,6 +23,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/stats.md b/book/cli/reth/db/stats.md index 2ed087ae1c..e06802af35 100644 --- a/book/cli/reth/db/stats.md +++ b/book/cli/reth/db/stats.md @@ -36,6 +36,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/db/version.md b/book/cli/reth/db/version.md index 549f970917..9555f800af 100644 --- a/book/cli/reth/db/version.md +++ b/book/cli/reth/db/version.md @@ -23,6 +23,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/stage/dump/account-hashing.md b/book/cli/reth/stage/dump/account-hashing.md index 46145ed8d4..07dc922e12 100644 --- a/book/cli/reth/stage/dump/account-hashing.md +++ b/book/cli/reth/stage/dump/account-hashing.md @@ -35,6 +35,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/stage/dump/execution.md b/book/cli/reth/stage/dump/execution.md index 836265a6f8..642ff1aad9 100644 --- a/book/cli/reth/stage/dump/execution.md +++ b/book/cli/reth/stage/dump/execution.md @@ -35,6 +35,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/stage/dump/merkle.md b/book/cli/reth/stage/dump/merkle.md index 90fa0f0f52..8059d4525f 100644 --- a/book/cli/reth/stage/dump/merkle.md +++ b/book/cli/reth/stage/dump/merkle.md @@ -35,6 +35,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/stage/dump/storage-hashing.md b/book/cli/reth/stage/dump/storage-hashing.md index 2b078570f5..2eaa6f6314 100644 --- a/book/cli/reth/stage/dump/storage-hashing.md +++ b/book/cli/reth/stage/dump/storage-hashing.md @@ -35,6 +35,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/stage/unwind/num-blocks.md b/book/cli/reth/stage/unwind/num-blocks.md index c74f75556f..cbfc3013b3 100644 --- a/book/cli/reth/stage/unwind/num-blocks.md +++ b/book/cli/reth/stage/unwind/num-blocks.md @@ -27,6 +27,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/book/cli/reth/stage/unwind/to-block.md b/book/cli/reth/stage/unwind/to-block.md index ea710b953a..77f2508ac3 100644 --- a/book/cli/reth/stage/unwind/to-block.md +++ b/book/cli/reth/stage/unwind/to-block.md @@ -27,6 +27,16 @@ Options: -h, --help Print help (see a summary with '-h') +Datadir: + --chain + The chain this node is running. + Possible values are either a built-in chain or the path to a chain specification file. + + Built-in chains: + mainnet, sepolia, holesky, hoodi, dev + + [default: mainnet] + Logging: --log.stdout.format The format to use for logs written to stdout diff --git a/crates/cli/commands/src/common.rs b/crates/cli/commands/src/common.rs index ee1483e169..5083bf10fd 100644 --- a/crates/cli/commands/src/common.rs +++ b/crates/cli/commands/src/common.rs @@ -44,7 +44,8 @@ pub struct EnvironmentArgs { value_name = "CHAIN_OR_PATH", long_help = C::help_message(), default_value = C::SUPPORTED_CHAINS[0], - value_parser = C::parser() + value_parser = C::parser(), + global = true )] pub chain: Arc,