Skip to content

feat: add genesis to the tempo instances, which changes the genesis before the node starts - #115

Merged
jxom merged 2 commits into
mainfrom
claude/tempo-genesis-option
Oct 23, 2026
Merged

jxom merged 2 commits into
mainfrom
claude/tempo-genesis-option

Conversation

@jxom

@jxom jxom commented Oct 23, 2026

Copy link
Copy Markdown
Member

Adds a genesis option to Instance.tempo and prool/testcontainers' Instance.tempo. It receives the dumped genesis of the selected chain, after hardfork applies, and returns the genesis that the node starts from. Without chain, it starts from the dev chain, as hardfork does.

Tempo's dev genesis has no field for some settings that only a genesis sets, such as configurableAccountRecoveryFactory (TIP-1107), which no published image sets yet. Today a caller sets one by running dump-genesis in its own container and starting a generic one from the edited file.

Instance.tempo({
  genesis: (genesis) => ({
    ...genesis,
    config: { ...genesis.config, configurableAccountRecoveryFactory: '0x7171717171717171717171717171717171717171' },
  }),
})
  • prepareGenesis in src/internal/tempoGenesis.ts applies hardfork, then genesis. Both instances use it.
  • The process instance keeps a changed genesis's data in tempo.<port>.genesis-<digest>, keyed by the SHA-256 of the final genesis, so a node never reuses data from another genesis. hardfork alone keeps its current folder.
  • genesis is not passed to the node as a flag.

Validation: pnpm check:types and pnpm check pass. A new testcontainers test sets config.chainId to 1338 and reads 0x53a from eth_chainId, and behavior: selects hardfork still passes. The process instance is not covered locally, since it needs a tempo binary.


Generated by Claude Code

… before the node starts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wV52DZqBGAh7tinQLPMLR
@pkg-pr-new

pkg-pr-new Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/prool@115

commit: febf7fe

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017wV52DZqBGAh7tinQLPMLR
@jxom
jxom merged commit 89c31c4 into main Oct 23, 2026
6 of 7 checks passed
@jxom
jxom deleted the claude/tempo-genesis-option branch October 23, 2026 06:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T06:07:47.017432Z ba03ca1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot mentioned this pull request Oct 23, 2026
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.

2 participants