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

[Bug] Transaction signature verification failure #459

Open
robertvo opened this issue Jun 19, 2024 · 3 comments
Open

[Bug] Transaction signature verification failure #459

robertvo opened this issue Jun 19, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@robertvo
Copy link

robertvo commented Jun 19, 2024

Describe the bug
Get error from Solana network "Transaction signature verification failure"

To Reproduce
Create a consolidation transaction with 4 transfers from 4 input addresses to 1 output

There's some kind of signature mismatch. It always works with 1 input, it SOMETIMES works with 3 and it never works with 4.

@robertvo robertvo added the bug Something isn't working label Jun 19, 2024
@AbanoubNassem
Copy link

any updates ? have you figured a work around ?

@BifrostTitan
Copy link
Contributor

This is from Solnet.Serum. Maybe it will help bypass the verification issue.
When certain transactions are deserialized the public keys for the signatures are pulled from the instructions which can be incorrect.

Create a TransactionBuilder instance and create your transaction by adding the instructions etc then obtain signatures from all the signers and add them to the signature list. Try populating the signatures manually.

I will look into the web3.js source code and take a look at the typescript implementation to see if I can find a better way to serialize and break down transactions.

   byte[] txBytes = txBuilder.CompileMessage();

   byte[] signatureBytes = TraderWallet.Sign(txBytes);

   List<byte[]> signatures = new() { signatureBytes };
   signatures.AddRange(_signers.Select(signer => signer.Sign(txBytes)));
   _signers.Clear();

   Transaction tx = Transaction.Populate(Message.Deserialize(txBytes), signatures);
    return await rpc.SendTransactionAsync(tx.Serialize());

@robertvo
Copy link
Author

robertvo commented Sep 7, 2024

I did not figure this out. Instead of making 4 transfers in one transactions, I'm sending 4 separate transactions :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants