Skip to content

feat: embed genesis.json for known Sei chains#3

Merged
bdchatham merged 1 commit intomainfrom
feat/embedded-chain-genesis
Mar 17, 2026
Merged

feat: embed genesis.json for known Sei chains#3
bdchatham merged 1 commit intomainfrom
feat/embedded-chain-genesis

Conversation

@bdchatham
Copy link
Collaborator

Summary

  • Embed genesis data for pacific-1, atlantic-2, and arctic-1 via go:embed, removing any need to fetch genesis over the network or from S3 for well-known chains
  • GenesisForChain(chainID) returns the embedded genesis.json bytes for a known chain, or an error for unknown chains (caller must supply their own genesis source)
  • KnownChain(chainID) returns chain metadata (ChainInfo with RPC URL and genesis time)
  • KnownChainIDs() enumerates all supported chains

Embedded chains

Chain Size Genesis Time
pacific-1 114 KB 2023-05-22
atlantic-2 711 KB 2023-02-24
arctic-1 1.1 MB 2024-01-25

Test plan

  • All embedded genesis files validated as parseable JSON with correct chain_id and genesis_time
  • Unknown chain IDs return descriptive error
  • KnownChainIDs() returns de-duplicated list
  • All chain entries have non-empty RPC URLs
  • Existing tests unaffected

Embed genesis data for pacific-1, atlantic-2, and arctic-1 via
go:embed, removing any need to fetch genesis over the network or
from S3 for well-known chains.

Provides GenesisForChain(chainID) to retrieve the embedded bytes,
KnownChain(chainID) for chain metadata (RPC URL, genesis time), and
KnownChainIDs() to enumerate supported chains.

Unknown chain IDs return an error, requiring the caller to supply
their own genesis source.
@bdchatham bdchatham marked this pull request as ready for review March 17, 2026 00:53
@bdchatham bdchatham merged commit 7b45aed into main Mar 17, 2026
2 checks passed
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