Skip to content

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.