I'm currently working at a small trading platform using Tendermint but I'm not yet sure on how the Tendermint application states should be used. In the Tendermint docs under https://tendermint.com/docs/app-dev/abci-spec.html#message-types it says:
Note that messages may be sent concurrently across all connections - a typical application will thus maintain a distinct state for each connection. They may be referred to as the DeliverTx state, the CheckTx state, and the Commit state respectively.
I'll give you my understanding on how these three states should be used and hopefully you can tell me whether this is correct.
My view on the three states perhaps already implies that I'm not sure what happens when the application receives a DeliverTx request but the delivered transaction is invalid (does this case even occur?). How does the entire process of proposing, prevoting and precommitting actually relate to these message types (CheckTx, DeliverTx, Commit)?
As mentioned, https://tendermint.com/docs/spec/abci/apps.html#state should answer this.
There is also a nice explanation at https://github.com/6thc/tendermint-cas-demo