OpenBotDev / oldbot

Microsoft Public License
16 stars 6 forks source link

⁠Random error for buy and sell tx #7

Open benjiqq opened 7 months ago

lexciobotariu commented 7 months ago

With the last update, it doesn't buy any tokens. I tried to increase the waiting time for confirmTransactionWithTimeout to 15 seconds, but I still get [error]: Failed to confirm transaction:

This is my RPC Speed

Metric Value
Transaction Delay 25 milliseconds
Number of Workers 10
Total Successful Transactions Sent 6559
Total Failed Transactions 10
Success Rate 99.85%
RPC Benchmark by ThorLabs v0.1.7
Test Duration 60 seconds
All jobs are completed in 60.00 seconds
Sending Transactions Per Second (TPS) 109
Successful Transactions Per Second (TPS) 109
RPC Benchmark by ThorLabs v0.1.7
Latency (ping RPC) 5.434 milliseconds
Minimum TX Response Time 42.720 milliseconds
Maximum TX Response Time 574.101 milliseconds
Average TX Response Time 65.688 milliseconds
Median TX Response Time 57.640 milliseconds
P90 TX Response Time 55.946 milliseconds
P95 TX Response Time 56.707 milliseconds
P99 TX Response Time 57.460 milliseconds
RPC Benchmark by ThorLabs v0.1.7

Any suggestions?

benjiqq commented 7 months ago

thanks for report. I pushed more logging on latest master. tx code needs more testing and improving. likely can be improved with tweaking of prio fees

https://solana.stackexchange.com/questions/9482/solana-sendrawtransaction-confirmtransaction-confirmtransaction-takes-foreve

lexciobotariu commented 7 months ago

I increased the price and limit as per the suggestion. I even tried to increase the MAX_RETRY = 5. I can't figure out why it doesn't send another request if the last one failed.

ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 10000000 }),
ComputeBudgetProgram.setComputeUnitLimit({ units: 1000000 }),