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

Add RPC for BLS secret to public key #2841

Merged
merged 5 commits into from
Apr 8, 2019
Merged

Conversation

nmarley
Copy link

@nmarley nmarley commented Apr 5, 2019

This is a tool for BLS keys to verify the public key which comes from the secret key using the Core BLS library, and is helpful when debugging keys that may have been generated elsewhere (like in Dash Masternode Tool, as an example).

It just accepts a BLS secret key in hex format and outputs a secret / public keypair, similar to the output of bls generate.

I'm open to re-naming as I'm not sure sk2pk is the best name, but can't think of any better names which aren't really long to type.

@UdjinM6 UdjinM6 added this to the 14.0 milestone Apr 5, 2019
@UdjinM6
Copy link

UdjinM6 commented Apr 5, 2019

I like the idea but IMO it can be improved a bit UdjinM6@0f25d020b :)

Re name: no idea. Maybe we could just reuse generate instead UdjinM6@c12388c5b?

@nmarley
Copy link
Author

nmarley commented Apr 5, 2019

I like your changes much better as they simplify the code a lot -- only thing is that SetHexStr allows weird input like:

./src/dash-cli bls generate 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1fzzzzzzzzzzzzzzzz
{
  "secret": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f",
  "public": "15fde78acd5f6886ddaf5d0056610167c513d09c1c0efabbc7cdcc69beea113779c4a81e2d24daafc5387dbf6ac5fe48"
}

It does just truncate it, so not too big a deal, but that could get confusing too.

@UdjinM6
Copy link

UdjinM6 commented Apr 5, 2019

@nmarley hmmm... Good catch! I guess we should fix SetHexStr actually.

@UdjinM6 UdjinM6 added the RPC Some notable changes to RPC params/behaviour/descriptions label Apr 5, 2019
UdjinM6
UdjinM6 previously approved these changes Apr 5, 2019
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

ACK

@nmarley
Copy link
Author

nmarley commented Apr 6, 2019

Updated PR per Slack discussion, namely:

  • do not re-use "generate"
  • rename to "fromsecret"

Still needs #2843 for input validation, but I don't think the order matters for merging.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit 0f0d8ea into dashpay:develop Apr 8, 2019
thephez added a commit to thephez/dash-docs that referenced this pull request Apr 8, 2019
@nmarley nmarley deleted the bls-sk2pk branch April 9, 2019 16:26
thephez added a commit to dash-docs/dash-docs that referenced this pull request Apr 10, 2019
* RPC - Update masternode current and winner
 - Remove protocol, lastseen, activeseconds

* RPC - Remove gobject getvotes
 - Related to dashpay/dash#2815

* RPC - Protx diff update
 - Add merkleRootQuorums field

Related to dashpay/dash#2833

* RPC - listunspent update

Related to dashpay/dash#2727

* RPC - protx update_registrar update
 - Rename votingKeyAddr to votingAddress

Related to dashpay/dash#2747

* RPC - Add bls fromsecret

Related to dashpay/dash#2841

* RPC - Start adding quorum RPCs

* RPC - Add quorum info details Minor formatting updates

* RPC - Add placeholders for remaining quorum sub-commands

* RPC - Add quorum sign/hasrecsig/isconflicting details

* RPC - Add note to regtest only quorum RPCs

* RPC - Add more detail to quorum dkgstatus

* Typo fix

* Minor format and example updates

* RPC - Add more quorum dkgstatus details
 - Field descriptions

* RPC - Add quorum dkgstatus detail level 1 and 2 info

* RPC - protx update
 - Remove support for "0"

Related to dashpay/dash#2622
thephez added a commit to thephez/dash-docs that referenced this pull request May 17, 2019
* RPC - Update masternode current and winner
 - Remove protocol, lastseen, activeseconds

* RPC - Remove gobject getvotes
 - Related to dashpay/dash#2815

* RPC - Protx diff update
 - Add merkleRootQuorums field

Related to dashpay/dash#2833

* RPC - listunspent update

Related to dashpay/dash#2727

* RPC - protx update_registrar update
 - Rename votingKeyAddr to votingAddress

Related to dashpay/dash#2747

* RPC - Add bls fromsecret

Related to dashpay/dash#2841

* RPC - Start adding quorum RPCs

* RPC - Add quorum info details Minor formatting updates

* RPC - Add placeholders for remaining quorum sub-commands

* RPC - Add quorum sign/hasrecsig/isconflicting details

* RPC - Add note to regtest only quorum RPCs

* RPC - Add more detail to quorum dkgstatus

* Typo fix

* Minor format and example updates

* RPC - Add more quorum dkgstatus details
 - Field descriptions

* RPC - Add quorum dkgstatus detail level 1 and 2 info

* RPC - protx update
 - Remove support for "0"

Related to dashpay/dash#2622
thephez added a commit to dash-docs/dash-docs that referenced this pull request May 17, 2019
* RPC - Update masternode current and winner
 - Remove protocol, lastseen, activeseconds

* RPC - Remove gobject getvotes
 - Related to dashpay/dash#2815

* RPC - Protx diff update
 - Add merkleRootQuorums field

Related to dashpay/dash#2833

* RPC - listunspent update

Related to dashpay/dash#2727

* RPC - protx update_registrar update
 - Rename votingKeyAddr to votingAddress

Related to dashpay/dash#2747

* RPC - Add bls fromsecret

Related to dashpay/dash#2841

* RPC - Start adding quorum RPCs

* RPC - Add quorum info details Minor formatting updates

* RPC - Add placeholders for remaining quorum sub-commands

* RPC - Add quorum sign/hasrecsig/isconflicting details

* RPC - Add note to regtest only quorum RPCs

* RPC - Add more detail to quorum dkgstatus

* Typo fix

* Minor format and example updates

* RPC - Add more quorum dkgstatus details
 - Field descriptions

* RPC - Add quorum dkgstatus detail level 1 and 2 info

* RPC - protx update
 - Remove support for "0"

Related to dashpay/dash#2622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants