Skip to content

fix: wire genesis state construction through AsmSpec and make debug subproto genesis-aware#72

Open
prajwolrg wants to merge 5 commits intomainfrom
fix-genesis-state-for-debug-subprotocol
Open

fix: wire genesis state construction through AsmSpec and make debug subproto genesis-aware#72
prajwolrg wants to merge 5 commits intomainfrom
fix-genesis-state-for-debug-subprotocol

Conversation

@prajwolrg
Copy link
Copy Markdown
Collaborator

@prajwolrg prajwolrg commented Apr 11, 2026

Description

The debug subprotocol was never given a genesis SectionState, so worker startup on the debug spec would produce an anchor state whose section layout didn't match the subprotocol invocation order. This was realized when working on alpenlabs/alpen#1584.

This branch fixes both by making genesis construction a responsibility of AsmSpec itself, and tightens up the worker's init path along the way.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency update
  • Security fix

Notes to Reviewers

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

Commit: 6624da7
SP1 Execution Results

program cycles success
ASM STF 118,476,744 yes
Moho Recursive 11,576,264 yes

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

❌ Patch coverage is 76.05634% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spec-debug/src/lib.rs 0.00% 15 Missing ⚠️
crates/worker/src/aux_resolver.rs 75.00% 1 Missing ⚠️
crates/worker/src/state.rs 95.65% 1 Missing ⚠️
Files with missing lines Coverage Δ
bin/asm-runner/src/bootstrap.rs 91.20% <100.00%> (ø)
crates/common/src/mmr.rs 87.87% <100.00%> (+1.21%) ⬆️
crates/spec/src/spec.rs 100.00% <100.00%> (ø)
crates/worker/src/builder.rs 92.85% <100.00%> (+0.17%) ⬆️
crates/worker/src/service.rs 81.53% <100.00%> (+0.43%) ⬆️
crates/worker/src/aux_resolver.rs 80.00% <75.00%> (-0.96%) ⬇️
crates/worker/src/state.rs 71.42% <95.65%> (-1.30%) ⬇️
crates/spec-debug/src/lib.rs 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@prajwolrg prajwolrg force-pushed the fix-genesis-state-for-debug-subprotocol branch from 650bdd6 to e05d931 Compare April 12, 2026 13:18
@prajwolrg prajwolrg self-assigned this Apr 12, 2026
@prajwolrg prajwolrg force-pushed the fix-genesis-state-for-debug-subprotocol branch from e05d931 to f187424 Compare April 13, 2026 02:57
@prajwolrg prajwolrg changed the base branch from main to chore/update-strata-common-deps April 13, 2026 02:58
@prajwolrg prajwolrg changed the base branch from chore/update-strata-common-deps to chore-update-strata-common-deps April 13, 2026 02:58
@prajwolrg prajwolrg force-pushed the fix-genesis-state-for-debug-subprotocol branch from 49c381e to 8f36a19 Compare April 13, 2026 14:06
@prajwolrg prajwolrg changed the base branch from chore-update-strata-common-deps to main April 13, 2026 14:07
@prajwolrg prajwolrg changed the title Fix genesis state for debug subprotocol fix: wire genesis state construction through AsmSpec and make debug subproto genesis-aware Apr 13, 2026
@prajwolrg prajwolrg marked this pull request as ready for review April 13, 2026 14:19
Copy link
Copy Markdown
Collaborator

@evgenyzdanovich evgenyzdanovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very neat, ACK

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.

3 participants