docs(TIP-0007): add spend-time scripts for Ootle stealth UTXOs#180
docs(TIP-0007): add spend-time scripts for Ootle stealth UTXOs#180sdbondi wants to merge 5 commits into
Conversation
Migrates the spend-time scripts proposal from the now-superseded tari-project/tips repository (tari-project/tips#6, originally TIP-0006) into the RFCs repository. - Renumbered TIP-0006 -> TIP-0007, since TIP-0006 is already claimed here (PR tari-project#178). 0007 is the next open TIP number. - Reformatted to the TIP-0001 header preamble (metadata table, P-TIP-RFC-7 identifier, Status: Proposed, Type: Architecture) and added a Change History section. Document content is otherwise unchanged. - Added the TIP to src/SUMMARY.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a new proposal, P-TIP-RFC-7, which specifies spend-time scripts for Ootle stealth UTXOs. It proposes using stateless, restricted WASM predicates and Merklized condition trees (MAST) to enable programmable spend conditions. Feedback on the proposal points out an inconsistency where a SpendCondition leaf is described as Borsh-encoded, whereas the technical specification in Section 1 indicates it is CBOR-encoded.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| The unused alternatives are never revealed. | ||
|
|
||
| **Leaf format.** A leaf is `(id, payload)`: `id` is an encoding-version discriminant and `payload` | ||
| its body. `id = 0` is a Borsh-encoded `SpendCondition` (§1) — i.e. an `AccessRule` or a |
There was a problem hiding this comment.
The text states that id = 0 is a Borsh-encoded SpendCondition. However, the Rust definition of SpendCondition and TemplateFunction in Section 1 uses minicbor attributes (#[n(0)]) and derives Encode, Decode, and CborLen, which indicates it is CBOR-encoded. To maintain consistency with the technical specification, this should be updated to CBOR-encoded.
| its body. `id = 0` is a Borsh-encoded `SpendCondition` (§1) — i.e. an `AccessRule` or a | |
| its body. `id = 0` is a CBOR-encoded `SpendCondition` (§1) — i.e. an `AccessRule` or a |
…01 format Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d-scripts * upstream/main: docs: clarify path expectations (tari-project#182) # Conflicts: # src/SUMMARY.md
- Relocate the TIP to src/rfc/ootle/TIP-RFC-0007_ootle_spend_scripts.md, following the type-based placement convention from tari-project#182 (type code in filename, e.g. TIP-PROC-0005), and update the SUMMARY.md link. - Mark the illustrative Rust blocks as `rust,ignore` so `mdbook test` does not try to compile them (they reference Ootle types not in scope), matching the existing RFC convention. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t-execution Reconcile TIP-RFC-0007 with the as-built stealth spend-condition code: - Output model is a single SpendAuthorization enum (Key/Script/KeyAndScript), making the unspendable state unrepresentable, replacing the two-Option (spend_key/condition_root) draft. - SpendCondition leaf is a flat, non-empty conjunction of AtomicCondition atoms (AccessRule/TemplateFunction/Builtin/Covenant). - Reverse the covenant deferral: document native BuiltinPredicate (timelock/hashlock) and Covenant (output-preservation/value-routing/ value-conservation) atoms plus the CovenantBalanceClaim value-conservation proof. - Remove creation-time (T1) predicate validation: the MAST commits only the condition_root, so a TemplateFunction leaf is validated only at spend (T2). - Add the spend-witness data blob; correct MAST naming (condition_tree.rs, ConditionLeaf/ConditionBranch), host-op actions, the sandbox deny-list (enforce_read_only_restrictions), the weight charge (spend-witness bytes to the spender), and the RuntimeError variants.
Summary
Migrates the Spend-Time Scripts for Ootle Stealth UTXOs proposal from the now-superseded
tari-project/tipsrepository into this RFCs repository.tari-project/tips— tari-project/tips#6.main), so 0007 is the next open TIP number.src/TIP-0007_ootle_spend_scripts.md.P-TIP-RFC-7identifier (Status: Proposed, Type: Architecture), and a new Change History section. The proposal body is otherwise unchanged from the source.src/SUMMARY.md.Notes for reviewers
RFCin the identifierP-TIP-RFC-7. This is the type code within the TIP scheme — the document itself remains a TIP. Happy to adjust the type if you'd prefer otherwise.mdbook-mermaidpreprocessor and an undefinedresourceHTML helper in the theme — these errors reproduce on a cleanmainand are unrelated to this change;SUMMARY.mdparsing succeeds.🤖 Generated with Claude Code