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

Update bls multisigner #4318

Merged
merged 11 commits into from
Jul 29, 2022
Merged

Conversation

AdoAdoAdo
Copy link
Contributor

@AdoAdoAdo AdoAdoAdo commented Jul 22, 2022

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.

@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2022

Codecov Report

❗ No coverage uploaded for pull request base (feat/kosk-bls-multisigner@bdeee82). Click here to learn what that means.
The diff coverage is n/a.

@@                     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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bdeee82...bb6e447. Read the comment docs.

@ssd04 ssd04 self-requested a review July 25, 2022 09:41
@AdoAdoAdo AdoAdoAdo marked this pull request as ready for review July 25, 2022 12:26
factory/crypto/cryptoComponentsHandler.go Outdated Show resolved Hide resolved
process/mock/cryptoComponentsMock.go Show resolved Hide resolved
scripts/testnet/variables.sh Outdated Show resolved Hide resolved
factory/crypto/multiSignerContainer.go Outdated Show resolved Hide resolved
ssd04
ssd04 previously approved these changes Jul 27, 2022
@raduchis raduchis requested review from ssd04 and raduchis July 28, 2022 07:57
Copy link
Contributor

@raduchis raduchis left a comment

Choose a reason for hiding this comment

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

small observations

consensus/spos/bls/subroundEndRound.go Show resolved Hide resolved
consensus/spos/bls/subroundSignature.go Outdated Show resolved Hide resolved
consensus/spos/bls/subroundSignature.go Outdated Show resolved Hide resolved
factory/crypto/multiSignerContainer.go Outdated Show resolved Hide resolved
factory/crypto/cryptoComponentsHandler.go Outdated Show resolved Hide resolved
@@ -100,7 +100,11 @@ func checkBaseParams(
if coreComponents.MinTransactionVersion() == 0 {
return process.ErrInvalidTransactionVersion
}
if check.IfNil(cryptoComponents.MultiSigner()) {
multiSigner, err := cryptoComponents.GetMultiSigner(0)
Copy link
Contributor

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?

raduchis
raduchis previously approved these changes Jul 28, 2022
return c, nil
}

// GetMultiSigner returns the multiSignerContainer configured for the given epoch
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// GetMultiSigner returns the multiSignerContainer configured for the given epoch
// GetMultiSigner returns the multiSigner configured for the given epoch

Copy link
Contributor

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
Copy link
Collaborator

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?

Copy link
Contributor

@ssd04 ssd04 Jul 29, 2022

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

@ssd04 ssd04 merged commit 1e94967 into feat/kosk-bls-multisigner Jul 29, 2022
@ssd04 ssd04 deleted the update-bls-multisigner branch July 29, 2022 12:24
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.

5 participants