Skip to content

Commit 14dad53

Browse files
Add premise on epochInfoSlotToUTCTime to UTXO rule
1 parent 33ae790 commit 14dad53

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

src/Ledger/Conway/Conformance/Equivalence/Utxo.agda

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module _ {Γ s tx s'} where
5252
utxoSDeposits (C.Scripts-No _) = deposits
5353

5454
utxoDeposits : Γ C.⊢ s ⇀⦇ tx ,UTXO⦈ s' L.Deposits
55-
utxoDeposits (C.UTXO-inductive⋯ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h) = utxoSDeposits h
55+
utxoDeposits (C.UTXO-inductive⋯ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ h) = utxoSDeposits h
5656

5757
utxowDeposits : Γ C.⊢ s ⇀⦇ tx ,UTXOW⦈ s' L.Deposits
5858
utxowDeposits (C.UTXOW-inductive⋯ _ _ _ _ _ _ _ _ _ _ h) = utxoDeposits h
@@ -79,8 +79,8 @@ instance
7979
-- deposits don't change! Why are they even part of the UTxOState?
8080
-- In conformance the update happens in GOVCERT (under CERT).
8181
UTXOToConf : {Γ s tx s'} Γ L.⊢ s ⇀⦇ tx ,UTXO⦈ s' ⭆ Γ C.⊢ s ⇀⦇ tx ,UTXO⦈ (withDepositsFrom s s')
82-
UTXOToConf {s = s} {tx = tx} .convⁱ _ (L.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , utxo)) =
83-
C.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , conv utxo)
82+
UTXOToConf {s = s} {tx = tx} .convⁱ _ (L.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , q , utxo)) =
83+
C.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , q , conv utxo)
8484

8585
UTXOFromConf : {Γ s tx s'}
8686
(let open L.UTxOEnv Γ using () renaming (pparams to pp)
@@ -90,8 +90,8 @@ instance
9090
(isValid tx ≡ false ⊎ L.ValidCertDeposits pp deposits txCerts)
9191
⊢ Γ C.⊢ s ⇀⦇ tx ,UTXO⦈ s' ⭆ⁱ λ _ h
9292
Γ L.⊢ s ⇀⦇ tx ,UTXO⦈ (setDeposits (utxoDeposits h) s')
93-
UTXOFromConf {s = s} {tx = tx} .convⁱ validCerts (C.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , utxo)) =
94-
L.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , (validCerts ⊢conv utxo))
93+
UTXOFromConf {s = s} {tx = tx} .convⁱ validCerts (C.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , q , utxo)) =
94+
L.UTXO-inductive (a , b , c , d , e , f , g , r , h , i , j , k , l , m , n , o , p , q , (validCerts ⊢conv utxo))
9595

9696
UTXOWToConf : {Γ s tx s'} Γ L.⊢ s ⇀⦇ tx ,UTXOW⦈ s' ⭆ Γ C.⊢ s ⇀⦇ tx ,UTXOW⦈ (withDepositsFrom s s')
9797
UTXOWToConf .convⁱ _ (L.UTXOW-inductive⋯ a b c d e f g h i j utxo) =

src/Ledger/Conway/Conformance/Utxo.agda

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ data _⊢_⇀⦇_,UTXO⦈_ : UTxOEnv → UTxOState → Tx → UTxOState → Type
9191
∙ txIns ∩ refInputs ≡ ∅ ∙ L.inInterval slot txVldt
9292
∙ L.minfee pp utxo tx ≤ txFee ∙ (txrdmrs ˢ ≢ ∅ L.collateralCheck pp tx utxo)
9393
∙ consumed pp s txb ≡ produced pp s txb ∙ coin mint ≡ 0
94+
∙ (¬ (∅ᵐ ≡ᵐ txrdmrs) × nothing ≢ proj₁ txVldt
95+
(do s proj₁ txVldt
96+
epochInfoSlotToUTCTime EI SysSt s) ≢ nothing
97+
)
9498
∙ txsize ≤ maxTxSize pp
9599
∙ L.refScriptsSize utxo tx ≤ pp .maxRefScriptSizePerTx
96100

@@ -108,6 +112,6 @@ data _⊢_⇀⦇_,UTXO⦈_ : UTxOEnv → UTxOState → Tx → UTxOState → Type
108112
────────────────────────────────
109113
Γ ⊢ s ⇀⦇ tx ,UTXO⦈ s'
110114

111-
pattern UTXO-inductive⋯ tx Γ s x y z w k l m c v j n o p q r t u h
112-
= UTXO-inductive {tx}{Γ}{s} (x , y , z , w , k , l , m , c , v , j , n , o , p , q , r , t , u , h)
115+
pattern UTXO-inductive⋯ tx Γ s x y z w k l m c v j n o p q r t u a h
116+
= UTXO-inductive {tx}{Γ}{s} (x , y , z , w , k , l , m , c , v , j , n , o , p , q , r , t , u , a , h)
113117
unquoteDecl UTXO-premises = genPremises UTXO-premises (quote UTXO-inductive)

src/Ledger/Conway/Specification/Utxo.lagda.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,10 @@ data _⊢_⇀⦇_,UTXO⦈_ where
539539
∙ txIns ∩ refInputs ≡ ∅ ∙ inInterval slot txVldt
540540
∙ minfee pp utxo tx ≤ txFee ∙ (txrdmrs ˢ ≢ ∅ → collateralCheck pp tx utxo)
541541
∙ consumed pp s txb ≡ produced pp s txb ∙ coin mint ≡ 0
542+
∙ (¬ (∅ᵐ ≡ᵐ txrdmrs) × nothing ≢ proj₁ txVldt →
543+
(do s ← proj₁ txVldt
544+
epochInfoSlotToUTCTime EI SysSt s) ≢ nothing
545+
)
542546
∙ txsize ≤ maxTxSize pp
543547
∙ refScriptsSize utxo tx ≤ pp .maxRefScriptSizePerTx
544548
∙ ∀[ (_ , txout) ∈ ∣ txOutsʰ ∣ ]

0 commit comments

Comments
 (0)