@@ -28,7 +28,7 @@ open import Ledger.Dijkstra.Specification.Gov govStructure
2828open import Ledger.Dijkstra.Specification.Utxo txs abs
2929open import Ledger.Dijkstra.Specification.Utxow txs abs
3030open import Ledger.Dijkstra.Specification.Certs govStructure
31- open import Ledger.Dijkstra.Specification.Entities govStructure
31+ open import Ledger.Dijkstra.Specification.Entities txs
3232
3333open EnactState using (cc)
3434```
@@ -45,7 +45,7 @@ record SubLedgerEnv : Type where
4545 enactState : EnactState
4646 treasury : Treasury
4747 utxo₀ : UTxO
48- certState : CertState
48+ rewards₀ : Rewards
4949 allScripts : ℙ Script
5050 isTopLevelValid : Bool
5151
@@ -211,6 +211,7 @@ private variable
211211 treasury : Treasury
212212 isTopLevelValid : Bool
213213 allScripts : ℙ Script
214+ rewards₀ : Rewards
214215```
215216-->
216217
@@ -278,16 +279,16 @@ data _⊢_⇀⦇_,SUBLEDGER⦈_ : SubLedgerEnv → LedgerState → SubLevelTx
278279 SUBLEDGER-V :
279280 ∙ isTopLevelValid ≡ true
280281 ∙ ⟦ slot , pp , treasury , utxo₀ , certState , allScripts , isTopLevelValid ⟧ ⊢ utxoState₀ ⇀⦇ stx ,SUBUTXOW⦈ utxoState₁
281- ∙ ⟦ epoch slot , pp , ListOfGovVotesOf stx , allColdCreds govState₀ enactState , WithdrawalsOf stx , DirectDepositsOf stx ⟧ ⊢ certState₀ ⇀⦇ DCertsOf stx ,ENTITIES ⦈ certState₁
282+ ∙ ⟦ epoch slot , pp , allColdCreds govState₀ enactState , rewards₀ ⟧ ⊢ certState₀ ⇀⦇ stx ,SUBENTITIES ⦈ certState₁
282283 ∙ ⟦ TxIdOf stx , epoch slot , pp , ppolicy , enactState , certState₁ , dom (RewardsOf certState₁) ⟧ ⊢ govState₀ ⇀⦇ GovProposals+Votes stx ,GOVS⦈ govState₁
283284 ────────────────────────────────
284- ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , certState , allScripts , isTopLevelValid ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState₁ , govState₁ , certState₁ ⟧
285+ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , rewards₀ , allScripts , isTopLevelValid ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState₁ , govState₁ , certState₁ ⟧
285286
286287 SUBLEDGER-I :
287288 ∙ isTopLevelValid ≡ false
288289 ∙ ⟦ slot , pp , treasury , utxo₀ , certState , allScripts , isTopLevelValid ⟧ ⊢ utxoState₀ ⇀⦇ stx ,SUBUTXOW⦈ utxoState₀
289290 ────────────────────────────────
290- ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , certState , allScripts , isTopLevelValid ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState₀ , govState₀ , certState₀ ⟧
291+ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , rewards₀ , allScripts , isTopLevelValid ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ stx ,SUBLEDGER⦈ ⟦ utxoState₀ , govState₀ , certState₀ ⟧
291292
292293_⊢_⇀⦇_,SUBLEDGERS⦈_ : SubLedgerEnv → LedgerState → List SubLevelTx → LedgerState → Type
293294_⊢_⇀⦇_,SUBLEDGERS⦈_ = ReflexiveTransitiveClosure {sts = _⊢_⇀⦇_,SUBLEDGER⦈_}
@@ -299,12 +300,15 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LedgerState → TopLevelTx → Ledg
299300 let utxo₀ : UTxO
300301 utxo₀ = UTxOOf utxoState₀
301302
303+ rewards₀ : Rewards
304+ rewards₀ = RewardsOf certState₀
305+
302306 allScripts : ℙ Script
303307 allScripts = getAllScripts tx utxo₀
304308 in
305309 ∙ IsValidFlagOf tx ≡ true
306- ∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , certState ₀ , allScripts , IsValidFlagOf tx ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState₁ , govState₁ , certState₁ ⟧
307- ∙ ⟦ epoch slot , pp , ListOfGovVotesOf tx , allColdCreds govState₁ enactState , WithdrawalsOf tx , DirectDepositsOf tx ⟧ ⊢ certState₁ ⇀⦇ DCertsOf tx ,ENTITIES⦈ certState₂
310+ ∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , rewards ₀ , allScripts , IsValidFlagOf tx ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState₁ , govState₁ , certState₁ ⟧
311+ ∙ ⟦ epoch slot , pp , allColdCreds govState₁ enactState , true , rewards₀ ⟧ ⊢ certState₁ ⇀⦇ tx ,ENTITIES⦈ certState₂
308312 ∙ ⟦ TxIdOf tx , epoch slot , pp , ppolicy , enactState , certState₂ , dom (RewardsOf certState₂) ⟧ ⊢ govState₁ ⇀⦇ GovProposals+Votes tx ,GOVS⦈ govState₂
309313 ∙ ⟦ slot , pp , treasury , utxo₀ , certState₀ , allScripts ⟧ ⊢ utxoState₁ ⇀⦇ tx ,UTXOW⦈ utxoState₂
310314 ────────────────────────────────
@@ -314,11 +318,14 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LedgerState → TopLevelTx → Ledg
314318 let utxo₀ : UTxO
315319 utxo₀ = UTxOOf utxoState₀
316320
321+ rewards₀ : Rewards
322+ rewards₀ = RewardsOf certState₀
323+
317324 allScripts : ℙ Script
318325 allScripts = getAllScripts tx utxo₀
319326 in
320327 ∙ IsValidFlagOf tx ≡ false
321- ∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , certState ₀ , allScripts , IsValidFlagOf tx ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState₀ , govState₀ , certState₀ ⟧
328+ ∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , rewards ₀ , allScripts , IsValidFlagOf tx ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState₀ , govState₀ , certState₀ ⟧
322329 ∙ ⟦ slot , pp , treasury , utxo₀ , certState₀ , allScripts ⟧ ⊢ utxoState₀ ⇀⦇ tx ,UTXOW⦈ utxoState₁
323330 ────────────────────────────────
324331 ⟦ slot , ppolicy , pp , enactState , treasury ⟧ ⊢ ⟦ utxoState₀ , govState₀ , certState₀ ⟧ ⇀⦇ tx ,LEDGER⦈ ⟦ utxoState₁ , govState₀ , certState₀ ⟧
0 commit comments