-
Notifications
You must be signed in to change notification settings - Fork 719
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
[BLS] Add wrapper around chiabls lib, worker, benchmarks and unit tests #2420
[BLS] Add wrapper around chiabls lib, worker, benchmarks and unit tests #2420
Conversation
9f087cd
to
5a6d14e
Compare
Rebased on master. Ready for review. |
09edb1a
to
ad10b65
Compare
b86ab3a
to
1d48ccf
Compare
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.
Code reviewed up to 32121d3.
So far, so good ☕ ☕. Left two comments in the BLS IES area.
Plus added test coverage for the basic encryption and decryption scheme here furszy@8b8c223. If you want to cherry-pick It, all yours.
First stop before jumping into the thread pool workers and DKG bench waters.
100ebc5
to
7acc769
Compare
Thanks @furszy . Rebased on master and picked your test, only reworking it using Inspired by this, have also added encryption/decryption (with |
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.
Reviewed till a24d9ba.
Few more comments, nothing biggie.
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.
Review completed, the DKG test made me feel at home ☕ . Code ACK 21d2f24.
Left few more comments, nothing blocking. Can squash the changes and it's ready to go for me.
>>> backports dash@47a162255260019bd4733d4336c235b01019df9f A simple C++ thread pool library https://github.com/vit-vit/CTPL Commit: 437e135dbd94eb65b45533d9ce8ee28b5bd37b6d
to avoid conflicts with pre-processor's constants defined by relic_conf
Also fix review nits: - replace hardware_concurrency() with GetNumCores() - remove code duplication for (Async)VerifyContributionShare
std::random_shuffle is deprecated in C++14 and will be removed in C++17
21d2f24
to
0d126ee
Compare
Rebased and squashed. |
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.
one step closer, ACK 0d126ee
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.
ACK 0d126ee
d3843cd [Refactor] No need to get the publickey of the active masternode (random-zebra) 483f509 [Refactor] De-duplicate operator BLS key parsing in rpc (random-zebra) 855c094 [Build] Fix CMake builds with chiabls/relic includes (random-zebra) 77ec208 [Tests] Fix TierTwo functional tests with BLS operator key (random-zebra) dd46f72 [TierTwo] Migration of DMN operator key to BLS (random-zebra) 1dfdcc1 [RPC] Implement generateblskeypair() RPC command (random-zebra) 619c0f8 scripted-diff: Rename keyIDOperator to pubKeyOperator (random-zebra) b0a7fa5 [QA] Add tests for fbv messages signed with BLS keys (random-zebra) dd0fb01 [TierTwo] Add functions to sign/verify messages with BLS (random-zebra) Pull request description: This builds on top of: - [x] #2363 - [x] #2419 - [x] #2420 As per title, introduce BLS keys/signatures for messages signed by the masternode operator (which is a requirement for [DIP 6](https://github.com/dashpay/dips/blob/master/dip-0006.md), and subsequent upgrades). - a new RPC command `generateblskeypair` returns a new publickey/secretkey BLS keypair. - `CDeterministicMNState::keyIDOperator` is now a `CBLSLazyPublicKey` (instead of a `CKeyID`), and it's renamed `pubKeyOperator`. - `-mnoperatorprivatekey` flag takes a BLS secret key in hex format. - `CActiveMasternodeInfo` stores a `CBLSPublicKey`/`CBLSSecretKey` - the BLS signature byte vector is serialized for legacy messages (mnw, fbv) in the compatibility code. ACKs for top commit: furszy: great, ACK d3843cd Fuzzbawls: ACK d3843cd Tree-SHA512: 1caf49615283d10b356caa049b57091dc70805c0bf2c11645d560c81223ce0d9936a46096cc4871c5ec25164518ebdf259d0f23a8c5bca39f2e436cc9e954519
Based on top of:
This reworks #2405, adapting the commits to the new build system (which includes the library already at
v1.0.1
, as git subtree).