diff --git a/.gitignore b/.gitignore index be52e644..c013b0e8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ test/p2p/data/ test/logs coverage.txt docs/_build -docs/tools *.log abci-cli abci/types/types.pb.go diff --git a/docs/README.md b/docs/README.md index 1b558316..16ea708a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,5 @@ # Tendermint -TEST! - Welcome to the Tendermint Core documentation! The introduction below provides an overview to help you navigate to your area of interest. @@ -13,18 +11,17 @@ replicates it on many machines. In other words, a blockchain. Tendermint requires an application running over the Application Blockchain Interface (ABCI) - and comes packaged with an example application to do so. -Follow the [installation instructions](./install) to get up and running -quickly. For more details on [using tendermint](./using-tendermint) see that +Follow the [installation instructions](./introduction/install) to get up and running +quickly. For more details on [using tendermint](./tendermint-core/using-tendermint) see that and the following sections. ## Networks Testnets can be setup manually on one or more machines, or automatically on one or more machine, using a variety of methods described in the [deploy testnets -section](./deploy-testnets). For more information (and to join) about the -Cosmos Network testnets, see [here](/getting-started/full-node.md). +section](./networks/deploy-testnets). ## Application Development The first step to building application on Tendermint is to [install -ABCI-CLI](./getting-started) and play with the example applications. +ABCI-CLI](./app-dev/getting-started) and play with the example applications. diff --git a/docs/abci-cli.md b/docs/app-dev/abci-cli.md similarity index 100% rename from docs/abci-cli.md rename to docs/app-dev/abci-cli.md diff --git a/docs/abci-spec.md b/docs/app-dev/abci-spec.md similarity index 100% rename from docs/abci-spec.md rename to docs/app-dev/abci-spec.md diff --git a/docs/app-architecture.md b/docs/app-dev/app-architecture.md similarity index 100% rename from docs/app-architecture.md rename to docs/app-dev/app-architecture.md diff --git a/docs/app-development.md b/docs/app-dev/app-development.md similarity index 100% rename from docs/app-development.md rename to docs/app-dev/app-development.md diff --git a/docs/ecosystem.md b/docs/app-dev/ecosystem.md similarity index 100% rename from docs/ecosystem.md rename to docs/app-dev/ecosystem.md diff --git a/docs/getting-started.md b/docs/app-dev/getting-started.md similarity index 100% rename from docs/getting-started.md rename to docs/app-dev/getting-started.md diff --git a/docs/indexing-transactions.md b/docs/app-dev/indexing-transactions.md similarity index 100% rename from docs/indexing-transactions.md rename to docs/app-dev/indexing-transactions.md diff --git a/docs/subscribing-to-events-via-websocket.md b/docs/app-dev/subscribing-to-events-via-websocket.md similarity index 100% rename from docs/subscribing-to-events-via-websocket.md rename to docs/app-dev/subscribing-to-events-via-websocket.md diff --git a/docs/images/tmint-logo-blue.png b/docs/images/tmint-logo-blue.png deleted file mode 100644 index cc4c8fb8..00000000 Binary files a/docs/images/tmint-logo-blue.png and /dev/null differ diff --git a/docs/install.md b/docs/introduction/install.md similarity index 100% rename from docs/install.md rename to docs/introduction/install.md diff --git a/docs/introduction.md b/docs/introduction/introduction.md similarity index 100% rename from docs/introduction.md rename to docs/introduction/introduction.md diff --git a/docs/quick-start.md b/docs/introduction/quick-start.md similarity index 77% rename from docs/quick-start.md rename to docs/introduction/quick-start.md index 7c466311..8e490878 100644 --- a/docs/quick-start.md +++ b/docs/introduction/quick-start.md @@ -3,8 +3,7 @@ ## Overview This is a quick start guide. If you have a vague idea about how Tendermint -works and want to get started right away, continue. Otherwise, [review the -documentation](http://tendermint.readthedocs.io/en/master/). +works and want to get started right away, continue. ## Install @@ -135,10 +134,10 @@ This will install `go` and other dependencies, get the Tendermint source code, t Next, use the `tendermint testnet` command to create four directories of config files (found in `./mytestnet`) and copy each directory to the relevant machine in the cloud, so that each machine has `$HOME/mytestnet/node[0-3]` directory. Then from each machine, run: ``` -tendermint node --home ./mytestnet/node0 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:26656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:26656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:26656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:26656" -tendermint node --home ./mytestnet/node1 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:26656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:26656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:26656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:26656" -tendermint node --home ./mytestnet/node2 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:26656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:26656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:26656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:26656" -tendermint node --home ./mytestnet/node3 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:26656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:26656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:26656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:26656" +tendermint node --home ./mytestnet/node0 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656" +tendermint node --home ./mytestnet/node1 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656" +tendermint node --home ./mytestnet/node2 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656" +tendermint node --home ./mytestnet/node3 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656" ``` Note that after the third node is started, blocks will start to stream in diff --git a/docs/deploy-testnets.md b/docs/networks/deploy-testnets.md similarity index 100% rename from docs/deploy-testnets.md rename to docs/networks/deploy-testnets.md diff --git a/docs/terraform-and-ansible.md b/docs/networks/terraform-and-ansible.md similarity index 100% rename from docs/terraform-and-ansible.md rename to docs/networks/terraform-and-ansible.md diff --git a/docs/determinism.md b/docs/research/determinism.md similarity index 100% rename from docs/determinism.md rename to docs/research/determinism.md diff --git a/docs/transactional-semantics.md b/docs/research/transactional-semantics.md similarity index 100% rename from docs/transactional-semantics.md rename to docs/research/transactional-semantics.md diff --git a/docs/specification/configuration.md b/docs/tendermint-core/configuration.md similarity index 100% rename from docs/specification/configuration.md rename to docs/tendermint-core/configuration.md diff --git a/docs/how-to-read-logs.md b/docs/tendermint-core/how-to-read-logs.md similarity index 100% rename from docs/how-to-read-logs.md rename to docs/tendermint-core/how-to-read-logs.md diff --git a/docs/metrics.md b/docs/tendermint-core/metrics.md similarity index 100% rename from docs/metrics.md rename to docs/tendermint-core/metrics.md diff --git a/docs/specification/rpc.md b/docs/tendermint-core/rpc.md similarity index 100% rename from docs/specification/rpc.md rename to docs/tendermint-core/rpc.md diff --git a/docs/running-in-production.md b/docs/tendermint-core/running-in-production.md similarity index 100% rename from docs/running-in-production.md rename to docs/tendermint-core/running-in-production.md diff --git a/docs/using-tendermint.md b/docs/tendermint-core/using-tendermint.md similarity index 100% rename from docs/using-tendermint.md rename to docs/tendermint-core/using-tendermint.md diff --git a/docs/tools/benchmarking.md b/docs/tools/benchmarking.md new file mode 100644 index 00000000..1d84b31c --- /dev/null +++ b/docs/tools/benchmarking.md @@ -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 diff --git a/docs/tools/docker.md b/docs/tools/docker.md new file mode 100644 index 00000000..c6d09f6b --- /dev/null +++ b/docs/tools/docker.md @@ -0,0 +1,67 @@ +# Docker + +## Supported tags and respective `Dockerfile` links + +- `0.17.1`, `latest` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/208ac32fa266657bd6c304e84ec828aa252bb0b8/DOCKER/Dockerfile) +- `0.15.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/170777300ea92dc21a8aec1abc16cb51812513a4/DOCKER/Dockerfile) +- `0.13.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/a28b3fff49dce2fb31f90abb2fc693834e0029c2/DOCKER/Dockerfile) +- `0.12.1` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/457c688346b565e90735431619ca3ca597ef9007/DOCKER/Dockerfile) +- `0.12.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/70d8afa6e952e24c573ece345560a5971bf2cc0e/DOCKER/Dockerfile) +- `0.11.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/9177cc1f64ca88a4a0243c5d1773d10fba67e201/DOCKER/Dockerfile) +- `0.10.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/e5342f4054ab784b2cd6150e14f01053d7c8deb2/DOCKER/Dockerfile) +- `0.9.1`, `0.9`, [(Dockerfile)](https://github.com/tendermint/tendermint/blob/809e0e8c5933604ba8b2d096803ada7c5ec4dfd3/DOCKER/Dockerfile) +- `0.9.0` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/d474baeeea6c22b289e7402449572f7c89ee21da/DOCKER/Dockerfile) +- `0.8.0`, `0.8` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/bf64dd21fdb193e54d8addaaaa2ecf7ac371de8c/DOCKER/Dockerfile) +- `develop` [(Dockerfile)](https://github.com/tendermint/tendermint/blob/master/DOCKER/Dockerfile.develop) + +`develop` tag points to the [develop](https://github.com/tendermint/tendermint/tree/develop) branch. + +## Quick reference + +- **Where to get help:** + https://cosmos.network/community + +- **Where to file issues:** + https://github.com/tendermint/tendermint/issues + +- **Supported Docker versions:** + [the latest release](https://github.com/moby/moby/releases) (down to 1.6 on a best-effort basis) + +## Tendermint + +Tendermint Core is Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine, written in any programming language, and securely replicates it on many machines. + +For more background, see the [introduction](https://tendermint.readthedocs.io/en/master/introduction.html). + +To get started developing applications, see the [application developers guide](https://tendermint.readthedocs.io/en/master/getting-started.html). + +## How to use this image + +### Start one instance of the Tendermint core with the `kvstore` app + +A quick example of a built-in app and Tendermint core in one container. + +``` +docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init +docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint node --proxy_app=kvstore +``` + +## Local cluster + +To run a 4-node network, see the `Makefile` in the root of [the repo](https://github.com/tendermint/tendermint/master/Makefile) and run: + +``` +make build-linux +make build-docker-localnode +make localnet-start +``` + +Note that this will build and use a different image than the ones provided here. + +## License + +- Tendermint's license is [Apache 2.0](https://github.com/tendermint/tendermint/master/LICENSE). + +## Contributing + +Contributions are most welcome! See the [contributing file](https://github.com/tendermint/tendermint/blob/master/CONTRIBUTING.md) for more information. diff --git a/docs/tools/monitoring.md b/docs/tools/monitoring.md new file mode 100644 index 00000000..02c4c9c4 --- /dev/null +++ b/docs/tools/monitoring.md @@ -0,0 +1,77 @@ +# tm-monitor + +Tendermint blockchain monitoring tool; watches over one or more nodes, +collecting and providing various statistics to the user: + +- https://github.com/tendermint/tools/tree/master/tm-monitor + +## Quick Start + +### Docker + +Assuming your application is running in another container with the name +`app`: + + docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init + docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm --link=app tendermint/tendermint node --proxy_app=tcp://app:46658 + + docker run -it --rm -p "46670:46670" --link=tm tendermint/monitor tm:46657 + +If you don't have an application yet, but still want to try monitor out, +use `kvstore`: + + docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init + docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint node --proxy_app=kvstore + + docker run -it --rm -p "46670:46670" --link=tm tendermint/monitor tm:46657 + +### Using Binaries + +[Install Tendermint](https://github.com/tendermint/tendermint#install) + +then run: + + tendermint init + tendermint node --proxy_app=kvstore + + tm-monitor localhost:46657 + +with the last command being in a seperate window. + +## Usage + + tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:46670"] [endpoints] + + Examples: + # monitor single instance + tm-monitor localhost:46657 + + # monitor a few instances by providing comma-separated list of RPC endpoints + tm-monitor host1:46657,host2:46657 + Flags: + -listen-addr string + HTTP and Websocket server listen address (default "tcp://0.0.0.0:46670") + -no-ton + Do not show ton (table of nodes) + -v verbose logging + +### RPC UI + +Run `tm-monitor` and visit http://localhost:46670 You should see the +list of the available RPC endpoints: + + http://localhost:46670/status + http://localhost:46670/status/network + http://localhost:46670/monitor?endpoint=_ + http://localhost:46670/status/node?name=_ + http://localhost:46670/unmonitor?endpoint=_ + +The API is available as GET requests with URI encoded parameters, or as +JSONRPC POST requests. The JSONRPC methods are also exposed over +websocket. + +## Development + + make get_tools + make get_vendor_deps + make test