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,33 +185,36 @@ private variable
181185 enactState : EnactState
182186 treasury : Treasury
183187 isTopLevelValid : Bool
188+ globalScripts : ℙ Script
189+ globalData : DataHash ⇀ Datum
184190```
185191-->
186192
187193``` agda
188194data _⊢_⇀⦇_,SUBLEDGER⦈_ : SubLedgerEnv → LState → SubLevelTx → LState → Type where
189195 SUBLEDGER-V :
190- let txb = stx .txBody
196+ let txb = stx .txBody
197+
191198```
192199<!--
193200```agda
194- open TxBody txb
201+ open TxBody txb
195202```
196203-->
197204``` agda
198205 in
199206 ∙ isTopLevelValid ≡ true
200- ∙ ⟦ slot , pp , treasury ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState'
207+ ∙ ⟦ slot , pp , treasury , utxo₀ , isTopLevelValid , globalScripts , globalData ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState'
201208 ∙ ⟦ epoch slot , pp , txGovVotes , txWithdrawals , allColdCreds govState enactState ⟧ ⊢ certState ⇀⦇ txCerts ,CERTS⦈ certState'
202209 ∙ ⟦ txId , epoch slot , pp , ppolicy , enactState , certState' , dom (RewardsOf certState) ⟧ ⊢ {- rmOrphanDRepVotes certState' -} govState ⇀⦇ txgov txb ,GOVS⦈ govState'
203210 ────────────────────────────────
204- ⟦ 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' ⟧
205212
206213 SUBLEDGER-I :
207214 ∙ isTopLevelValid ≡ false
208- ∙ ⟦ slot , pp , treasury ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState
215+ ∙ ⟦ slot , pp , treasury , utxo₀ , isTopLevelValid , globalScripts , globalData ⟧ ⊢ utxoState ⇀⦇ stx ,SUBUTXOW⦈ utxoState
209216 ────────────────────────────────
210- ⟦ 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 ⟧
211218
212219_⊢_⇀⦇_,SUBLEDGERS⦈_ : SubLedgerEnv → LState → List SubLevelTx → LState → Type
213220_⊢_⇀⦇_,SUBLEDGERS⦈_ = ReflexiveTransitiveClosure {sts = _⊢_⇀⦇_,SUBLEDGER⦈_}
@@ -227,6 +234,14 @@ private variable
227234data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState → Type where
228235 LEDGER-V :
229236 let txb = tx .txBody
237+
238+ utxo₀ = UTxOOf utxoState
239+
240+ globalScripts : ℙ Script
241+ globalScripts = ∅ -- TODO
242+
243+ globalData : DataHash ⇀ Datum
244+ globalData = ∅ -- TODO
230245```
231246<!--
232247```agda
@@ -236,15 +251,23 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState
236251``` agda
237252 in
238253 ∙ isValid tx ≡ true
239- ∙ ⟦ slot , ppolicy , pp , enactState , treasury , isValid tx ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ txSubTransactions ,SUBLEDGERS⦈ ⟦ utxoState' , govState' , certState' ⟧
240- ∙ ⟦ slot , pp , treasury ⟧ ⊢ 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''
241256 ∙ ⟦ epoch slot , pp , txGovVotes , txWithdrawals , allColdCreds govState enactState ⟧ ⊢ certState' ⇀⦇ txCerts ,CERTS⦈ certState''
242257 ∙ ⟦ txId , epoch slot , pp , ppolicy , enactState , certState' , dom (RewardsOf certState) ⟧ ⊢ {- rmOrphanDRepVotes certState' -} govState ⇀⦇ txgov txb ,GOVS⦈ govState'
243258 ────────────────────────────────
244259 ⟦ slot , ppolicy , pp , enactState , treasury ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ tx ,LEDGER⦈ ⟦ utxoState'' , govState'' , certState'' ⟧
245260
246261 LEDGER-I :
247262 let txb = tx .txBody
263+
264+ utxo₀ = UTxOOf utxoState
265+
266+ globalScripts : ℙ Script
267+ globalScripts = ∅ -- TODO
268+
269+ globalData : DataHash ⇀ Datum
270+ globalData = ∅ -- TODO
248271```
249272<!--
250273```agda
@@ -254,8 +277,8 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState
254277``` agda
255278 in
256279 ∙ isValid tx ≡ false
257- ∙ ⟦ slot , ppolicy , pp , enactState , treasury , isValid tx ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ txSubTransactions ,SUBLEDGERS⦈ ⟦ utxoState , govState , certState ⟧
258- ∙ ⟦ slot , pp , treasury ⟧ ⊢ 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'
259282 ────────────────────────────────
260283 ⟦ slot , ppolicy , pp , enactState , treasury ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ tx ,LEDGER⦈ ⟦ utxoState' , govState , certState ⟧
261284```
0 commit comments