Ethan Buchman f205a937cf | 7 years ago | |
---|---|---|
client | 7 years ago | |
cmd/abci-cli | 7 years ago | |
example | 7 years ago | |
scripts | 7 years ago | |
server | 7 years ago | |
tests | 7 years ago | |
types | 7 years ago | |
version | 7 years ago | |
.editorconfig | 7 years ago | |
.gitignore | 7 years ago | |
CHANGELOG.md | 7 years ago | |
Dockerfile.develop | 7 years ago | |
LICENSE | 8 years ago | |
Makefile | 7 years ago | |
README.md | 7 years ago | |
circle.yml | 7 years ago | |
glide.lock | 7 years ago | |
glide.yaml | 7 years ago | |
specification.rst | 7 years ago | |
test.sh | 7 years ago |
Blockchains are systems for multi-master state machine replication. ABCI is an interface that defines the boundary between the replication engine (the blockchain), and the state machine (the application). By using a socket protocol, we enable a consensus engine running in one process to manage an application state running in another.
For background information on ABCI, motivations, and tendermint, please visit the documentation.
The two guides to focus on are the Application Development Guide
and Using ABCI-CLI
.
Previously, the ABCI was referred to as TMSP.
The community has provided a number of addtional implementations, see the Tendermint Ecosystem
We provide three implementations of the ABCI in Go:
Note the GRPC version is maintained primarily to simplify onboarding and prototyping and is not receiving the same attention to security and performance as the others.
The simplest implementation just uses function calls within Go. This means ABCI applications written in Golang can be compiled with TendermintCore and run as a single binary.
ABCI is best implemented as a streaming protocol. The socket implementation provides for asynchronous, ordered message passing over unix or tcp. Messages are serialized using Protobuf3 and length-prefixed. 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 ABCI message is 0xDEADBEEF
(4 bytes), the length-prefixed message is 0x0104DEADBEEF
. If the Protobuf3 encoded ABCI message is 65535 bytes long, the length-prefixed message would be like 0x02FFFF...
.
GRPC is an rpc framework native to Protocol Buffers with support in many languages. Implementing the ABCI using GRPC can allow for faster prototyping, but is expected to be much slower than the ordered, asynchronous socket protocol. The implementation has also not received as much testing or review.
Note the length-prefixing used in the socket implementation does not apply for GRPC.
The abci-cli
tool wraps an ABCI client and can be used for probing/testing an ABCI server.
For instance, abci-cli test
will run a test sequence against a listening server running the Counter application (see below).
It can also be used to run some example applications.
See the documentation for more details.
Multiple example apps are included:
abci-cli counter
application, which illustrates nonce checking in txsabci-cli dummy
application, which illustrates a simple key-value Merkle treeabci-cli dummy --persistent
application, which augments the dummy with persistence and validator set changesgo get github.com/tendermint/abci
cd $GOPATH/src/github.com/tendermint/abci
make get_vendor_deps
make install
See the spec file for more information.