Hope you’re all well.
I’m working on a project in nodejs and my scenario is like this:
- I run a local node on my mac and I plugged my algosdk to it
- I watch for every new block with algosdk in my script
- right when I receive a new block, I read data from an Algorand application state, I perform a series of operations in my script relative to the application state I just retrieved, prepare group transactions and then send them to the network
The thing is, I’m often too slow (I think?) and some of my transactions are sometimes rejected by the application because its state I read from the previous block is no longer true when I submit my transactions.
My question is:
How can I improve my speed so I can be sure that my transactions are going to be the first in line in the next block, and then ensure the application accepts them?