-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
multisig checks and optimization #8600
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8600 +/- ##
=======================================
Coverage 61.47% 61.47%
=======================================
Files 659 659
Lines 37916 37928 +12
=======================================
+ Hits 23308 23318 +10
- Misses 12168 12169 +1
- Partials 2440 2441 +1
|
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.
It's not worth to improve something that is
- Broken by design.
- Fated to be replaced in the near future.
Please close this PR.
OK, I removed the uniqueness check and updated the comments in the functions to make it clear the not unique public keys are supported. |
I'm subscribing @ValarDragon. IIRC he's the original author of these lines. |
I created a benchmark for the optimized function:
So 45% improvement. |
Great! I'd love to replicate the benchmarks, do you have code to share please? |
Conflicts must be resolved |
Lifiting block. Thought I'd like the original author of multisig to review before approving.
I know, there were no conflicts before, I firstly want to have clearance on merging before going back to updating conflicts. |
@alessio , @ValarDragon - could you approve the PR ? |
@alessio - you were upgrading linter recently. It seams that it breaks existing code. Can you confirm? |
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.
LGTM
Yes, this can be merged nonetheless. Linter warnings seem minor. |
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.
Requested a small change, plus an explanation.
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.
Approving this on the assumption that this PR's author performed all relevant manual testing.
Description
LegacyAminoMultisig improvements
Added public key uniqueness check -- though not sure if we want it, so I can remove it.CompactBitArray.Equal
method to improve code flow inx/auth
and not use structure fields. (PS: ideally I wanted to make the CompactBitArray attributes private, but the structure is generated with protobuf)CompactBitArray.NumTrueBitsBefore
which is used on every signature validation.Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes