Skip to content

Conversation

@williamdemeo
Copy link
Member

@williamdemeo williamdemeo commented Dec 21, 2025

Description

Stacked PR (please review PR #1009 before this one!)

The branch for this PR should be rebased on master once #1009 is merged.

This PR closes issue #1002 by introducing a predicate for testing that required top-level guards are present among the top-level guards and

  • defining a minimal UTXOS rule as a stub/hook (so UTXO can call something),
  • defining a minimal UTXO rule with just the new phase-1 premise (plus an explicit "calls UTXOS"),
  • defining a minimal UTXOW; just a wrapper over UTXO for now.

Copilot-generated Description

This pull request introduces significant updates to the Dijkstra-era ledger specification, focusing on support for CIP-0112/0118 guard credentials, batch transaction structure, and the introduction of minimal UTxO and UTxOW transition skeletons. Major changes include updates to transaction body fields, the addition of new phase-1 structural checks for required guards, and the initial scaffolding for Dijkstra's UTxO and witnessing layers. Documentation and changelog entries have also been updated to reflect these changes and clarify the new transaction validity model.

Transaction structure and guard credentials:

  • Changed TxBody.txRequiredGuards to TxBody.txGuards (now a set of credentials, not just key hashes) and added TxBody.reqSignerHashes for required signers. The txRequiredTopLevelGuards field is now a list of (Credential × Maybe Datum) pairs to allow duplicates and argument passing. [1] [2]
  • Updated TxInfo record and construction to include the new txGuards and use reqSignerHashes, ensuring both phase-1 and guard credentials are available for validation.

Guard request grouping and checks:

  • Added helper functions to group required top-level guard requests by credential, preserving duplicates and sub-transaction context; implemented the phase-1 check that all requested guards by sub-transactions are present in the top-level transaction's txGuards.

UTxO and UTxOW transition skeletons:

  • Introduced minimal skeletons for Dijkstra's UTxO and UTXOW transition systems, with explicit phase-1 guard checks in UTXO and a stubbed-out batch processing structure. These files serve as hook points for future full batch semantics and phase-2 execution. [1] [2] [3] [4]
  • Updated imports to include new Utxo and Utxow modules.

Documentation and changelog:

  • Revised transaction validity documentation to clarify batch-wide checks, guard semantics, and new Dijkstra-specific rules. Updated the changelog to reflect all major changes and moved the spec section from Conway to Dijkstra. [1] [2]

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Any semantic changes to the specifications are documented in CHANGELOG.md
  • Code is formatted according to CONTRIBUTING.md
  • Self-reviewed the diff

williamdemeo and others added 9 commits December 18, 2025 16:58
and add TODO/reminder for `txRequiredTopLevelGuards` type change
+  Remove contradiction between "ref inputs may refer to earlier tx outputs in the batch" vs "all inputs must exist before applying any tx in the batch." The new text punts the exact constraint to the UTxO rules (where it belongs).
+  Fix Plutus bullet (old "nor earlier versions" reads like "no Plutus at all").
+  Align fees with current Agda (`txFee : InTopLevel …`), but leave room for later CIP-driven updates.
@williamdemeo williamdemeo linked an issue Dec 21, 2025 that may be closed by this pull request
5 tasks
+ a minimal `UTXOS` rule as a stub/hook (so `UTXO` can call something),
+ a minimal `UTXO` rule with just the new phase-1 premise (plus an explicit "calls UTXOS"),
+ a minimal `UTXOW`; just a wrapper over `UTXO` for now.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dijkstra] phase-1 check: requiredTopLevelGuards in top-level guards

2 participants