github.com/vipernet-xyz/tm@v0.34.24/docs/introduction/quick-start.md (about)

     1  ---
     2  order: 2
     3  ---
     4  
     5  # Quick Start
     6  
     7  ## Overview
     8  
     9  This is a quick start guide. If you have a vague idea about how Tendermint
    10  works and want to get started right away, continue.
    11  
    12  ## Install
    13  
    14  ### Quick Install
    15  
    16  To quickly get Tendermint installed on a fresh
    17  Ubuntu 16.04 machine, use [this script](https://git.io/fFfOR).
    18  
    19  > :warning: Do not copy scripts to run on your machine without knowing what they do.
    20  
    21  ```sh
    22  curl -L https://git.io/fFfOR | bash
    23  source ~/.profile
    24  ```
    25  
    26  The script is also used to facilitate cluster deployment below.
    27  
    28  ### Manual Install
    29  
    30  For manual installation, see the [install instructions](install.md)
    31  
    32  ## Initialization
    33  
    34  Running:
    35  
    36  ```sh
    37  tendermint init
    38  ```
    39  
    40  will create the required files for a single, local node.
    41  
    42  These files are found in `$HOME/.tendermint`:
    43  
    44  ```sh
    45  $ ls $HOME/.tendermint
    46  
    47  config  data
    48  
    49  $ ls $HOME/.tendermint/config/
    50  
    51  config.toml  genesis.json  node_key.json  priv_validator.json
    52  ```
    53  
    54  For a single, local node, no further configuration is required.
    55  Configuring a cluster is covered further below.
    56  
    57  ## Local Node
    58  
    59  Start Tendermint with a simple in-process application:
    60  
    61  ```sh
    62  tendermint node --proxy_app=kvstore
    63  ```
    64  
    65  > Note: `kvstore` is a non persistent app, if you would like to run an application with persistence run `--proxy_app=persistent_kvstore`
    66  
    67  and blocks will start to stream in:
    68  
    69  ```sh
    70  I[01-06|01:45:15.592] Executed block                               module=state height=1 validTxs=0 invalidTxs=0
    71  I[01-06|01:45:15.624] Committed state                              module=state height=1 txs=0 appHash=
    72  ```
    73  
    74  Check the status with:
    75  
    76  ```sh
    77  curl -s localhost:26657/status
    78  ```
    79  
    80  ### Sending Transactions
    81  
    82  With the KVstore app running, we can send transactions:
    83  
    84  ```sh
    85  curl -s 'localhost:26657/broadcast_tx_commit?tx="abcd"'
    86  ```
    87  
    88  and check that it worked with:
    89  
    90  ```sh
    91  curl -s 'localhost:26657/abci_query?data="abcd"'
    92  ```
    93  
    94  We can send transactions with a key and value too:
    95  
    96  ```sh
    97  curl -s 'localhost:26657/broadcast_tx_commit?tx="name=satoshi"'
    98  ```
    99  
   100  and query the key:
   101  
   102  ```sh
   103  curl -s 'localhost:26657/abci_query?data="name"'
   104  ```
   105  
   106  where the value is returned in hex.
   107  
   108  ## Cluster of Nodes
   109  
   110  First create four Ubuntu cloud machines. The following was tested on Digital
   111  Ocean Ubuntu 16.04 x64 (3GB/1CPU, 20GB SSD). We'll refer to their respective IP
   112  addresses below as IP1, IP2, IP3, IP4.
   113  
   114  Then, `ssh` into each machine, and execute [this script](https://git.io/fFfOR):
   115  
   116  ```sh
   117  curl -L https://git.io/fFfOR | bash
   118  source ~/.profile
   119  ```
   120  
   121  This will install `go` and other dependencies, get the Tendermint source code, then compile the `tendermint` binary.
   122  
   123  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.
   124  
   125  Before you can start the network, you'll need peers identifiers (IPs are not enough and can change). We'll refer to them as ID1, ID2, ID3, ID4.
   126  
   127  ```sh
   128  tendermint show_node_id --home ./mytestnet/node0
   129  tendermint show_node_id --home ./mytestnet/node1
   130  tendermint show_node_id --home ./mytestnet/node2
   131  tendermint show_node_id --home ./mytestnet/node3
   132  ```
   133  
   134  Finally, from each machine, run:
   135  
   136  ```sh
   137  tendermint node --home ./mytestnet/node0 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656"
   138  tendermint node --home ./mytestnet/node1 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656"
   139  tendermint node --home ./mytestnet/node2 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656"
   140  tendermint node --home ./mytestnet/node3 --proxy_app=kvstore --p2p.persistent_peers="ID1@IP1:26656,ID2@IP2:26656,ID3@IP3:26656,ID4@IP4:26656"
   141  ```
   142  
   143  Note that after the third node is started, blocks will start to stream in
   144  because >2/3 of validators (defined in the `genesis.json`) have come online.
   145  Persistent peers can also be specified in the `config.toml`. See [here](../tendermint-core/configuration.md) for more information about configuration options.
   146  
   147  Transactions can then be sent as covered in the single, local node example above.