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 vote for cli command #4934

Merged
merged 5 commits into from
Jul 3, 2024
Merged

Add vote for cli command #4934

merged 5 commits into from
Jul 3, 2024

Conversation

jferrant
Copy link
Collaborator

@jferrant jferrant commented Jul 1, 2024

Added two commands:

generate-vote: prints a vote signature across a SIP and vote value using the provided key
verify-vote: prints whether the message signature verifies against the provided info and public key

e.g. (Note PUBLIC_KEY, and SIGNATURE are in hexadecimal format)

stacks-signer generate-vote --sip 10 --vote yes -c [CONFIG_FILE]
stacks-signer verify-vote --sip 10 --vote yes -p [PUBLIC_KEY] -s [SIGNATURE]

QUESTION: There is mention of "How to Sign" Instructions being done as part of this PR. I assume this is in reference to "How to Vote" and would include the cli command documentation and then of course where you send your vote? not actually how to sign blocks?

Closes https://github.com/orgs/stacks-network/projects/63/views/32?pane=issue&itemId=68310304

@jferrant jferrant requested review from a team as code owners July 1, 2024 17:15
@jferrant jferrant force-pushed the feature/vote-for-sip-cli branch from 793c6d0 to d05c20b Compare July 2, 2024 15:48
Signed-off-by: Jacinta Ferrant <[email protected]>
Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

This looks good to me, but I have a couple comments:

  1. I think this should read the signing key from the config file like the signer binary does for running the signer.

  2. This message format is fine, but I think it'd be better if it were a SIP-018 signing scheme.

stacks-signer/Cargo.toml Outdated Show resolved Hide resolved
stacks-signer/src/cli.rs Outdated Show resolved Hide resolved
stacks-signer/src/cli.rs Outdated Show resolved Hide resolved
stacks-signer/src/cli.rs Outdated Show resolved Hide resolved
@jferrant jferrant requested review from kantai and hstove July 3, 2024 12:11
@jferrant
Copy link
Collaborator Author

jferrant commented Jul 3, 2024

This looks good to me, but I have a couple comments:

1. I think this should read the signing key from the config file like the signer binary does for running the signer.

2. This message format is fine, but I think it'd be better if it were a SIP-018 signing scheme.

I agree with both observations as it will make it consistent with generate stacking signature and remove the sha2 dependency.

Done!

stacks-signer/src/cli.rs Outdated Show resolved Hide resolved
@jferrant jferrant requested a review from kantai July 3, 2024 14:43
Copy link
Contributor

@hstove hstove left a comment

Choose a reason for hiding this comment

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

LGTM!

@wileyj wileyj added this pull request to the merge queue Jul 3, 2024
Merged via the queue into develop with commit 1c8cd23 Jul 3, 2024
1 check passed
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants