-
Notifications
You must be signed in to change notification settings - Fork 20
[Dijkstra] phase 1 requiredTopLevelGuards
#1010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dijkstra] phase 1 requiredTopLevelGuards
#1010
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
requiredTopLevelGuards (stacked PR)requiredTopLevelGuards
c5accc8 to
3c15d84
Compare
29516cc to
2ba8844
Compare
b0d5934 to
1b1144b
Compare
deeb8ad to
df6879c
Compare
1b1144b to
05daaae
Compare
43ce03e to
ec362bc
Compare
42b6d12 to
1ab3ec6
Compare
ec362bc to
5a88696
Compare
carlostome
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left a minor comment that we can address later on if necessary
| -- Phase-1 condition (CIP-0118): | ||
| -- every credential required by a subTx body must appear in the top-level txGuards set. | ||
| requiredTopLevelGuardsSatisfied : TopLevelTx → List SubLevelTx → Type | ||
| requiredTopLevelGuardsSatisfied topTx subTxs = requiredCreds ⊆ TxBody.txGuards (TxBodyOf topTx) | ||
| where | ||
| concatMapˡ : {A B : Type} → (A → ℙ B) → List A → ℙ B | ||
| concatMapˡ f as = proj₁ $ unions (fromList (map f as)) | ||
| -- (maybe move concatMapˡ to src-lib-exts or agda-sets) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this simple condition can be inlined somehow in the rule?
+ 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.
5a88696 to
2dbea3f
Compare
Description
Stacked PR. 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
UTXOSrule as a stub/hook (soUTXOcan call something),UTXOrule with just the new phase-1 premise (plus an explicit "calls UTXOS"),UTXOW; just a wrapper overUTXOfor now.Copilot-generated Description (manually reviewed and revised)
This pull request introduces minimal "skeleton" modules for the Dijkstra-era UTxO and UTxOW transition systems, setting up the structure for future development of phase-1 checks and witnessing logic. It also adds a phase-1 structural check (CIP-0118) to ensure that all credentials required by subtransactions are present in the top-level transaction. The changes include new files, imports, and some refactoring of helper functions to support these checks.
New Dijkstra UTxO and UTxOW skeleton modules:
src/Ledger/Dijkstra/Specification/Utxo.lagda.mdas a minimal skeleton for the Dijkstra UTxO transition system, including the new phase-1 structural check (requiredTopLevelGuardsSatisfied) to enforce that all subTx-required credentials are present in the top-level transaction.src/Ledger/Dijkstra/Specification/Utxow.lagda.mdas a minimal skeleton for the Dijkstra witnessing layer, currently acting as a wrapper around UTxO with no additional premises.Phase-1 structural check and helper refactoring:
src/Ledger/Dijkstra/Specification/Transaction.lagda.md, refactored and added helper functions (subTxTaggedGuards,subTxGuardCredentials) and implemented therequiredTopLevelGuardsSatisfiedcondition for phase-1 validation.Documentation and import updates:
src/Ledger/Dijkstra/Specification.lagda.md..mdextensions. [1] [2]Checklist
CHANGELOG.md