feat!: change signature format from vrs to rsv#1263
feat!: change signature format from vrs to rsv#1263pradel wants to merge 1 commit intostx-labs:masterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| @@ -321,7 +321,7 @@ test('STX token transfer transaction multi-sig uncompressed keys serialization a | |||
|
|
|||
| // serialized tx that has been successfully deserialized and had | |||
| // its auth verified via the stacks-blockchain implementation | |||
There was a problem hiding this comment.
Not sure how to verify this
Which standards? I don't think any of the SIPs talk about signature order explicitly. I assume this change breaks transaction signing as-is. Did you try that @pradel?
CVM special function (Is that correct @jcnelson?) |
I understood SIP018 was specifying this from the previous conversations.
I didn't, so far the transactions tests are still failing on this pr, I am not sure what would be the best way to fix them to make sure other components do not break. |
|
just as a suggestion -- I modified the signature to accept a so that nothing would break for legacy implementations, but for new applications they can opt into the different order. |
Ah I see! Yes I think SIP018 is the only SIP that discusses signature order. However, the Stacks blockchain appears to be using both
Perhaps the least confusing option for developers integrating with @aulneau solution is good too but definitely more advanced. (Developers would have to understand signatures and ordering to make an informed decision.) |
Description
signWithKeyreturns the signature in vrs order. publicKeyFromSignature likewise uses/expects this order. However, Clarity functions secp256k1-recover? and secp256k1-verify expect the signature in rsv order.The stacks.js implementation should be following the standards.
This pull request changes the
signWithKeysignature order from vrs to rsv. This is a breaking changeLinked issues:
Type of Change
Does this introduce a breaking change?
Yes this is a breaking change as the signature order is changing.
Checklist
npm run testpasses