Conversation
| A handful of reorgs per day is normal on any L2. | ||
| If `reorgs_detected_total` climbs fast, double-check that your RPC endpoint is following the canonical chain — a misconfigured provider may be serving a stale fork. | ||
|
|
||
| ## Related Pages |
There was a problem hiding this comment.
Heading case violation — sentence case required per docs/AGENTS.md.
| ## Related Pages | |
| ## Related pages |
| 1. **`--genesis-file`** — the MegaETH genesis JSON, which encodes the chain ID and hardfork activation schedule. | ||
| Obtain it from the [MegaETH repository](https://github.com/megaeth-labs) or the docs release page. | ||
| 2. **`--start-block`** — a **trusted block hash** that anchors your local chain. | ||
| Pick any recent block hash you trust (e.g. copied from a known explorer or from another operator already running the validator). |
There was a problem hiding this comment.
Missing comma after e.g. — standard usage is e.g.,.
| Pick any recent block hash you trust (e.g. copied from a known explorer or from another operator already running the validator). | |
| Pick any recent block hash you trust (e.g., copied from a known explorer or from another operator already running the validator). |
| --data-dir "$DATA_DIR" \ | ||
| --rpc-endpoint "$RPC_ENDPOINT" \ | ||
| --witness-endpoint "$WITNESS_ENDPOINT" \ | ||
| --genesis-file "$GENESIS_FILE" \ |
There was a problem hiding this comment.
The script always passes --genesis-file, but the prose above (line 83) says to omit it on subsequent runs. If the binary errors when --genesis-file is given but the DB is already initialized, this script will break on restart. Either:
- Confirm the binary silently ignores
--genesis-fileon re-runs (and add a note), or - Make the flag conditional:
${GENESIS_FILE:+--genesis-file "$GENESIS_FILE" \}
| On the first launch, the validator needs two pieces of bootstrap information: | ||
|
|
||
| 1. **`--genesis-file`** — the MegaETH genesis JSON, which encodes the chain ID and hardfork activation schedule. | ||
| Obtain it from the [MegaETH repository](https://github.com/megaeth-labs) or the docs release page. |
There was a problem hiding this comment.
This link goes to the GitHub org root, not a specific repo or file. An operator following these steps can't actually find the genesis file from this link. Point to the specific file or repo (e.g., the stateless-validator repo's README or a releases page).
ReviewGood addition — well-structured, thorough CLI reference, and the metrics table is genuinely useful. A few things to address before merging. Missing Four inline comments on specific lines — see the diff for details:
|
| # stateless_validator_local_chain_height 13592258 | ||
| # stateless_validator_remote_chain_height 13592262 | ||
| # stateless_validator_validation_lag 4 |
There was a problem hiding this comment.
The example output is incorrect. In Prometheus text format, # marks HELP/TYPE metadata lines — gauge values are emitted on lines without #. This grep would actually return both the metadata lines and the bare value lines; what's shown here omits the values entirely.
| # stateless_validator_local_chain_height 13592258 | |
| # stateless_validator_remote_chain_height 13592262 | |
| # stateless_validator_validation_lag 4 | |
| stateless_validator_local_chain_height 13592258 | |
| stateless_validator_remote_chain_height 13592262 | |
| stateless_validator_validation_lag 4 |
| ## Related Pages | ||
|
|
||
| - [Architecture](../architecture.md) — how transactions flow through MegaETH and where validators fit in | ||
| - [Mini-Blocks](../mini-block.md) — the two block types the validator re-executes |
There was a problem hiding this comment.
Terminology violation — per docs/AGENTS.md, the term is always mini-block (lowercase).
| - [Mini-Blocks](../mini-block.md) — the two block types the validator re-executes | |
| - [mini-blocks](../mini-block.md) — the two block types the validator re-executes |
|
Good overall — well-structured, covers the full operator lifecycle, and the CLI flag tables are thorough. A few issues to resolve before merging: 4 existing threads still open (not yet addressed):
2 new issues (inline comments added):
|
Summary
docs/stateless/stateless-validator.md— a guide for operators running a MegaETH stateless validator (system requirements, installation, first-run bootstrap via--genesis-file+--start-block, CLI flags mirrored by env vars, logging config, background deployment, Prometheus metrics, trust model, and troubleshooting).docs/SUMMARY.md, alongside User Guide and Developer Docs.stateless-validatorsource: clap flag definitions inbin/stateless-validator/src/main.rs,LogArgsincrates/stateless-common/src/logging.rs, and the metric names exposed by the running binary.Test plan
../architecture.md,../mini-block.md)scripts/validator-status.sh)descriptionappears as SEO meta{% hint style="info" %}) render correctly