1- ---
1+ --
22source_branch: master
33source_path: src/Ledger/Dijkstra/Specification/Ledger.lagda
44---
@@ -46,7 +46,10 @@ record SubLedgerEnv : Type where
4646 pparams : PParams
4747 enactState : EnactState
4848 treasury : Treasury
49- isValid : Bool
49+ utxo₀ : UTxO
50+ isTopLevelValid : Bool
51+ globalScripts : ℙ Script
52+ globalData : DataHash ⇀ Datum
5053
5154record LedgerEnv : Type where
5255 field
@@ -172,6 +175,7 @@ private variable
172175 Γ : LedgerEnv
173176 s s' s'' : LState
174177 utxoState utxoState' : UTxOState
178+ utxo₀ : UTxO
175179 govState govState' : GovState
176180 certState certState' : CertState
177181 stx : SubLevelTx
@@ -181,34 +185,36 @@ private variable
181185 enactState : EnactState
182186 treasury : Treasury
183187 isTopLevelValid : Bool
184- utxo₀ : UTxO
188+ globalScripts : ℙ Script
189+ globalData : DataHash ⇀ Datum
185190```
186191-->
187192
188193``` agda
189194data _⊢_⇀⦇_,SUBLEDGER⦈_ : SubLedgerEnv → LState → SubLevelTx → LState → Type where
190195 SUBLEDGER-V :
191- let txb = stx .txBody
196+ let txb = stx .txBody
197+
192198```
193199<!--
194200```agda
195- open TxBody txb
201+ open TxBody txb
196202```
197203-->
198204``` agda
199205 in
200206 ∙ isTopLevelValid ≡ true
201- ∙ ⟦ slot , pp , treasury , utxo₀ ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState'
207+ ∙ ⟦ slot , pp , treasury , utxo₀ , isTopLevelValid , globalScripts , globalData ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState'
202208 ∙ ⟦ epoch slot , pp , txGovVotes , txWithdrawals , allColdCreds govState enactState ⟧ ⊢ certState ⇀⦇ txCerts ,CERTS⦈ certState'
203209 ∙ ⟦ txId , epoch slot , pp , ppolicy , enactState , certState' , dom (RewardsOf certState) ⟧ ⊢ {- rmOrphanDRepVotes certState' -} govState ⇀⦇ txgov txb ,GOVS⦈ govState'
204210 ────────────────────────────────
205- ⟦ slot , ppolicy , pp , enactState , treasury , isTopLevelValid ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState' , govState' , certState' ⟧
211+ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , isTopLevelValid , globalScripts , globalData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState' , govState' , certState' ⟧
206212
207213 SUBLEDGER-I :
208214 ∙ isTopLevelValid ≡ false
209- ∙ ⟦ slot , pp , treasury , utxo₀ ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState
215+ ∙ ⟦ slot , pp , treasury , utxo₀ , isTopLevelValid , globalScripts , globalData ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState
210216 ────────────────────────────────
211- ⟦ slot , ppolicy , pp , enactState , treasury , isTopLevelValid ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState , govState , certState ⟧
217+ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , isTopLevelValid , globalScripts , globalData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState , govState , certState ⟧
212218
213219_⊢_⇀⦇_,SUBLEDGERS⦈_ : SubLedgerEnv → LState → List SubLevelTx → LState → Type
214220_⊢_⇀⦇_,SUBLEDGERS⦈_ = ReflexiveTransitiveClosure {sts = _⊢_⇀⦇_,SUBLEDGER⦈_}
@@ -228,6 +234,14 @@ private variable
228234data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState → Type where
229235 LEDGER-V :
230236 let txb = tx .txBody
237+
238+ utxo₀ = UTxOOf utxoState
239+
240+ globalScripts : ℙ Script
241+ globalScripts = ∅ -- TODO
242+
243+ globalData : DataHash ⇀ Datum
244+ globalData = ∅ -- TODO
231245```
232246<!--
233247```agda
@@ -237,15 +251,23 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState
237251``` agda
238252 in
239253 ∙ isValid tx ≡ true
240- ∙ ⟦ slot , ppolicy , pp , enactState , treasury , isValid tx ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ txSubTransactions ,SUBLEDGERS⦈ ⟦ utxoState' , govState' , certState' ⟧
241- ∙ ⟦ slot , pp , treasury , utxo₀ ⟧ ⊢ utxoState' ⇀⦇ tx ,UTXOW⦈ utxoState''
254+ ∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , isValid tx , globalScripts , globalData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ txSubTransactions ,SUBLEDGERS⦈ ⟦ utxoState' , govState' , certState' ⟧
255+ ∙ ⟦ slot , pp , treasury , utxo₀ , isValid tx , globalScripts , globalData ⟧ ⊢ utxoState' ⇀⦇ tx ,UTXOW⦈ utxoState''
242256 ∙ ⟦ epoch slot , pp , txGovVotes , txWithdrawals , allColdCreds govState enactState ⟧ ⊢ certState' ⇀⦇ txCerts ,CERTS⦈ certState''
243257 ∙ ⟦ txId , epoch slot , pp , ppolicy , enactState , certState' , dom (RewardsOf certState) ⟧ ⊢ {- rmOrphanDRepVotes certState' -} govState ⇀⦇ txgov txb ,GOVS⦈ govState'
244258 ────────────────────────────────
245259 ⟦ slot , ppolicy , pp , enactState , treasury ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ tx ,LEDGER⦈ ⟦ utxoState'' , govState'' , certState'' ⟧
246260
247261 LEDGER-I :
248262 let txb = tx .txBody
263+
264+ utxo₀ = UTxOOf utxoState
265+
266+ globalScripts : ℙ Script
267+ globalScripts = ∅ -- TODO
268+
269+ globalData : DataHash ⇀ Datum
270+ globalData = ∅ -- TODO
249271```
250272<!--
251273```agda
@@ -255,8 +277,8 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState
255277``` agda
256278 in
257279 ∙ isValid tx ≡ false
258- ∙ ⟦ slot , ppolicy , pp , enactState , treasury , isValid tx ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ txSubTransactions ,SUBLEDGERS⦈ ⟦ utxoState , govState , certState ⟧
259- ∙ ⟦ slot , pp , treasury , utxo₀ ⟧ ⊢ utxoState ⇀⦇ tx ,UTXOW⦈ utxoState'
280+ ∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , isValid tx , globalScripts , globalData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ txSubTransactions ,SUBLEDGERS⦈ ⟦ utxoState , govState , certState ⟧
281+ ∙ ⟦ slot , pp , treasury , utxo₀ , isValid tx , globalScripts , globalData ⟧ ⊢ utxoState ⇀⦇ tx ,UTXOW⦈ utxoState'
260282 ────────────────────────────────
261283 ⟦ slot , ppolicy , pp , enactState , treasury ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ tx ,LEDGER⦈ ⟦ utxoState' , govState , certState ⟧
262284```
0 commit comments