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

simulateTransaction RPC incorrent response #4122

Open
kalaninja opened this issue Dec 15, 2024 · 0 comments
Open

simulateTransaction RPC incorrent response #4122

kalaninja opened this issue Dec 15, 2024 · 0 comments

Comments

@kalaninja
Copy link

Problem

According to documentation the errors of transaction simulation are supposed to be returned inside err field. If signature verification fails it should probably be returned as SignatureFailure. But it is returned as an rpc error:

curl https://api.devnet.solana.com -s -X POST -H "Content-Type: application/json" -d '
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "simulateTransaction",
    "params": [
      "AfdiIh1VJVFHoZirs4OV3QgbI9V09KI/Iqotz+kuuWIjg4uwOvZWpb5Ko2FpFbi+QjmRBxkNV4lUmfgYkaGp614BAAEDtXNbCOnvYthBmiJo0S/5JMGj2g1Z6lcS7aM8k9n4Ik7Ee6OvBADQGFw/1hMiY7ym3f4iop/7XcsALwYRoNt9LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgIAAQwCAAAAQEIPAAAAAAA=",
      {
        "encoding":"base64",
        "sigVerify":true
      }
    ]
  }
'

{"jsonrpc":"2.0","error":{"code":-32003,"message":"Transaction signature verification failure"},"id":1}

Proposed Solution

Either the response or the documentation should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant