-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BFT] Node ejected before epoch recovery #6632
base: feature/efm-recovery
Are you sure you want to change the base?
Changes from all commits
b141c70
3c867da
139becc
c257a8a
9d611fe
1556bb8
1ce227a
d2448b9
6e2a798
f4c6f9e
78618e0
81788e9
14e37fa
4b2af92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -47,39 +47,33 @@ func (f *combinedVoteProcessorFactoryBaseV3) Create(log zerolog.Logger, block *m | |||||
// message that has to be verified against aggregated signature | ||||||
msg := verification.MakeVoteMessage(block.View, block.BlockID) | ||||||
|
||||||
dkg, err := f.committee.DKG(block.View) | ||||||
if err != nil { | ||||||
return nil, fmt.Errorf("could not get DKG info at block %v: %w", block.BlockID, err) | ||||||
} | ||||||
|
||||||
// prepare the staking public keys of participants | ||||||
stakingKeys := make([]crypto.PublicKey, 0, len(allParticipants)) | ||||||
stakingBeaconKeys := make([]crypto.PublicKey, 0, len(allParticipants)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
In other parts of the code, we generally use the term "beacon key". Since what we are mainly differentiating it from is the "staking key", I think omitting "staking" from the name makes sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is a special case, it's basically beacon keys that take part in staking. There is a separate |
||||||
for _, participant := range allParticipants { | ||||||
stakingKeys = append(stakingKeys, participant.StakingPubKey) | ||||||
if pk, err := dkg.KeyShare(participant.NodeID); err == nil { | ||||||
stakingBeaconKeys = append(stakingBeaconKeys, pk) | ||||||
} | ||||||
} | ||||||
|
||||||
stakingSigAggtor, err := signature.NewWeightedSignatureAggregator(allParticipants, stakingKeys, msg, msig.ConsensusVoteTag) | ||||||
if err != nil { | ||||||
return nil, fmt.Errorf("could not create aggregator for staking signatures: %w", err) | ||||||
} | ||||||
|
||||||
dkg, err := f.committee.DKG(block.View) | ||||||
if err != nil { | ||||||
return nil, fmt.Errorf("could not get DKG info at block %v: %w", block.BlockID, err) | ||||||
} | ||||||
|
||||||
// prepare the random beacon public keys of participants | ||||||
beaconKeys := make([]crypto.PublicKey, 0, len(allParticipants)) | ||||||
for _, participant := range allParticipants { | ||||||
pk, err := dkg.KeyShare(participant.NodeID) | ||||||
if err != nil { | ||||||
return nil, fmt.Errorf("could not get random beacon key share for %x: %w", participant.NodeID, err) | ||||||
} | ||||||
beaconKeys = append(beaconKeys, pk) | ||||||
} | ||||||
|
||||||
rbSigAggtor, err := signature.NewWeightedSignatureAggregator(allParticipants, beaconKeys, msg, msig.RandomBeaconTag) | ||||||
rbSigAggtor, err := signature.NewWeightedSignatureAggregator(allParticipants, stakingBeaconKeys, msg, msig.RandomBeaconTag) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Nit: Reuse the "beacon" terminology from above, expand Aggtor so it's pronounceable. (Feel free to ignore if you disagree) |
||||||
if err != nil { | ||||||
return nil, fmt.Errorf("could not create aggregator for thershold signatures: %w", err) | ||||||
return nil, fmt.Errorf("could not create aggregator for threshold signatures: %w", err) | ||||||
} | ||||||
|
||||||
threshold := msig.RandomBeaconThreshold(int(dkg.Size())) | ||||||
randomBeaconInspector, err := signature.NewRandomBeaconInspector(dkg.GroupKey(), beaconKeys, threshold, msg) | ||||||
randomBeaconInspector, err := signature.NewRandomBeaconInspector(dkg.GroupKey(), dkg.KeyShares(), threshold, msg) | ||||||
if err != nil { | ||||||
return nil, fmt.Errorf("could not create random beacon inspector: %w", err) | ||||||
} | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was originally put here to communicate an unusual state to operators when running the
efm-recover-args
command. I agree it should not cause an error, but maybe we can replace this with a WARN log. Then when it is run as part of the CLI tool we will still surface this info to operators.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d2448b9
(#6632)