@@ -25,31 +25,31 @@ import (
2525// So for validating votes/timeouts we use *ByEpoch methods.
2626//
2727// Since the voter committee is considered static over an epoch:
28- // * we can query identities by view
29- // * we don't need the full block ancestry prior to validating messages
28+ // - we can query identities by view
29+ // - we don't need the full block ancestry prior to validating messages
3030type Replicas interface {
3131
3232 // LeaderForView returns the identity of the leader for a given view.
3333 // CAUTION: per liveness requirement of HotStuff, the leader must be fork-independent.
3434 // Therefore, a node retains its proposer view slots even if it is slashed.
3535 // Its proposal is simply considered invalid, as it is not from a legitimate participant.
3636 // Returns the following expected errors for invalid inputs:
37- // * model.ErrViewForUnknownEpoch if no epoch containing the given view is known
37+ // - model.ErrViewForUnknownEpoch if no epoch containing the given view is known
3838 LeaderForView (view uint64 ) (flow.Identifier , error )
3939
4040 // QuorumThresholdForView returns the minimum total weight for a supermajority
4141 // at the given view. This weight threshold is computed using the total weight
4242 // of the initial committee and is static over the course of an epoch.
4343 // Returns the following expected errors for invalid inputs:
44- // * model.ErrViewForUnknownEpoch if no epoch containing the given view is known
44+ // - model.ErrViewForUnknownEpoch if no epoch containing the given view is known
4545 QuorumThresholdForView (view uint64 ) (uint64 , error )
4646
4747 // TimeoutThresholdForView returns the minimum total weight of observed timeout objects
4848 // required to safely timeout for the given view. This weight threshold is computed
4949 // using the total weight of the initial committee and is static over the course of
5050 // an epoch.
5151 // Returns the following expected errors for invalid inputs:
52- // * model.ErrViewForUnknownEpoch if no epoch containing the given view is known
52+ // - model.ErrViewForUnknownEpoch if no epoch containing the given view is known
5353 TimeoutThresholdForView (view uint64 ) (uint64 , error )
5454
5555 // Self returns our own node identifier.
@@ -60,23 +60,23 @@ type Replicas interface {
6060
6161 // DKG returns the DKG info for epoch given by the input view.
6262 // Returns the following expected errors for invalid inputs:
63- // * model.ErrViewForUnknownEpoch if no epoch containing the given view is known
63+ // - model.ErrViewForUnknownEpoch if no epoch containing the given view is known
6464 DKG (view uint64 ) (DKG , error )
6565
6666 // IdentitiesByEpoch returns a list of the legitimate HotStuff participants for the epoch
6767 // given by the input view.
6868 // The returned list of HotStuff participants:
69- // * contains nodes that are allowed to submit votes or timeouts within the given epoch
69+ // - contains nodes that are allowed to submit votes or timeouts within the given epoch
7070 // (un-ejected, non-zero weight at the beginning of the epoch)
71- // * is ordered in the canonical order
72- // * contains no duplicates.
71+ // - is ordered in the canonical order
72+ // - contains no duplicates.
7373 //
7474 // CAUTION: DO NOT use this method for validating block proposals.
7575 // CAUTION: This method considers epochs outside of Previous, Current, Next, w.r.t. the
7676 // finalized block, to be unknown. https://github.com/onflow/flow-go/issues/4085
7777 //
7878 // Returns the following expected errors for invalid inputs:
79- // * model.ErrViewForUnknownEpoch if no epoch containing the given view is known
79+ // - model.ErrViewForUnknownEpoch if no epoch containing the given view is known
8080 //
8181 // TODO: should return identity skeleton https://github.com/dapperlabs/flow-go/issues/6232
8282 IdentitiesByEpoch (view uint64 ) (flow.IdentityList , error )
@@ -87,10 +87,10 @@ type Replicas interface {
8787 // finalized block, to be unknown. https://github.com/onflow/flow-go/issues/4085
8888 //
8989 // ERROR conditions:
90- // * model.InvalidSignerError if participantID does NOT correspond to an authorized HotStuff participant at the specified block.
90+ // - model.InvalidSignerError if participantID does NOT correspond to an authorized HotStuff participant at the specified block.
9191 //
9292 // Returns the following expected errors for invalid inputs:
93- // * model.ErrViewForUnknownEpoch if no epoch containing the given view is known
93+ // - model.ErrViewForUnknownEpoch if no epoch containing the given view is known
9494 //
9595 // TODO: should return identity skeleton https://github.com/dapperlabs/flow-go/issues/6232
9696 IdentityByEpoch (view uint64 , participantID flow.Identifier ) (* flow.Identity , error )
@@ -102,25 +102,27 @@ type Replicas interface {
102102// For validating proposals, we use *ByBlock methods.
103103//
104104// Since the proposer committee can change at any block:
105- // * we query by block ID
106- // * we must have incorporated the full block ancestry prior to validating messages
105+ // - we query by block ID
106+ // - we must have incorporated the full block ancestry prior to validating messages
107107type DynamicCommittee interface {
108108 Replicas
109109
110110 // IdentitiesByBlock returns a list of the legitimate HotStuff participants for the given block.
111111 // The returned list of HotStuff participants:
112- // * contains nodes that are allowed to submit proposals, votes, and timeouts
112+ // - contains nodes that are allowed to submit proposals, votes, and timeouts
113113 // (un-ejected, non-zero weight at current block)
114- // * is ordered in the canonical order
115- // * contains no duplicates.
114+ // - is ordered in the canonical order
115+ // - contains no duplicates.
116116 //
117- // No errors are expected during normal operation.
117+ // ERROR conditions:
118+ // - state.ErrUnknownSnapshotReference if the blockID is for an unknown block
118119 IdentitiesByBlock (blockID flow.Identifier ) (flow.IdentityList , error )
119120
120121 // IdentityByBlock returns the full Identity for specified HotStuff participant.
121122 // The node must be a legitimate HotStuff participant with NON-ZERO WEIGHT at the specified block.
122123 // ERROR conditions:
123- // * model.InvalidSignerError if participantID does NOT correspond to an authorized HotStuff participant at the specified block.
124+ // - model.InvalidSignerError if participantID does NOT correspond to an authorized HotStuff participant at the specified block.
125+ // - state.ErrUnknownSnapshotReference if the blockID is for an unknown block
124126 IdentityByBlock (blockID flow.Identifier , participantID flow.Identifier ) (* flow.Identity , error )
125127}
126128
@@ -132,8 +134,8 @@ type BlockSignerDecoder interface {
132134 // consensus committee has reached agreement on validity of parent block. Consequently, the
133135 // returned IdentifierList contains the consensus participants that signed the parent block.
134136 // Expected Error returns during normal operations:
135- // - signature.InvalidSignerIndicesError if signer indices included in the header do
136- // not encode a valid subset of the consensus committee
137+ // - signature.InvalidSignerIndicesError if signer indices included in the header do
138+ // not encode a valid subset of the consensus committee
137139 DecodeSignerIDs (header * flow.Header ) (flow.IdentifierList , error )
138140}
139141
0 commit comments