mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-19 23:30:38 +00:00
* spec/reactors/mempool: batch txs per peer Refs https://github.com/tendermint/tendermint/issues/625 * update
1.0 KiB
1.0 KiB
Mempool Messages
P2P Messages
There is currently only one message that Mempool broadcasts and receives over
the p2p gossip network (via the reactor): TxsMessage
// TxsMessage is a MempoolMessage containing a list of transactions.
type TxsMessage struct {
Txs []types.Tx
}
RPC Messages
Mempool exposes CheckTx([]byte) over the RPC interface.
It can be posted via broadcast_commit, broadcast_sync or
broadcast_async. They all parse a message with one argument,
"tx": "HEX_ENCODED_BINARY" and differ in only how long they
wait before returning (sync makes sure CheckTx passes, commit
makes sure it was included in a signed block).
Request (POST http://gaia.zone:26657/):
{
"id": "",
"jsonrpc": "2.0",
"method": "broadcast_sync",
"params": {
"tx": "F012A4BC68..."
}
}
Response:
{
"error": "",
"result": {
"hash": "E39AAB7A537ABAA237831742DCE1117F187C3C52",
"log": "",
"data": "",
"code": 0
},
"id": "",
"jsonrpc": "2.0"
}