Jae Kwon 7ffd289909 | 9 years ago | |
---|---|---|
client | 9 years ago | |
cmd | 9 years ago | |
example | 9 years ago | |
server | 9 years ago | |
tests | 9 years ago | |
testutil | 9 years ago | |
types | 9 years ago | |
.gitignore | 9 years ago | |
LICENSE | 9 years ago | |
Makefile | 9 years ago | |
README.md | 9 years ago |
Blockchains are a system for creating shared multi-master application state. TMSP is a socket protocol enabling a blockchain consensus engine, running in one process, to manage a blockchain application state, running in another.
For more information on TMSP, motivations, and tutorials, please visit our blog post.
Other implementations:
Since this is a streaming protocol, all messages are encoded with a length-prefix followed by the message encoded in Protobuf3. Protobuf3 doesn't have an official length-prefix standard, so we use our own. The first byte represents the length of the big-endian encoded length.
For example, if the Protobuf3 encoded TMSP message is 0xDEADBEEF
(4 bytes), the length-prefixed message is 0x0104DEADBEEF
. If the Protobuf3 encoded TMSP message is 65535 bytes long, the length-prefixed message would be like 0x02FFFF...
.
TMSP requests/responses are simple Protobuf messages. Check out the schema file.
Data ([]byte)
: The request transaction bytesCode (uint32)
: Response codeData ([]byte)
: Result bytes, if anyLog (string)
: Debug or error messageData ([]byte)
: The request transaction bytesCode (uint32)
: Response codeData ([]byte)
: Result bytes, if anyLog (string)
: Debug or error messageCommit
or BeginBlock
,
to allow for dependent sequences of transactions in the same block.Data ([]byte)
: The Merkle root hashLog (string)
: Debug or error messageData ([]byte)
: The query request bytesCode (uint32)
: Response codeData ([]byte)
: The query response bytesLog (string)
: Debug or error messagetypes.Application
need not implement this message -- it's handled by the project.Data ([]byte)
: The info bytesKey (string)
: Key to setValue (string)
: Value to set for keyLog (string)
: Debug or error messageValidators ([]Validator)
: Initial genesis validatorsHeight (uint64)
: The block height that is startingHeight (uint64)
: The block height that endedValidators ([]Validator)
: Changed validators with new voting powers (0 to remove)