-
Notifications
You must be signed in to change notification settings - Fork 247
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
Sometimes get error's when creating a new order #161
Comments
My code is from the example:
|
Not sure, but I think the 'simulation failed' errors are related to some kind of backend RPC issue caused by congestion. That's why it's intermittent. The solution is to run your own validator, but I know that's an expensive answer. |
Can I simply connect to another validator that's less used? |
I face the similar issue.
When connection pointing to https://api.mainnet-beta.solana.com/ it always fails.
When change the connection to https://solana-api.projectserum.com/, the order goes through. In this case, I cannot connect to my own validator to place order. |
Sometimes new order fails with the following:
Transaction simulation failed: Error processing Instruction 0: custom program error: 0x22
Program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin invoke [1]
Program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin consumed 8970 of 200000 compute units
Program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin failed: custom program error: 0x22
/Users/borkur/Desktop/Coding/server-sunny/node_modules/@solana/web3.js/lib/index.cjs.js:4882
throw new SendTransactionError('failed to send transaction: ' + res.error.message, logs);
^
SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x22
at Connection.sendEncodedTransaction (/Users/borkur/Desktop/Coding/server-sunny/node_modules/@solana/web3.js/lib/index.cjs.js:4882:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Connection.sendRawTransaction (/Users/borkur/Desktop/Coding/server-sunny/node_modules/@solana/web3.js/lib/index.cjs.js:4840:20)
at async Connection.sendTransaction (/Users/borkur/Desktop/Coding/server-sunny/node_modules/@solana/web3.js/lib/index.cjs.js:4830:12)
at async Market._sendTransaction (/Users/borkur/Desktop/Coding/server-sunny/node_modules/@project-serum/serum/lib/market.js:504:27)
at async Market.placeOrder (/Users/borkur/Desktop/Coding/server-sunny/node_modules/@project-serum/serum/lib/market.js:249:16)
at async Timeout.startServer [as _onTimeout] (file:///Users/borkur/Desktop/Coding/server-sunny/server-sunny.js:215:5) {
logs: [
'Program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin invoke [1]',
'Program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin consumed 8970 of 200000 compute units',
'Program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin failed: custom program error: 0x22'
]
}
The text was updated successfully, but these errors were encountered: