Skip to content

Store most recent cert in the PerasCertDB #157

@amesgen

Description

@amesgen

Currently, we garbage-collect certificates if they boost a block that is so old that it can no longer influence our selection (ie when it is older than the immutable tip). However, for both the voting rules and the modified block forging rules, we want to still keep around the latest certificate even if it is so old that it would otherwise be garbage-collected.

It should be exposed via a new PerasCertDB API function:

  getLatestCertSeen :: STM m (Maybe (WithArrivalTime (ValidatedPerasCert blk)))

It seems sensible for other functions like getPerasWeightSnapshot and getPerasCertSnapshot to not include this certificate if it is too old. Therefore, we can probably store this latest certificate separately, and just not garbage-collect it (but garbage-collect the rest of the state as usual).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions