File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/Ledger/Dijkstra/Specification Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ record UTxOEnv : Type where
4141 slot : Slot
4242 pparams : PParams
4343 treasury : Treasury
44+ utxo₀ : UTxO
4445
4546record UTxOState : Type where
4647 field
@@ -83,11 +84,13 @@ data _⊢_⇀⦇_,UTXOS⦈_ : UTxOEnv → UTxOState → TopLevelTx → UTxOState
8384 Γ ⊢ s ⇀⦇ tx ,UTXOS⦈ s
8485```
8586
86- ## UTXO
87+ ## The < span class = " AgdaDatatype " > UTXO</ span > Transition System {#sec : the-utxo-transition-system }
8788
88- (skeleton with the new phase-1 check)
89+ ### New in Dijkstra
90+
91+ 1 . The set of spending inputs must exist in the UTxO _ before_ applying the
92+ transaction (or partially applying any part of it). TODO: Add link to CIP once its finalized.
8993
90- This is the intended home of Dijkstra "phase-1 structural checks."
9194
9295``` agda
9396data _⊢_⇀⦇_,SUBUTXO⦈_ : UTxOEnv → UTxOState → SubLevelTx → UTxOState → Type where
@@ -104,8 +107,15 @@ data _⊢_⇀⦇_,UTXO⦈_ : UTxOEnv → UTxOState → TopLevelTx → UTxOState
104107 UTXO :
105108 let txb = Tx.txBody tx
106109 subTxs = TxBody.txSubTransactions txb
110+ utxo₀ = Γ .utxo₀
111+ utxo = s .utxo
107112 in
113+ ∙ txIns ≢ ∅
114+ ∙ txIns ⊆ dom utxo₀ -- (1)
115+ ∙ refInputs ⊆ dom utxo
116+
108117 ∙ requiredTopLevelGuardsSatisfied tx subTxs
118+
109119 ∙ Γ ⊢ s ⇀⦇ tx ,UTXOS⦈ s'
110120 ────────────────────────────────
111121 Γ ⊢ s ⇀⦇ tx ,UTXO⦈ s'
You can’t perform that action at this time.
0 commit comments