Skip to content

docs(TIP-0007): add spend-time scripts for Ootle stealth UTXOs#180

Draft
sdbondi wants to merge 5 commits into
tari-project:mainfrom
sdbondi:tip-0007-ootle-spend-scripts
Draft

docs(TIP-0007): add spend-time scripts for Ootle stealth UTXOs#180
sdbondi wants to merge 5 commits into
tari-project:mainfrom
sdbondi:tip-0007-ootle-spend-scripts

Conversation

@sdbondi

@sdbondi sdbondi commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

Migrates the Spend-Time Scripts for Ootle Stealth UTXOs proposal from the now-superseded tari-project/tips repository into this RFCs repository.

  • Source: originally authored as TIP-0006 in tari-project/tipstari-project/tips#6.
  • Renumbered TIP-0006 → TIP-0007. TIP-0006 is already claimed in this repo (PR Add TIP-0006: Tari Announcements ChannelCreate TIP-0006_tari_announcements_channel.md #178, Tari Announcements Channel), and 0001–0006 are otherwise taken (0004 via PR feat: adds tip004 pow changes #174, 0005 on main), so 0007 is the next open TIP number.
  • Kept as a TIP (not renamed to RFC): file is src/TIP-0007_ootle_spend_scripts.md.
  • Reformatted to the TIP-0001 header preamble: metadata table, P-TIP-RFC-7 identifier (Status: Proposed, Type: Architecture), and a new Change History section. The proposal body is otherwise unchanged from the source.
  • Added to src/SUMMARY.md.

Notes for reviewers

  • Type classification. I classified this as Architecture per TIP-0001 ("a technical implementation decision, such as a chain feature, proof design, or other critical technical improvement"), which yields the type code RFC in the identifier P-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.
  • Created date preserves the original authoring date (2026-06-17); Last Modified is the migration date.
  • mdbook does not render locally in my environment due to a pre-existing missing mdbook-mermaid preprocessor and an undefined resource HTML helper in the theme — these errors reproduce on a clean main and are unrelated to this change; SUMMARY.md parsing succeeds.

🤖 Generated with Claude Code

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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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.

Suggested change
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>
@sdbondi sdbondi changed the title TIP-0007: Spend-Time Scripts for Ootle Stealth UTXOs feat: spend-time Scripts for Ootle Stealth UTXOs TIP-0007 Jun 23, 2026
@sdbondi
sdbondi marked this pull request as draft June 23, 2026 08:38
sdbondi and others added 2 commits June 23, 2026 10:43
…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>
@sdbondi sdbondi changed the title feat: spend-time Scripts for Ootle Stealth UTXOs TIP-0007 docs(TIP-0007): add spend-time scripts for Ootle stealth UTXOs Jun 23, 2026
…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.
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