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

[CLI]Need rooch sign and validator command #2381

Closed
v1xingyue opened this issue Aug 7, 2024 · 5 comments · Fixed by #2566
Closed

[CLI]Need rooch sign and validator command #2381

v1xingyue opened this issue Aug 7, 2024 · 5 comments · Fixed by #2566
Assignees
Labels
area::cli CLI relative issues skill::rust Need the rust language skill to complete the issue
Milestone

Comments

@v1xingyue
Copy link
Contributor

Rooch cli tools need sign and validator command.

  • sign use account secret key to sign content hex bytes
  • validator validator the signature by the rooch account signer.
@jolestar jolestar changed the title Need rooch sign and validator command [CLI]Need rooch sign and validator command Aug 8, 2024
@jolestar jolestar added skill::rust Need the rust language skill to complete the issue area::cli CLI relative issues labels Aug 8, 2024
@jolestar jolestar added this to the Rooch v0.7 milestone Aug 8, 2024
@feliciss
Copy link
Collaborator

Is this issue available for handling?

@jolestar
Copy link
Contributor

jolestar commented Aug 12, 2024

Is this issue available for handling?

@v1xingyue is handle this

@v1xingyue
Copy link
Contributor Author

Okay I'll handle this

@jolestar
Copy link
Contributor

jolestar commented Sep 2, 2024

  1. The rooch account sign command should add a prefix to the message,

Bitcoin Signed Message:\n

const MessagePrefix : vector<u8> = b"Bitcoin Signed Message:\n";
const MessageInfoPrefix: vector<u8> = b"Rooch Transaction:\n";

We can wrap it into a struct, like AuthPayload, and we need to ensure the signed result is the same as the Bitcoin wallet result.

  1. Provide a verify command and verify message move function.

@feliciss

feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 3, 2024
@feliciss
Copy link
Collaborator

feliciss commented Sep 4, 2024

  1. The rooch account sign command should add a prefix to the message,

Bitcoin Signed Message:\n

const MessagePrefix : vector<u8> = b"Bitcoin Signed Message:\n";
const MessageInfoPrefix: vector<u8> = b"Rooch Transaction:\n";

We can wrap it into a struct, like AuthPayload, and we need to ensure the signed result is the same as the Bitcoin wallet result.

  1. Provide a verify command and verify message move function.

@feliciss

It doesn't relate to any message signing format of the Bitcoin-QT or the RFC2440 on the wiki mentioned there: https://en.bitcoin.it/wiki/Message_signing#Displaying_signed_messages.

feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 5, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 5, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 5, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 5, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 5, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 5, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 6, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 6, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 6, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 6, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 6, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 7, 2024
feliciss added a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
feliciss pushed a commit to feliciss/rooch that referenced this issue Sep 8, 2024
jolestar pushed a commit that referenced this issue Sep 8, 2024
…2566)

* [gh-2381] add msg prefix to the account sign command.

* [gh-2381] modify the sign command output as msg and auth payload.

* [gh-2381] modify sign command for signing.

* [gh-2381] add verify command.

* [gh-2381] revise the sign and verify process.

* [gh-2381] revise account verify command and add tests.

* [gh-2381] follow #2580 to add account sign command.

* [gh-2381] fix some issues of the account sign command.

* [gh-2381] revise account verify command.

* [gh-2381] revise the integ test.

* [gh-2381] fix issues arisen from comments.

* [gh-2381] fix cmd.feature.

* [gh-2381] fix output.

* [gh-2381] fix lint issues.

* [gh-2381] fix tests.

* [gh-2381] add assert to test and parsed signature struct.

* [gh-2381] format the code.

* [gh-2381] revise the signature hex and verify command.

* [gh-2381] fix the issue of verification.

---------

Co-authored-by: Feliciss <10203-feliciss@users.noreply.0xacab.org>
@github-project-automation github-project-automation bot moved this to Done in Rooch Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area::cli CLI relative issues skill::rust Need the rust language skill to complete the issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants