-
Notifications
You must be signed in to change notification settings - Fork 69
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
signer-cli generates bad signature #175
Comments
Yes, certainly not sure why the cli would not use the Having said that, the concat is sane (although it should not be here), since it mirrors https://github.com/polkadot-js/common/blob/master/packages/keyring/src/pair/index.ts#L173-L178 |
I don't know if it's the same issue, but I'm too using an ed25519 key and I receive
Was it tested recently with this type of key? |
Which chain is this? Polkadot/Kusama/other? EDIT: Re-reading, that was a very stupid question, everybody can see the |
Polkadot |
Very strange, exact same does work for me on both sr25519 and sr25519 keys. (2 different accounts). How long was the delay between creation of the payload and submission of the signature? (Just wondering if the 5 minute mortal era comes into play here) |
No, I send it almost instantaneously.
It should be a legitimate ed25519 signature, any reason why this happens? |
The above signature is not correct. For the Substrate signatures (MultiSiginature type) it is always 65/66 bytes in length. The first byte is always 00, 01 or 02, (00 = ed25519, 01 = sr25519, 02 = ecdsa), the reaming bytes contain the actual signature data. (64 following for sr/ed, 65 for ecdsa) |
I see.. missed it. The transaction is submitted ok now, thanks! |
Is this still an issue @pavelrib ? |
@pavelrib could you please tell me how to fix it? my code happed too~
|
How do I disable or code signing? |
@polariseye Your sign is incorrect - you need to pass the flag to add the identification byte. (See the sign options on the keyring) |
See my previous comment for reference: #174 (comment)
After some digging,
here's how the api generates a signature from an extrinsicPayload:
const { signature } = extrinsicPayload.sign(myKeyringPair);
which is equal to:
the signer-cli is doing it this way:
I think it should be something like that instead:
The text was updated successfully, but these errors were encountered: