Skip to content
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

Refactored private keys usage in consensus #4758

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

iulianpascalau
Copy link
Contributor

Reasoning behind the pull request

  • refactored the private keys usage in consensus

Proposed changes

  • refactored the private keys usage in consensus

Testing procedure

  • N/A

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@@ -152,8 +152,8 @@ type ScheduledProcessor interface {
// SignatureHandler defines the behaviour of a component that handles signatures in consensus
type SignatureHandler interface {
Reset(pubKeys []string) error
CreateSignatureShare(msg []byte, index uint16, epoch uint32) ([]byte, error)
CreateSignatureShareWithPrivateKey(message []byte, index uint16, epoch uint32, privateKeyBytes []byte) ([]byte, error)
CreateSignatureShareUsingPublicKey(message []byte, index uint16, epoch uint32, publicKeyBytes []byte) ([]byte, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you rename to CreateSignatureShareForPublicKey and CreateSignatureForPublicKey ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed both methods to CreateSignatureShareForPublicKey and CreateSignatureForPublicKey

@codecov-commenter
Copy link

Codecov Report

Base: 70.98% // Head: 70.99% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (c8af06f) compared to base (e0493fe).
Patch coverage: 73.80% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff               @@
##           feat/multikey    #4758   +/-   ##
==============================================
  Coverage          70.98%   70.99%           
==============================================
  Files                651      651           
  Lines              85415    85439   +24     
==============================================
+ Hits               60634    60657   +23     
+ Misses             20231    20228    -3     
- Partials            4550     4554    +4     
Impacted Files Coverage Δ
consensus/spos/consensusCore.go 94.11% <ø> (-0.48%) ⬇️
consensus/spos/consensusCoreValidator.go 100.00% <ø> (ø)
consensus/spos/subround.go 82.75% <ø> (+1.85%) ⬆️
factory/consensus/consensusComponents.go 0.00% <0.00%> (ø)
consensus/spos/bls/subroundSignature.go 64.77% <50.00%> (+0.72%) ⬆️
consensus/signing/signing.go 97.56% <87.50%> (-1.22%) ⬇️
consensus/spos/bls/blsSubroundsFactory.go 91.20% <100.00%> (ø)
consensus/spos/bls/subroundBlock.go 75.79% <100.00%> (-0.06%) ⬇️
consensus/spos/bls/subroundEndRound.go 64.13% <100.00%> (-0.10%) ⬇️
common/enablers/enableEpochsHandler.go 73.84% <0.00%> (-0.20%) ⬇️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@iulianpascalau iulianpascalau merged commit 60cc70d into feat/multikey Dec 6, 2022
@iulianpascalau iulianpascalau deleted the consensus-private-keys-refactor branch December 6, 2022 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants