Skip to content

Commit 2de6423

Browse files
committed
isValid
1 parent e43d75d commit 2de6423

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

formal-spec/Leios/Linear.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ mempool.
133133
∙ find (λ (_ , eb') → hash eb' ≟ ebHash) EBs' ≡ just (slot' , eb)
134134
∙ hash eb ∉ VotedEBs
135135
∙ ¬ isEquivocated s eb
136-
-- ∙ isValid s (inj₁ (ebHeader eb))
136+
∙ isValid s (inj₁ (ebHeader eb))
137137
∙ slot' ≤ slotNumber eb + Lhdr
138138
∙ slotNumber eb + 3 * Lhdr ≤ slot
139139
∙ slot ≡ slotNumber eb + validityCheckTime eb

formal-spec/Leios/Linear/Trace/Verifier.agda

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ open import CategoricalCrypto hiding (id; _∘_)
88
module Leios.Linear.Trace.Verifier (params : Params) where
99

1010
-- SpecStructure is not a module parameter, as the type for VrfPf needs to be known
11-
open import Leios.Defaults params using (d-SpecStructure) public
11+
open import Leios.Defaults params using (d-SpecStructure; isb) public
1212
open SpecStructure d-SpecStructure hiding (Hashable-IBHeader; Hashable-EndorserBlock; isVoteCertified) public
1313

1414
instance
@@ -166,9 +166,12 @@ module Defaults
166166
... | _ = Err dummyErr
167167
verifyStep' (EB-Role-Action _ _) (inj₁ FTCH) _ _ = Err dummyErr
168168
verifyStep' (EB-Role-Action _ _) (inj₁ (FFD-OUT _)) _ _ = Err dummyErr
169-
verifyStep' (VT-Role-Action .(slot s) eb slot') (inj₁ SLOT) s refl with ¿ VT-Role-premises {s = s} {eb = eb} {ebHash = hash eb} {slot' = slot'} .proj₁ ¿
170-
... | yes h = Ok' (Roles₁ (VT-Role {ebHash = hash eb} {slot' = slot'} h))
171-
... | no ¬h = Err dummyErr
169+
verifyStep' (VT-Role-Action .(slot s) eb slot') (inj₁ SLOT) s refl
170+
with ¿ VT-Role-premises {s = s} {eb = eb} {ebHash = hash eb} {slot' = slot'} .proj₁ ¿
171+
| isValid? s (inj₁ (ebHeader eb)) -- TODO: why not covered above?
172+
... | yes (x , x₁ , x₂ , x₃ , x₄ , x₅ , x₆ , x₇ , x₈ , x₉ , x₁₀) | yes h = Ok' (Roles₁ (VT-Role {ebHash = hash eb} {slot' = slot'} ((x , x₁ , x₂ , x₃ , h , x₄ , x₅ , x₆ , x₇ , x₈ , x₉ , x₁₀))))
173+
... | yes (x , x₁ , x₂ , x₃ , x₄ , x₅ , x₆ , x₇ , x₈ , x₉ , x₁₀) | no _ = Err dummyErr
174+
... | no ¬h | _ = Err dummyErr
172175
verifyStep' (VT-Role-Action _ _ _) (inj₁ FTCH) _ _ = Err dummyErr
173176
verifyStep' (VT-Role-Action _ _ _) (inj₁ (FFD-OUT _)) _ _ = Err dummyErr
174177
verifyStep' (VT-Role-Action _ _ _) (inj₂ _) _ refl = Err dummyErr

0 commit comments

Comments
 (0)