Open
Description
Context
The Epochs
API in the protocol state only supports querying either the Current
, Next
, or Previous
epoch, with respect to a particular reference block. This is based on the assumption that any node only needs to know about these 3 epochs. The Consensus Committee and EpochLookup modules follow this pattern.
However, the use of these modules has expanded. For example, an access node might look up the consensus committee by view for an epoch several weeks ago, to satisfy by block request by ID or height. For this use-case, it is necessary to:
- effectively query epochs by view, independent of a reference block
- query epoch information for epochs relatively far in the past
@durkmurder has implemented a hot-fix for this issue in #4063.
Definition of Done
- Update
ByView
methods in consensus Committee to return a value for all views within an epoch processed by the node. - Add test case for historical epoch query to Committee tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment