Skip to content

perf(ci): reuse compiled binary market - #14

Merged
tvolk131 merged 1 commit into
masterfrom
codex/ci-reuse-simplicity-artifact
Jul 30, 2026
Merged

perf(ci): reuse compiled binary market#14
tvolk131 merged 1 commit into
masterfrom
codex/ci-reuse-simplicity-artifact

Conversation

@tvolk131

@tvolk131 tvolk131 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • retain the actual CompiledProgram inside CompiledBinaryMarket
  • execute and finalize market slots from that retained artifact instead of reparsing and recompiling the same SimplicityHL source
  • add reusable transition-plan and interpreter entry points that derive parameters from the compiled artifact
  • reject finalization when a supplied compiled market does not match the plan parameters
  • route the Simplicity budget fixtures through one canonical compiled market and verify byte-for-byte equivalence with the existing smplx SDK finalization path

Root cause

every_finalized_market_stack_has_sufficient_simplicity_budget covers 18 lifecycle transitions on both public RT sides. Although the test created one CompiledBinaryMarket, its fixture helpers, transition planning, finalization, interpretation, and direct covenant checks repeatedly constructed programs. The smplx Program::execute/finalize path recompiles the parameterized source internally several times per invocation, resulting in well over 200 identical compilations in one serial test.

Impact

The focused test fell from 302.718s to 22.630s locally, a 92.5% reduction (about 4m40s). The full workspace nextest phase completed in 26.635s locally with all 224 tests passing.

Existing convenience APIs remain available; callers processing multiple transitions for one market can opt into the reusable compiled-artifact paths.

Validation

  • nix develop .#default --command just ci-checks
    • clippy with warnings denied
    • 224/224 nextest tests passed, 5 ignored live tests skipped
    • workspace doctests passed
    • WASM check passed
  • nix develop .#default --command just regtest
    • all five live Elements/Esplora protocol gates passed
  • retained compiled finalization produces the exact same witness stack as the existing smplx SDK program API

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@tvolk131
tvolk131 marked this pull request as ready for review July 30, 2026 16:49
@tvolk131
tvolk131 merged commit 12b396f into master Jul 30, 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