refactor: refer to ASM programs by spec ID in runner config - #298
Merged
Merged
Conversation
The genesis predicate duplicated a key already listed in [[execution.targets]], and an SP1 Groth16 key is about 1 KB of hex. Spec IDs map one-to-one to predicates in the registry, so the spec ID alone identifies the genesis program. It still has to be named explicitly: after an upgrade the targets list holds several specs and nothing else says which one the chain started under.
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
The loader already derives the predicate from the ELF or signing key. The configured copy only named which execution target the artifact belongs to and gave bind_expected something to compare against. The spec ID does the first job, and the target's predicate does the second, so a wrong ELF still fails boot without the key being pasted twice.
prajwolrg
force-pushed
the
refactor/genesis-spec-id
branch
from
September 30, 2026 16:14
9981c99 to
64e37a9
Compare
prajwolrg
marked this pull request as ready for review
October 1, 2026 01:44
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🔒 AI Security Review (claude-opus-5-5)✅ No security issues found. |
irnb
approved these changes
Oct 1, 2026
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The runner config repeated each ASM predicate up to three times: in
[[execution.targets]], asexecution.genesis_predicate, and in each[[orchestrator.asm_artifacts]]entry. An SP1 Groth16 predicate is about 1 KB of hex, so each copy was a chance to paste the wrong key.The execution registry already maps each spec ID to exactly one predicate, so a spec ID is enough to refer to a program. This PR keeps the predicate only in
[[execution.targets]]. Everything else now refers to programs by spec ID:The ELF is still checked at boot. The loader derives the predicate from the ELF or signing key and compares it with the predicate of the matching target, so a wrong artifact still fails startup.
Type of Change
Notes to Reviewers
This changes the config format. Any deployed runner config needs
genesis_predicatereplaced withgenesis_spec_id, andpredicatereplaced withspec_idin eachasm_artifactsentry.genesis_spec_idstays a separate field on purpose. Once an upgrade adds a second target, nothing else says which spec the chain started under.Validated with
cargo clippy --all-features, unit tests for the worker, prover-worker and runner crates, and thefn_asm_block_test,fn_asm_proof_testandfn_asm_proof_follower_sync_testfunctional tests on the native backend.Checklist
Related Issues
None.
🤖 Generated with Claude Code