Skip to content

Validate Toccata v2.1 and add noncustodial buyer-seller escrow - #2

Merged
gryszzz merged 3 commits into
mainfrom
upgrade/october-2026-catchup
Oct 20, 2026
Merged

gryszzz merged 3 commits into
mainfrom
upgrade/october-2026-catchup

Conversation

@gryszzz

@gryszzz gryszzz commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

A KaspaScript spend fragment ending in VERIFY left no successful stack result for the native engine. Spend instantiation now closes a non-empty verified body with true and rejects empty bodies. Artifact fragments and deterministic goldens retain their existing meaning.

An isolated companion SDK pins Rusty Kaspa v2.1.0 and constructs actual native v1 transactions with explicit fees, compute budgets, storage mass, genesis/continuation bindings, and RPC round trips. Native tests cover both KaspaScript and released Silverscript v1.0.0 bytecode with underpayment controls, plus a signed offline genesis/continuation/exit fixture, replay rejection, and rollback/reapply. CI checks the pinned integration. CLI status now reports the dated post-activation baseline while preserving the production-readiness gate.

Validation: 83 feature-enabled workspace tests passed with two live network tests ignored; seven native integration tests passed; workspace/native Clippy and formatting checks passed. These are offline native-engine and fixture results, not funded TN10 acceptance. No keys, network submission, mainnet unlock, or release publication are introduced. The legacy 0.15.0 SDK feature remains historical and is not silently promoted.

Buyer/Seller Escrow Follow-Up

  • Add readable contracts/buyer_seller_escrow.ks and a native single-P2SH dispatcher containing both cooperative buyer-and-seller release and buyer timeout refund.
  • Bind payouts and exact transaction shape in script; cap explicit miner fees. No arbiter, agent key, service recipient or automatic submission.
  • Add unsigned signing previews, native TN10 mass calculation and an optional read-only wRPC inspector.
  • Fix positive script-number sign encoding exposed by native execution at a fee cap of 128.
  • Reject legacy single-spend instantiation of multi-path contracts so recovery cannot be silently omitted.

Verification on the new head: 85 workspace tests passed (two live tests ignored), 19 native tests passed, both Rustfmt/Clippy lanes and diff checks passed. CI reruns on this commit.

Buyer withholding, deadline races, lost-key recovery and capped-fee limitations are documented. Wallet-provider signing, visual approval, funded TN10 acceptance and DAG/indexer recovery remain unverified. Public fixture keys must never be funded. Repository push/merge is authorized; release publication and live fund movement are not part of this PR.

@gryszzz gryszzz changed the title Validate native Toccata v2.1 transactions and fix spend instantiation Validate Toccata v2.1 and add noncustodial buyer-seller escrow Oct 20, 2026
@gryszzz
gryszzz marked this pull request as ready for review October 20, 2026 01:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T01:26:38.774228Z 2257004 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2257004734

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/src/testnet.rs
Comment on lines +1177 to +1180
if contract.spends.len() != 1 {
return Err(TestnetError::Unsupported(
"legacy single-spend instantiation cannot preserve multiple paths in one locking script; use a reviewed native dispatcher".to_owned(),
));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the gated proof fallback usable for multi-spend contracts

When Tn12ContractHarness processes a multi-spend contract, this guard makes deploy_and_execute return Unsupported, but the fallback in sdk/tests/tn12_integration.rs calls gated_proof, which reaches the same build_contract_run and guard before .expect("gated proof") panics. Consequently, the documented live contract suite can no longer produce dry-run proofs for Escrow, AtomicSwap, or Vault; the fallback needs a path that records the unsupported instantiation without attempting it again.

Useful? React with 👍 / 👎.

@gryszzz
gryszzz merged commit 6e9bba8 into main Oct 20, 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