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

code 111222 when providing wrong PubKey type #172

Open
0xArdi opened this issue Jun 30, 2022 · 1 comment
Open

code 111222 when providing wrong PubKey type #172

0xArdi opened this issue Jun 30, 2022 · 1 comment
Labels
bug Something isn't working Stale

Comments

@0xArdi
Copy link
Contributor

0xArdi commented Jun 30, 2022

Providing a PubKey of type ed25519 on a SignatureV2 object and broadcasting the transaction the signature belongs to results in a code: 111222.

An example signature resulting in code 111222:

signing.SignatureV2{
	PubKey:   &secp256k1.PubKey{Key: val.PubKey.Bytes()}, // <------ passing an ed25519 pubkey, a secp256k1 pubkey is expected
	Data:     &sigData,
	Sequence: baseAccount.Sequence,
}

To run an example of this checkout #171

The error doesn't occur without explicitly casting the ed25519 PubKey into a secp256k1 one. The following code produces the correct error (code 8):

signing.SignatureV2{
	PubKey:   val.PubKey, // <------ passing an ed25519 pubkey, a secp256k1 pubkey is expected
	Data:     &sigData,
	Sequence: baseAccount.Sequence,
}
@0xArdi 0xArdi added the bug Something isn't working label Jun 30, 2022
@github-actions
Copy link

This issue was marked as stale because there was no activity for 15 days

@github-actions github-actions bot added the Stale label Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

1 participant