Skip to content

refactor: precompute market oracle messages - #22

Merged
tvolk131 merged 1 commit into
masterfrom
agent/precompute-market-oracle-messages
Aug 1, 2026
Merged

refactor: precompute market oracle messages#22
tvolk131 merged 1 commit into
masterfrom
agent/precompute-market-oracle-messages

Conversation

@tvolk131

@tvolk131 tvolk131 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What changed

  • derive the canonical YES and NO oracle-message digests once in the Rust market compiler
  • bind both digests as internal Simplicity arguments and select the outcome-specific digest before BIP340 verification
  • remove runtime market-ID and tagged-SHA construction from the covenant
  • freeze nonuniform digest vectors, both new CMRs, and all eight Taproot script/control-block pairs
  • add cross-outcome signature rejection coverage and document the new responsibility boundary and measured resource envelope

Why

Both possible oracle messages are static for a market instance. Recomputing the market ID and tagged hash during every resolution spend adds covenant work without adding validation. The canonical host compiler already owns other derived instance constants, so it can bind these messages under the same recompilation and creation-verification trust model.

The oracle protocol, signed bytes, public market parameters, and witness semantics are unchanged. This intentionally changes the undeployed market-v1 CMR and all eight scripts. The canonical golden CMR is now 702f5d04f15bcdec3fa1070540bf2f68c0ecdcf40bc8aa8024e1e77ef19cd5ee.

Validation

  • nix develop .#default --command just ci
    • formatting and strict Clippy
    • 211 workspace tests plus doc tests and WASM check
    • production-shaped 16-transaction market lifecycle and negative cases
    • multi-market indexing/reorg/rebuild gate
    • Elements/Esplora backend-equivalence gate
    • daemon/Iroh/CLI process-boundary gate
  • finalized all-path budget corpus, including active/dormant YES and NO resolution on both RT sides
  • independent nonuniform oracle digest goldens and cross-outcome signature rejection

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 August 1, 2026 03:47
@tvolk131
tvolk131 merged commit f584254 into master Aug 1, 2026
2 checks passed
@tvolk131
tvolk131 deleted the agent/precompute-market-oracle-messages branch August 1, 2026 03:47
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