Go to file
Jae Kwon 16e5e4e8c8 Change license format 2015-12-23 14:11:59 -08:00
cmd Remove spurious tmsp_cli.go 2015-12-21 16:36:50 -08:00
example Add .pyc to gitignore; Fix js example 2015-12-21 17:23:05 -08:00
server Conform to new go-wire TypeByte behavior 2015-12-21 09:58:27 -08:00
tests example/js 2015-12-21 18:03:57 -05:00
types RetCodeEncodingError 2015-12-17 13:48:36 -08:00
.gitignore Add .pyc to gitignore; Fix js example 2015-12-21 17:23:05 -08:00
LICENSE Change license format 2015-12-23 14:11:59 -08:00
Makefile Add Makefile 2015-12-17 13:46:04 -08:00
README.md Added link to tendermint.com blog post 2015-12-21 17:41:35 -08:00

README.md

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:
    • TxBytes ([]byte)
  • Returns:
    • RetCode (int8)
  • 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:
    • RetCode (int8)
  • Usage:
    Finalize all appended transactions

Rollback

  • Returns:
    • RetCode (int8)
  • Usage:
    Roll back to the last commit

AddListener

  • Arguments:
    • EventKey (string)
  • Returns:
    • RetCode (int8)
  • Usage:
    Add event listener callback for events with given key.

RemoveListener

  • Arguments:
    • EventKey (string)
  • Returns:
    • RetCode (int8)
  • 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:
    • Data ([]string)
  • Usage:
    Return an array of strings about the application state. Application specific.

SetOption

  • Arguments:
    • Key (string)
    • Value (string)
  • Returns:
    • RetCode (int8)
  • 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.