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.
image
@property
def image() -> str
Get the image name.
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.
image
@property
def image() -> str
Get the image name.
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.
cleanup
@staticmethod
def cleanup(nb_containers: int) -> None
Cleanup dangling containers.