@ -1,2 +1,3 @@ | |||
# tools | |||
Tools for working with tendermint and associated technologies. See the documentation at: http://tendermint.readthedocs.io/en/master/index.html#tendermint-tools | |||
Tools for working with tendermint and associated technologies. Documentation can be found in the `README.md` of each the `tm-bench/` and `tm-monitor/` directories. |
@ -1,71 +0,0 @@ | |||
Using Docker | |||
============ | |||
It is assumed that you have already `setup docker <https://docs.docker.com/engine/installation/>`__. | |||
Tendermint | |||
---------- | |||
The application configuration and data will be stored at ``/tendermint`` in the | |||
container. This directory will also be exposed as a volume. The ports 46656 and | |||
46657 will be open for ABCI applications to connect. | |||
Initialize tendermint: | |||
:: | |||
mkdir /tmdata | |||
docker run --rm -v /tmdata:/tendermint tendermint/tendermint init | |||
Change ``/tmdata`` folder to any destination where you want to store Tendermint | |||
configuration and data. | |||
Tendermint docker image is stored on `docker hub <https://hub.docker.com/r/tendermint/tendermint/>`__. | |||
Get the public key of tendermint: | |||
:: | |||
docker run --rm -v /tmdata:/tendermint tendermint/tendermint show_validator | |||
Run the docker tendermint application with: | |||
:: | |||
docker run --rm -d -v /tmdata:/tendermint tendermint/tendermint node | |||
Building images by yourself: | |||
`This folder <https://github.com/tendermint/tendermint/tree/master/DOCKER>`__ | |||
contains Docker container descriptions. Using this folder you can build your | |||
own Docker images with the tendermint application. | |||
Ethermint | |||
--------- | |||
The application configuration will be stored at ``/ethermint``. | |||
Initialize ethermint: | |||
:: | |||
mkdir /ethermintdata | |||
wget -O /ethermintdata/genesis.json https://github.com/tendermint/ethermint/raw/master/setup/genesis.json | |||
docker run --rm -v /ethermintdata:/ethermint tendermint/ethermint ethermint --datadir /ethermint init /ethermint/genesis.json | |||
Start ethermint as a validator node: This is a two-step process: \* Run the | |||
tendermint container and expose the ports that allow clients to connect. \* Run | |||
the ethermint container. You will have to define where tendermint runs as the | |||
ethermint binary connects to it explicitly. The --proxy\_app should contain the | |||
ethermint application's IP address and port. | |||
:: | |||
docker run --rm -d -v /tmdata:/tendermint tendermint/tendermint node --proxy_app=tcp://172.17.0.3:46658 | |||
docker run --rm -d -v /ethermintdata:/ethermint tendermint/ethermint ethermint --tendermint_addr tcp://172.17.0.2:46657 | |||
Building images by yourself: | |||
`This folder <https://github.com/tendermint/ethermint/blob/master/scripts/docker>`__ | |||
contains Docker container descriptions. Using this folder you can build your | |||
own Docker images with the ethermint application. |
@ -1,15 +0,0 @@ | |||
FROM busybox | |||
#Use --build-arg to change where the ethermint binary and setup directory resides | |||
ARG ETHERMINT_BINARY=ethermint | |||
ARG SETUP_DIR=setup | |||
ENV EMHOME /ethermint | |||
COPY $ETHERMINT_BINARY /usr/bin/ethermint | |||
COPY $SETUP_DIR /setup | |||
RUN adduser -h $EMHOME -D ethermint | |||
VOLUME [ $EMHOME ] | |||
EXPOSE 46658 | |||
USER ethermint | |||
ENTRYPOINT ["/usr/bin/ethermint","--datadir","$EMHOME"] | |||
WORKDIR $EMHOME | |||
STOPSIGNAL SIGTERM | |||
@ -1,21 +0,0 @@ | |||
FROM ubuntu:16.04 | |||
MAINTAINER Greg Szabo <greg@tendermint.com> | |||
#Default home for tendermint. The node command will look for $TMHOME/config/genesis.json at initialization. | |||
ENV TMHOME /tendermint | |||
RUN apt-get -y update && \ | |||
apt-get -y upgrade && \ | |||
apt-get -y install curl jq && \ | |||
adduser --system --home "$TMHOME" --group tmuser | |||
USER tmuser | |||
VOLUME [ $TMHOME ] | |||
WORKDIR $TMHOME | |||
EXPOSE 46656 46657 | |||
ENTRYPOINT ["/usr/bin/tendermint"] | |||
CMD ["node", "--moniker=`hostname`"] | |||
STOPSIGNAL SIGTERM | |||
ARG BINARY=tendermint | |||
COPY $BINARY /usr/bin/tendermint | |||
@ -1 +0,0 @@ | |||
This is a temporary folder to contain the Dockerfile used for automated builds, until it is merged with the tendermint repository. |
@ -1,14 +0,0 @@ | |||
FROM busybox | |||
#Use --build-arg to change where the tendermint binary resides | |||
ARG TENDERMINT_BINARY=tendermint | |||
ENV TMHOME /tendermint | |||
COPY $TENDERMINT_BINARY /usr/bin/tendermint | |||
RUN adduser -h $TMHOME -D tendermint | |||
VOLUME [ $TMHOME ] | |||
EXPOSE 46656 46657 | |||
USER tendermint | |||
ENTRYPOINT ["/usr/bin/tendermint"] | |||
CMD ["node"] | |||
WORKDIR $TMHOME | |||
STOPSIGNAL SIGTERM | |||
@ -0,0 +1,49 @@ | |||
# tm-bench | |||
Tendermint blockchain benchmarking tool: | |||
- https://github.com/tendermint/tools/tree/master/tm-bench | |||
For example, the following: | |||
tm-bench -T 10 -r 1000 localhost:46657 | |||
will output: | |||
Stats Avg Stdev Max | |||
Block latency 6.18ms 3.19ms 14ms | |||
Blocks/sec 0.828 0.378 1 | |||
Txs/sec 963 493 1811 | |||
## Quick Start | |||
[Install Tendermint](https://github.com/tendermint/tendermint#install) | |||
then run: | |||
tendermint init | |||
tendermint node --proxy_app=kvstore | |||
tm-bench localhost:46657 | |||
with the last command being in a seperate window. | |||
## Usage | |||
tm-bench [-c 1] [-T 10] [-r 1000] [endpoints] | |||
Examples: | |||
tm-bench localhost:46657 | |||
Flags: | |||
-T int | |||
Exit after the specified amount of time in seconds (default 10) | |||
-c int | |||
Connections to keep open per endpoint (default 1) | |||
-r int | |||
Txs per second to send in a connection (default 1000) | |||
-v Verbose output | |||
## Development | |||
make get_vendor_deps | |||
make test |
@ -1,87 +0,0 @@ | |||
Benchmarking | |||
============ | |||
tm-bench | |||
-------- | |||
Tendermint blockchain benchmarking tool: https://github.com/tendermint/tools/tree/master/tm-bench | |||
For example, the following: | |||
:: | |||
tm-bench -T 10 -r 1000 localhost:46657 | |||
will output: | |||
:: | |||
Stats Avg Stdev Max | |||
Block latency 6.18ms 3.19ms 14ms | |||
Blocks/sec 0.828 0.378 1 | |||
Txs/sec 963 493 1811 | |||
Quick Start | |||
^^^^^^^^^^^ | |||
Docker | |||
~~~~~~ | |||
:: | |||
docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint:0.12.1 init | |||
docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint:0.12.1 | |||
docker run -it --rm --link=tm tendermint/bench tm:46657 | |||
Binaries | |||
~~~~~~~~ | |||
If **Linux**, start with: | |||
:: | |||
curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.12.1/tendermint_linux_amd64.zip && sudo unzip -d /usr/local/bin tendermint_linux_amd64.zip && sudo chmod +x tendermint | |||
if **Mac OS**, start with: | |||
:: | |||
curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.12.1/tendermint_darwin_amd64.zip && sudo unzip -d /usr/local/bin tendermint_darwin_amd64.zip && sudo chmod +x tendermint | |||
then run: | |||
:: | |||
tendermint init | |||
tendermint node --proxy_app=dummy | |||
tm-bench localhost:46657 | |||
with the last command being in a seperate window. | |||
Usage | |||
^^^^^ | |||
:: | |||
tm-bench [-c 1] [-T 10] [-r 1000] [endpoints] | |||
Examples: | |||
tm-bench localhost:46657 | |||
Flags: | |||
-T int | |||
Exit after the specified amount of time in seconds (default 10) | |||
-c int | |||
Connections to keep open per endpoint (default 1) | |||
-r int | |||
Txs per second to send in a connection (default 1000) | |||
-v Verbose output | |||
Development | |||
^^^^^^^^^^^ | |||
:: | |||
make get_vendor_deps | |||
make test |