docs: testnet (#458)

* testnet docs

* more changes

* testnet and validators
This commit is contained in:
Federico Kunze Küllmer
2021-08-19 10:23:33 +00:00
committed by GitHub
parent fc46430e0f
commit ea3ec3b7c6
18 changed files with 904 additions and 282 deletions
+49 -3
View File
@@ -40,12 +40,58 @@ You can also enable auto-completion with the `ethermintd completion` command. Fo
By default, your config and data are stored in the folder located at the `~/.ethermintd` directory.
:::warning
Make sure you have backed up your wallet storage after creating the wallet or else your funds may be inaccessible in case of accident forever.
:::
```bash
. # ~/.ethermintd
├── data/ # Contains the databases used by the node.
└── config/
├── app.toml # Application-related configuration file.
├── config.toml # Tendermint-related configuration file.
├── genesis.json # The genesis file.
├── node_key.json # Private key to use for node authentication in the p2p protocol.
└── priv_validator_key.json # Private key to use as a validator in the consensus protocol.
```
To specify the `ethermintd` config and data storage directory; you can update it using the global flag `--home <directory>`
### Configuring the Node
The Cosmos SDK automatically generates two configuration files inside `~/.ethermintd/config`:
- `config.toml`: used to configure the Tendermint, learn more on [Tendermint's documentation](https://docs.tendermint.com/master/nodes/configuration.html),
- `app.toml`: generated by the Cosmos SDK, and used to configure your app, such as state pruning strategies, telemetry, gRPC and REST servers configuration, state sync, JSON-RPC, etc.
Both files are heavily commented, please refer to them directly to tweak your node.
One example config to tweak is the `minimum-gas-prices` field inside `app.toml`, which defines the minimum amount the validator node is willing to accept for processing a transaction. It is am anti spam mechanism and it will reject incoming transactions with less than the minimum gas prices.
If it's empty, make sure to edit the field with some value, for example `10token`, or else the node will halt on startup.
```toml
# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of any denomination
# specified in this config (e.g. 0.25token1;0.0001token2).
minimum-gas-prices = "0aphoton"
```
### Pruning of State
There are four strategies for pruning state. These strategies apply only to state and do not apply to block storage.
To set pruning, adjust the `pruning` parameter in the `~/.ethermintd/config/app.toml` file.
The following pruning state settings are available:
- `everything`: Prune all saved states other than the current state.
- `nothing`: Save all states and delete nothing.
- `default`: Save the last 100 states and the state of every 10,000th block.
- `custom`: Specify pruning settings with the `pruning-keep-recent`, `pruning-keep-every`, and `pruning-interval` parameters.
By default, every node is in `default` mode which is the recommended setting for most environments.
If you would like to change your nodes pruning strategy then you must do so when the node is initialized. Passing a flag when starting `ethermint` will always override settings in the `app.toml` file, if you would like to change your node to the `everything` mode then you can pass the `---pruning everything` flag when you call `ethermintd start`.
::: warning
**IMPORTANT**:
When you are pruning state you will not be able to query the heights that are not in your store.
:::
### Client configuration
We can view the default client config setting by using `ethermintd config` command:
+5 -9
View File
@@ -9,15 +9,11 @@ Configure and run an Ethermint node {synopsis}
## Pre-requisite Readings
- [Installation](./installation.md) {prereq}
## Configure the node daemon
Before kick-starting your node, we will have to configure your node so that it connects to the testnet:
- [`ethermintd`](./binary.md) {prereq}
## Automated deployment
Run the local node
Run the local node by running the `init.sh` script in the base directory of the repository.
::: warning
The script below will remove any pre-existing binaries installed. Use the manual deploy if you want
@@ -31,14 +27,14 @@ to keep your binaries and configuration files.
## Manual deployment
The instructions for setting up a brand new full node from scratch are the the same as running a
[single node local testnet](./testnet.md#single-node-local-manual-testnet).
[single node local testnet](./../guides/localnet/single_node.md#manual-localnet).
## Start node
To start your node, just type:
```bash
ethermintd start --json-rpc.enable=true --json-rpc.api="eth,web3,net,txpool,debug"
ethermintd start --json-rpc.enable=true --json-rpc.api="eth,web3,net"
```
## Key Management
@@ -59,7 +55,7 @@ You can generate a new key/mnemonic with:
ethermintd keys add $KEY
```
To export your ethermint key as an ethereum private key (for use with Metamask for example):
To export your ethermint key as an Ethereum private key (for use with [Metamask](./../guides/keys-wallets/metamask) for example):
```bash
ethermintd keys unsafe-export-eth-key $KEY