packages.valory.connections.abci.tendermint_
decoder
Decode AEA messages from Tendermint protobuf messages.
_
TendermintProtocolDecoder Objects
class _TendermintProtocolDecoder()
Decoder called by the server to process requests from the TCP connection with Tendermint.
It translates from Tendermint's ABCI Protobuf messages into the AEA's ABCI protocol messages.
process
@classmethod
def process(cls, message: Request, dialogues: AbciDialogues,
counterparty: str) -> Optional[Tuple[AbciMessage, AbciDialogue]]
Process an ABCI request or response.
request_
echo
@classmethod
def request_echo(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode an echo request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
flush
@classmethod
def request_flush(cls, _request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a flush request.
Arguments:
_request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
info
@classmethod
def request_info(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a info request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
set_
option
@classmethod
def request_set_option(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a set_option request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
init_
chain
@classmethod
def request_init_chain(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a init_chain request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
begin_
block
@classmethod
def request_begin_block(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a begin_block request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
check_
tx
@classmethod
def request_check_tx(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a check_tx request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
deliver_
tx
@classmethod
def request_deliver_tx(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a deliver_tx request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
query
@classmethod
def request_query(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a query request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
commit
@classmethod
def request_commit(cls, _request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a commit request.
Arguments:
_request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
end_
block
@classmethod
def request_end_block(cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode an end_block request.
Arguments:
request
: the request.dialogues
: the dialogues object.counterparty
: the counterparty.
Returns:
the AbciMessage request.
request_
list_
snapshots
@classmethod
def request_list_snapshots(
cls, _request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a list_snapshots request.
request_
offer_
snapshot
@classmethod
def request_offer_snapshot(
cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a offer_snapshot request.
request_
load_
snapshot_
chunk
@classmethod
def request_load_snapshot_chunk(
cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a load_snapshot_chunk request.
request_
apply_
snapshot_
chunk
@classmethod
def request_apply_snapshot_chunk(
cls, request: Request, dialogues: AbciDialogues,
counterparty: str) -> Tuple[AbciMessage, AbciDialogue]
Decode a apply_snapshot_chunk request.
no_
match
@classmethod
def no_match(cls, _request: Request, _dialogues: AbciDialogues,
_counterparty: str) -> None
Handle the case in which the request is not supported.