Integrating with ABCI via the "Tendermint Socket Protocol" (TSP) over TCP #300
-
A question came through recently regarding implementing a low-level ABCI application that a node talks to via TCP (what we refer to as a "socket client"). If one doesn't use one of the official client libraries that support Tendermint Core or CometBFT (e.g. tendermint-rs), how does one implement this communication? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The socket client in a CometBFT or Tendermint Core node makes use of a communication protocol that we call the "Tendermint Socket Protocol" or TSP over the 4 connections between a node and the application. This is an extremely simple request/response-based protocol that takes place over TCP. Each request or response message is protobuf-encoded, but has a length delimiter prefix that is encoded as a varint. In the v0.34.x release series, this length delimiter prefix is encoded as a signed varint, using the In the v0.37.x release series, this length delimiter prefix has changed to instead use an unsigned varint (using
We also chose not to make this change in the v0.34.x series because doing so would break everyone's interaction with their socket-based ABCI applications. |
Beta Was this translation helpful? Give feedback.
The socket client in a CometBFT or Tendermint Core node makes use of a communication protocol that we call the "Tendermint Socket Protocol" or TSP over the 4 connections between a node and the application.
This is an extremely simple request/response-based protocol that takes place over TCP. Each request or response message is protobuf-encoded, but has a length delimiter prefix that is encoded as a varint.
In the v0.34.x release series, this length delimiter prefix is encoded as a signed varint, using the
binary.PutVarint
method.In the v0.37.x release series, this length delimiter prefix has changed to instead use an unsigned varint (using
binary.PutUvarint
). This change happened because: