Skip to content
Merged
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion packages/cli/src/options/beaconNodeOptions/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const options: CliCommandOptions<ChainArgs> = {

serveHistoricalState: {
description:
"Regenerate finalized beacon states on demand and serve them via the REST API (e.g. `/eth/v2/debug/beacon/states/{state_id}`). \
"Regenerate finalized beacon states on demand and serve them via the REST API (e.g. `/eth/v2/debug/beacon/states/&#123;state_id&#125;`). \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

how does &#123;state_id&#125; render if you run --help? we should account for that too

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right — the entity wouldn't decode in --help (yargs prints the description string verbatim, no HTML rendering), so users would see literal &#123;state_id&#125; in the terminal. Bad fix.

Fixed properly in 1c4b5e8: updated sanitizeDescription() in packages/cli/docsgen/markdown.ts to skip content inside backtick code spans, and reverted the description back to {state_id} (literal). Now:

  • --help: shows {state_id} ✓
  • Docs page: sanitizer leaves backtick content alone, MDX renders inline code as literal text → {state_id} ✓

Updated PR scope from "swap placeholder workaround" to "fix the sanitizer properly" — the underlying bug I called out in the original PR description. Will update the PR title/body to match.

Does not backfill historical data, only states the node already has (since genesis sync or `--checkpointState`) can be regenerated. \
Regeneration cost depends on `--chain.archiveStateEpochFrequency` and may affect validator performance.",
type: "boolean",
Expand Down
Loading