Endorser-Block Validity¶
An Endorser Block is valid for a ledger state when:
-
the referenced transactions (resolved and taken in reference order) are exactly what it describes,
-
it satisfies the size limits given by Leios-specific protocol parameters, and
-
the list of transactions forms a valid extension of the ledger state.
The present module defines the EB transition system to validate
endorser blocks.
Auxiliary Types and Functions¶
The predicate EBWellFormed ensures the
EndorserBlock is well-formed:
- the list of transaction references is non-empty (6th condition on Step 3: Committee Validation), and
- the list of reference hashes admits no duplicate keys (Appendix B).
EBWellFormed : EndorserBlock → Type EBWellFormed eb = ebTxRefs eb ≢ [] × Unique (map proj₁ (ebTxRefs eb))
EB Transition System¶
data _⊢_⇀⦇_,EB⦈_ : LedgerEnv × List TopLevelTx → LedgerState → EndorserBlock → LedgerState → Type where EB : let pp = PParamsOf Γ in ∙ EBWellFormed eb ∙ ebTxRefs eb ≡ map (λ tx → txRefHash tx , SizeOf tx) txs ∙ ebSize eb ≤ pp .leiosMaxEBSize ∙ ∑ˡ[ tx ← txs ] SizeOf tx ≤ pp .leiosMaxEBTxsSize ∙ $\begin{pmatrix} \,\href{Ledger.Dijkstra.Specification.Leios.Validity.html#1651}{\htmlId{2637}{\htmlClass{Generalizable}{\text{Γ}}}}\, \\ \,\href{Ledger.Dijkstra.Specification.Leios.Validity.html#2419}{\htmlId{2641}{\htmlClass{Bound}{\text{pp}}}}\, \,\htmlId{2644}{\htmlClass{Symbol}{\text{.}}}\,\,\href{Ledger.Dijkstra.Specification.PParams.html#3393}{\htmlId{2645}{\htmlClass{Field}{\text{leiosMaxRefScriptSizePerEB}}}}\, \\ \,\href{Ledger.Dijkstra.Specification.Leios.Validity.html#2419}{\htmlId{2674}{\htmlClass{Bound}{\text{pp}}}}\, \,\htmlId{2677}{\htmlClass{Symbol}{\text{.}}}\,\,\href{Ledger.Dijkstra.Specification.PParams.html#3349}{\htmlId{2678}{\htmlClass{Field}{\text{leiosMaxEBExUnits}}}}\, \end{pmatrix}$ ⊢ ls ⇀⦇ txs ,LEDGERS⦈ ls' ──────────────────────────────── (Γ , txs) ⊢ ls ⇀⦇ eb ,EB⦈ ls'
The EB enforces the size bounds of CIP-164's Table
3 on endorser blocks:
- the size of the EB itself is at most
S_EB(leiosMaxEBSize); - the total size of the referenced transactions is at most
S_EB-tx(leiosMaxEBTxsSize).
The table's remaining rows are enforced by LEDGERS:
- the execution units of Plutus scripts fit
leiosMaxEBExUnits, and - the total size of the referenced transactions' reference scripts is
at most
S_EB-ref(leiosMaxRefScriptSizePerEB).