This week we completed the integration of the different Peras components in a temporary working branch. This large effort currently seats at +11,591/-3,754 LoC. Most of the speculative work is over, and we will start extracting meaningful PRs from this branch in the coming weeks.
More concretely, this week:
- For the
PerasEpochContextResolver(which is the stateful component allowing other components to access the properPerasEpochContextgiven aPerasRoundNo), we removed the temporary wiring, and implemented proper ticking for it as part of theExtLedgerState. - Merged bug-fixing #2029, and improved the voting thread to use the return status of the changed functions in its tracing.
- Wired up the certificate extraction logic that pulls, validates, and potentially updates the
latestPerasCertOnChainRound(which now lives on theExtLedgerState) when a block containing a Peras certificate is received and applied onto the current ledger state. - Relatedly, we moved
latestPerasCertOnChainRoundmethod from theLedgerStateto theExtLedgerState; since we needExtLedgerStatedata to validate incoming certs on-chain before updatinglatestPerasCertOnChainRound. - Various consistency improvements over Peras-related constraints in the codebase. The mega-classes BlockSupportsPeras and
StateSupportsPerasEpochContextshould be the main ones required in most components.