Skip to content

plugins.aea-test-autonomy.aea_test_autonomy.docker.tendermint

Tendermint Docker image.

TendermintDockerImage Objects

class TendermintDockerImage(DockerImage)

Tendermint Docker image.

__init__

def __init__(client: docker.DockerClient, abci_host: str = DEFAULT_ABCI_HOST, abci_port: int = DEFAULT_ABCI_PORT, port: int = DEFAULT_TENDERMINT_PORT, p2p_port: int = DEFAULT_P2P_PORT, com_port: int = DEFAULT_TENDERMINT_COM_PORT)

Initialize.

tag

@property
def tag() -> str

Get the tag.

create

def create() -> Container

Create the container.

create_many

def create_many(nb_containers: int) -> List[Container]

Instantiate the image in many containers, parametrized.

wait

def wait(max_attempts: int = 15, sleep_rate: float = 1.0) -> bool

Wait until the image is running.

Arguments:

  • max_attempts: max number of attempts.
  • sleep_rate: the amount of time to sleep between different requests.

Returns:

True if the wait was successful, False otherwise.

FlaskTendermintDockerImage Objects

class FlaskTendermintDockerImage(TendermintDockerImage)

Flask app with Tendermint Docker image.

__init__

def __init__(client: docker.DockerClient, abci_host: str = DEFAULT_ABCI_HOST, abci_port: int = DEFAULT_ABCI_PORT, port: int = DEFAULT_TENDERMINT_PORT, p2p_port: int = DEFAULT_P2P_PORT, com_port: int = DEFAULT_TENDERMINT_COM_PORT + 2)

Initialize.

tag

@property
def tag() -> str

Get the tag.

get_node_name

@staticmethod
def get_node_name(i: int) -> str

Get the ith node's name.

get_port

def get_port(i: int) -> int

Get the ith port.

get_com_port

def get_com_port(i: int) -> int

Get the ith com port.

get_p2p_port

def get_p2p_port(i: int) -> int

Get the ith p2p port.

get_abci_port

def get_abci_port(i: int) -> int

Get the ith abci port.

get_addr

def get_addr(prefix: str, i: int, p2p: bool = False) -> str

Get a node's address.

p2p_seeds

@property
def p2p_seeds() -> List[str]

Get p2p seeds.

create_many

def create_many(nb_containers: int) -> List[Container]

Create a list of node containers.

health_check

def health_check(**kwargs: Any) -> None

Do a health-check of the Tendermint network.

Back to top