Tendermint Socket Protocol (TMSP)
TMSP is a socket protocol enabling a consensus engine, running in one process,
to manage an application state, running in another.
Thus the applications can be written in any programming language.
TMSP is an asynchronous protocol: message responses are written back asynchronously to the platform.
Applications must be deterministic.
For more information on TMSP, motivations, and tutorials, please visit our blog post that explains it all.
Message types
AppendTx
- Arguments:
- Returns:
- Usage:
Append and run a transaction. The transaction may or may not be final.
GetHash
- Returns:
RetCode (int8)
Hash ([]byte)
- Usage:
Return a Merkle root hash of the application state
Commit
- Returns:
- Usage:
Finalize all appended transactions
Rollback
- Returns:
- Usage:
Roll back to the last commit
AddListener
- Arguments:
- Returns:
- Usage:
Add event listener callback for events with given key.
RemoveListener
- Arguments:
- Returns:
- Usage:
Remove event listener callback for events with given key.
Flush
- Usage:
Flush the response queue. Applications that implement types.Application
need not implement this message -- it's handled by the project.
Info
- Returns:
- Usage:
Return an array of strings about the application state. Application specific.
SetOption
- Arguments:
Key (string)
Value (string)
- Returns:
- Usage:
Set application options. E.g. Key="mode", Value="mempool" for a mempool connection, or Key="mode", Value="consensus" for a consensus connection.
Other options are application specific.