reth icon indicating copy to clipboard operation
reth copied to clipboard

feat(chains): add support for custom/ephemeral chains

Open aleexeyy opened this issue 1 week ago • 0 comments
trafficstars

Title

Add spec-aware datadir naming via EthChainSpec::name()

Summary

This PR introduces spec-aware datadir naming to support custom and ephemeral chains while preserving existing behavior for built-in chains.

  • Adds EthChainSpec::name() with a default of chain().to_string() for human-friendly, stable directory naming.
  • Updates resolve_datadir and related helpers to use EthChainSpec instead of plain Chain.
  • Introduces resolve_datadir_for_chain for compatibility with existing chain-only call sites.
  • Propagates spec-based naming across key modules and tests.

Why

Allows custom or ephemeral networks not in alloy-chains to define meaningful datadir folder names instead of numeric chain IDs, improving clarity and usability.

Behavior

  • Built-in chains remain unchanged.
  • Custom chains can override name() for stable folder naming.

Linked Issue

Closes #19635

aleexeyy avatar Nov 12 '25 14:11 aleexeyy