Skip to content

feat: embed ASM params at build time instead of hardcoding in guest code#47

Merged
prajwolrg merged 5 commits intomainfrom
STR-2717-embed-asm-spec
Apr 1, 2026
Merged

feat: embed ASM params at build time instead of hardcoding in guest code#47
prajwolrg merged 5 commits intomainfrom
STR-2717-embed-asm-spec

Conversation

@prajwolrg
Copy link
Copy Markdown
Collaborator

@prajwolrg prajwolrg commented Mar 31, 2026

Description

  • Refactored StrataAsmSpec to wrap AsmParams directly instead of storing individual fields, and added typed accessor methods on AsmParams
  • Added a build script to strata-asm-spec that validates and embeds ASM_PARAMS_JSON via env!() when targeting zkVM, removing the hardcoded spec from guest code.
  • Added asm-params.json config file for prover-perf and wired its build.rs to propagate ASM_PARAMS_JSON to the guest

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

@prajwolrg prajwolrg changed the title Str 2717 embed asm spec feat: embed ASM params at build time instead of hardcoding in guest code Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/spec/src/lib.rs 88.88% 2 Missing ⚠️
crates/params/src/params.rs 94.44% 1 Missing ⚠️
Files with missing lines Coverage Δ
crates/params/src/params.rs 99.04% <94.44%> (-0.96%) ⬇️
crates/spec/src/lib.rs 90.00% <88.88%> (+15.49%) ⬆️

... 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 marked this pull request as ready for review March 31, 2026 08:58
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 31, 2026

Commit: 3937d33
SP1 Execution Results

program cycles success
ASM STF 140,834,521 yes
Moho Recursive 629,971 yes

@prajwolrg prajwolrg added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit d78a2e1 Apr 1, 2026
22 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.

2 participants