-
Notifications
You must be signed in to change notification settings - Fork 205
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
Update bls multisigner #4318
Update bls multisigner #4318
Conversation
# Conflicts: # factory/crypto/cryptoComponentsHandler_test.go # factory/crypto/cryptoComponents_test.go
Codecov Report
@@ Coverage Diff @@
## feat/kosk-bls-multisigner #4318 +/- ##
============================================================
Coverage ? 71.52%
============================================================
Files ? 665
Lines ? 86171
Branches ? 0
============================================================
Hits ? 61637
Misses ? 20122
Partials ? 4412 Continue to review full report at Codecov.
|
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.
small observations
@@ -100,7 +100,11 @@ func checkBaseParams( | |||
if coreComponents.MinTransactionVersion() == 0 { | |||
return process.ErrInvalidTransactionVersion | |||
} | |||
if check.IfNil(cryptoComponents.MultiSigner()) { | |||
multiSigner, err := cryptoComponents.GetMultiSigner(0) |
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.
no need for backwards compatibility flags because the node does not start, right?
return c, nil | ||
} | ||
|
||
// GetMultiSigner returns the multiSignerContainer configured for the given epoch |
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.
// GetMultiSigner returns the multiSignerContainer configured for the given epoch | |
// GetMultiSigner returns the multiSigner configured for the given epoch |
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.
👍
return c.multiSigners[i].multiSigner, nil | ||
} | ||
} | ||
return nil, errors.ErrMissingMultiSignerConfig |
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.
is this error correct? perhaps something more specific?
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.
changed to signal that a multisigner instance is missing
This PR integrates in elrond-go a transition of the used BLS multisigner from the one with embedded rogue key protection to the one relying on the knowledge of secret key (which is ensured through the node staking procedure).
For backwards compatibility both multi-signers need to be defined, as the produced signatures differ. For this reason a container was created for holding the versions of multisigners while allowing selection based on the epoch.
The configuration of the multisigner is extended with an epoch activation config.