@@ -187,13 +187,14 @@ func NewConsensusCommittee(state protocol.State, me flow.Identifier) (*Consensus
187187 return com , nil
188188}
189189
190- // Identities returns the identities of all authorized consensus participants at the given block.
190+ // IdentitiesByBlock returns the identities of all authorized consensus participants at the given block.
191191// The order of the identities is the canonical order.
192192func (c * Consensus ) IdentitiesByBlock (blockID flow.Identifier ) (flow.IdentityList , error ) {
193193 il , err := c .state .AtBlockID (blockID ).Identities (filter .IsVotingConsensusCommitteeMember )
194194 return il , err
195195}
196196
197+ // IdentityByBlock returns the identity of the node with the given node ID at the given block.
197198func (c * Consensus ) IdentityByBlock (blockID flow.Identifier , nodeID flow.Identifier ) (* flow.Identity , error ) {
198199 identity , err := c .state .AtBlockID (blockID ).Identity (nodeID )
199200 if err != nil {
@@ -210,6 +211,8 @@ func (c *Consensus) IdentityByBlock(blockID flow.Identifier, nodeID flow.Identif
210211
211212// IdentitiesByEpoch returns the committee identities in the epoch which contains
212213// the given view.
214+ // CAUTION: This method considers epochs outside of Previous, Current, Next, w.r.t. the
215+ // finalized block, to be unknown. https://github.com/onflow/flow-go/issues/4085
213216//
214217// Error returns:
215218// - model.ErrViewForUnknownEpoch if no committed epoch containing the given view is known.
@@ -225,6 +228,8 @@ func (c *Consensus) IdentitiesByEpoch(view uint64) (flow.IdentityList, error) {
225228
226229// IdentityByEpoch returns the identity for the given node ID, in the epoch which
227230// contains the given view.
231+ // CAUTION: This method considers epochs outside of Previous, Current, Next, w.r.t. the
232+ // finalized block, to be unknown. https://github.com/onflow/flow-go/issues/4085
228233//
229234// Error returns:
230235// - model.ErrViewForUnknownEpoch if no committed epoch containing the given view is known.
0 commit comments