Skip to content

Feat(tools): Add a tool to generate a custom genesis file based on a template and existing chain data#143

Closed
dloghin wants to merge 7 commits intomainfrom
dumi/gen-genesis
Closed

Feat(tools): Add a tool to generate a custom genesis file based on a template and existing chain data#143
dloghin wants to merge 7 commits intomainfrom
dumi/gen-genesis

Conversation

@dloghin
Copy link
Copy Markdown
Contributor

@dloghin dloghin commented Feb 9, 2026

Description

Adding a tool to bin/tools crate to allow the creation of a genesis file starting from a template genesis file and existing chain data. This is useful when we want to run a local devnet with XLayer testnet or mainnet data (e.g., from a snapshot).

The tool can be used as follows:

just install-tools
xlayer-reth-tools gen-genesis --datadir <path-to-existing-xlayer-reth-datadir> --chain xlayer-testnet --template-genesis ./config-op/genesis.json --output ./config-op/genesis-reth.json

We can also run this via Docker, by creating the xlayer-reth-tools image:

just build-docker-tools

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Code Guidelines

Before submitting your PR, please review the relevant code guidelines in the docs/ folder:

Specific Guidelines by Component:

Checklist

  • I have reviewed the relevant code guidelines in the docs/ folder
  • My code follows the coding standards of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Testing

Additional Notes

@dloghin dloghin closed this Feb 27, 2026
@dloghin dloghin deleted the dumi/gen-genesis branch March 4, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant