docs: first update (#188)
* docs: update * update + * txs * update docs * more docs * spec update * doc fixes
This commit is contained in:
@@ -6,7 +6,7 @@ parent:
|
||||
|
||||
# Quick Start
|
||||
|
||||
This repository contains reference documentation on how to install and run an Etheremint full node.
|
||||
This repository contains reference documentation on how to install and run an Ethermint full node.
|
||||
|
||||
1. [Installation](./installation.md)
|
||||
2. [Run a Node](./run_node.md)
|
||||
@@ -20,4 +20,4 @@ After going throught the Quick Start contents, head over to the [basics](./../ba
|
||||
|
||||
## Next {hide}
|
||||
|
||||
Learn how to [install](./../quickstart/intallation.md) Ethermint {hide}
|
||||
Learn how to [install](./../quickstart/installation.md) Ethermint {hide}
|
||||
|
||||
@@ -9,42 +9,16 @@ Learn how to connect a client to a running node. {synopsis}
|
||||
## Pre-requisite Readings
|
||||
|
||||
- [Run a Node](./run_node.md) {prereq}
|
||||
|
||||
## Client Integrations
|
||||
|
||||
### Command Line Interface
|
||||
|
||||
Ethermint is integrated with a CLI client that can be used to send transactions and query the state from each module.
|
||||
|
||||
```bash
|
||||
# available query commands
|
||||
ethermintcli query -h
|
||||
|
||||
# available transaction commands
|
||||
ethermintcli tx -h
|
||||
```
|
||||
- [Interacting with the Node](https://docs.cosmos.network/v0.43/run-node/interact-node.html) {prereq}
|
||||
|
||||
### Client Servers
|
||||
|
||||
The Ethermint client supports both [REST endpoints](https://cosmos.network/rpc) from the SDK and Ethereum's [JSON-RPC](https://eth.wiki/json-rpc/API).
|
||||
The Ethermint client supports both [gRPC endpoints](https://cosmos.network/rpc) from the SDK and Ethereum's [JSON-RPC](https://eth.wiki/json-rpc/API).
|
||||
|
||||
#### REST and Tendermint RPC
|
||||
#### Cosmos gRPC and Tendermint RPC
|
||||
|
||||
Ethermint exposes REST endpoints for all the integrated Cosmos-SDK modules. This makes it easier for wallets and block explorers to interact with the proof-of-stake logic.
|
||||
|
||||
To run the REST Server, you need to run the Ethermint daemon (`ethermintd`) and then execute (in another
|
||||
process):
|
||||
|
||||
```bash
|
||||
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key $KEY --chain-id $CHAINID --trace
|
||||
```
|
||||
|
||||
You should see the logs from the REST and the RPC server.
|
||||
|
||||
```bash
|
||||
I[2020-07-17|16:54:35.037] Starting application REST service (chain-id: "8")... module=rest-server
|
||||
I[2020-07-17|16:54:35.037] Starting RPC HTTP server on 127.0.0.1:8545 module=rest-server
|
||||
```
|
||||
Ethermint exposes gRPC endpoints (and REST) for all the integrated Cosmos-SDK modules. This makes it easier for
|
||||
wallets and block explorers to interact with the proof-of-stake logic and native Cosmos transactions and queries:
|
||||
|
||||
#### Ethereum JSON-RPC server
|
||||
|
||||
@@ -52,12 +26,10 @@ Ethermint also supports most of the standard web3 [JSON-RPC
|
||||
APIs](https://eth.wiki/json-rpc/API) to connect with existing web3 tooling.
|
||||
|
||||
::: tip
|
||||
Some of the JSON-RPC API [namespaces](https://geth.ethereum.org/docs/rpc/server) are currently under development.
|
||||
See the list of supported JSON-RPC API [namespaces](https://geth.ethereum.org/docs/rpc/server) and endpoints.
|
||||
:::
|
||||
|
||||
To connect to the JSON-PRC server, use the `rest-server` command as shown on the section above. Then, you can point any Ethereum development tooling to `http://localhost:8545` or whatever port you choose with the listen address flag (`--laddr`).
|
||||
|
||||
For further information JSON-RPC calls, please refer to [this](../basics/json_rpc.md) document.
|
||||
To connect to the JSON-PRC server, use the `rest-server` command as shown on the section above. Then, you can point any Ethereum development tooling to `http://localhost:8545` or whatever port you choose with the listen address flag (`--evm-rpc.address`).
|
||||
|
||||
## Next {hide}
|
||||
|
||||
|
||||
@@ -86,17 +86,17 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":[
|
||||
|
||||
### Tendermint Websocket
|
||||
|
||||
To start a connection with the Tendermint websocket you need to define the address with the `--node`
|
||||
flag when initializing the REST server (default `tcp://localhost:26657`):
|
||||
To start a connection with the Tendermint websocket you need to define the address with the `--rpc.laddr`
|
||||
flag when starting the node (default `tcp://127.0.0.1:26657`):
|
||||
|
||||
```bash
|
||||
ethermintcli rest-server --laddr "tcp://localhost:8545" --node "tcp://localhost:8080" --unlock-key <my_key> --chain-id <chain_id>
|
||||
ethermintd start --rpc.laddr="tcp://127.0.0.1:26657"
|
||||
```
|
||||
|
||||
Then, start a websocket subscription with [ws](https://github.com/hashrocket/ws)
|
||||
|
||||
```bash
|
||||
# connect to tendermint websocet at port 8080 as defined above
|
||||
# connect to tendermint websocket at port 8080 as defined above
|
||||
ws ws://localhost:8080/websocket
|
||||
|
||||
# subscribe to new Tendermint block headers
|
||||
@@ -111,11 +111,11 @@ compatibility for websockets of the [Ethereum's
|
||||
PubSubAPI](https://geth.ethereum.org/docs/rpc/pubsub), Ethermint needs to cast the Tendermint
|
||||
responses retreived into the Ethereum types.
|
||||
|
||||
You can start a connection with the Ethereum websocket using the `--wsport` flag when initializing
|
||||
the REST server (default `8546`):
|
||||
You can start a connection with the Ethereum websocket using the `--evm-rpc.ws-address` flag when starting
|
||||
the node (default `"0.0.0.0:8546"`):
|
||||
|
||||
```bash
|
||||
ethermintcli rest-server --laddr "tcp://localhost:8545" --wsport 8546 --unlock-key <my_key> --chain-id <chain_id>
|
||||
ethermintd start --evm-rpc.address"0.0.0.0:8545" --evm-rpc.ws-address="0.0.0.0:8546" --evm.rpc.api="eth,web3,net,txpool,debug" --evm-rpc.enable
|
||||
```
|
||||
|
||||
Then, start a websocket subscription with [ws](https://github.com/hashrocket/ws)
|
||||
|
||||
@@ -14,11 +14,10 @@ cd ethermint
|
||||
make install
|
||||
```
|
||||
|
||||
Check that the binaries have been successfuly installed:
|
||||
Check that the binaries have been successfully installed:
|
||||
|
||||
```bash
|
||||
ethermintd -h
|
||||
ethermintcli -h
|
||||
```
|
||||
|
||||
## Docker
|
||||
@@ -30,11 +29,10 @@ make docker-build
|
||||
```
|
||||
|
||||
This will install the binaries on the `./build` directory. Now, check that the binaries have been
|
||||
successfuly installed:
|
||||
successfully installed:
|
||||
|
||||
```bash
|
||||
ethermintd -h
|
||||
ethermintcli -h
|
||||
```
|
||||
|
||||
## Releases
|
||||
|
||||
@@ -23,12 +23,6 @@ to keep your binaries and configuration files.
|
||||
./init.sh
|
||||
```
|
||||
|
||||
In another terminal window or tab, run the Ethereum JSON-RPC server as well as the SDK REST server:
|
||||
|
||||
```bash
|
||||
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey --chain-id 8
|
||||
```
|
||||
|
||||
## Manual deployment
|
||||
|
||||
The instructions for setting up a brand new full node from scratch are the the same as running a
|
||||
@@ -39,15 +33,15 @@ The instructions for setting up a brand new full node from scratch are the the s
|
||||
To start your node, just type:
|
||||
|
||||
```bash
|
||||
ethermintd start
|
||||
ethermintd start --evm-rpc.enable=true --evm-rpc.api="eth,web3,net,txpool,debug"
|
||||
```
|
||||
|
||||
## Key Management
|
||||
|
||||
To run a node with the same key every time: replace `ethermintcli keys add $KEY` in `./init.sh` with:
|
||||
To run a node with the same key every time: replace `ethermintd keys add $KEY` in `./init.sh` with:
|
||||
|
||||
```bash
|
||||
echo "your mnemonic here" | ethermintcli keys add $KEY --recover
|
||||
echo "your mnemonic here" | ethermintd keys add $KEY --recover
|
||||
```
|
||||
|
||||
::: tip
|
||||
@@ -57,19 +51,19 @@ Ethermint currently only supports 24 word mnemonics.
|
||||
You can generate a new key/mnemonic with:
|
||||
|
||||
```bash
|
||||
ethermintcli keys add $KEY
|
||||
ethermintd keys add $KEY
|
||||
```
|
||||
|
||||
To export your ethermint key as an ethereum private key (for use with Metamask for example):
|
||||
|
||||
```bash
|
||||
ethermintcli keys unsafe-export-eth-key $KEY
|
||||
ethermintd keys unsafe-export-eth-key $KEY
|
||||
```
|
||||
|
||||
For more about the available key commands, use the `--help` flag
|
||||
|
||||
```bash
|
||||
ethermintcli keys -h
|
||||
ethermintd keys -h
|
||||
```
|
||||
|
||||
### Keyring backend options
|
||||
@@ -82,7 +76,7 @@ relevant command and the password prompt will occur through the command line. Th
|
||||
as a CLI config option with:
|
||||
|
||||
```bash
|
||||
ethermintcli config keyring-backend file
|
||||
ethermintd config keyring-backend file
|
||||
```
|
||||
|
||||
## Clearing data from chain
|
||||
@@ -110,10 +104,10 @@ Your node is now in a pristine state while keeping the original `priv_validator.
|
||||
|
||||
### Delete Data
|
||||
|
||||
Data for the Daemon and CLI binaries should be stored at `~/.ethermintd` and `~/.ethermintcli`, respectively by default. To **delete** the existing binaries and configuration, run:
|
||||
Data for the Daemon and CLI binaries should be stored at `~/.ethermintd`, respectively by default. To **delete** the existing binaries and configuration, run:
|
||||
|
||||
```bash
|
||||
rm -rf ~/.emint*
|
||||
rm -rf ~/.ethermintd
|
||||
```
|
||||
|
||||
To clear all data except key storage (if keyring backend chosen) and then you can rerun the full node installation commands from above to start the node again.
|
||||
|
||||
+15
-15
@@ -58,12 +58,12 @@ minimum-gas-prices = ""
|
||||
|
||||
```bash
|
||||
# Create a key to hold your account
|
||||
ethermintcli keys add $KEY
|
||||
ethermintd keys add $KEY
|
||||
|
||||
# Add that key into the genesis.app_state.accounts array in the genesis file
|
||||
# NOTE: this command lets you set the number of coins. Make sure this account has some coins
|
||||
# with the genesis.app_state.staking.params.bond_denom denom, the default is staking
|
||||
ethermintd add-genesis-account $(ethermintcli keys show validator -a) 1000000000stake,10000000000aphoton
|
||||
ethermintd add-genesis-account $(ethermintd keys show validator -a) 1000000000stake,10000000000aphoton
|
||||
|
||||
# Generate the transaction that creates your validator
|
||||
ethermintd gentx --name $KEY
|
||||
@@ -141,7 +141,7 @@ calling the `ethermintd testnet` command. This outputs a handful of files in the
|
||||
tree -L 3 build/
|
||||
|
||||
build/
|
||||
├── ethermintcli
|
||||
├── ethermintd
|
||||
├── ethermintd
|
||||
├── gentxs
|
||||
│ ├── node0.json
|
||||
@@ -149,7 +149,7 @@ build/
|
||||
│ ├── node2.json
|
||||
│ └── node3.json
|
||||
├── node0
|
||||
│ ├── ethermintcli
|
||||
│ ├── ethermintd
|
||||
│ │ ├── key_seed.json
|
||||
│ │ └── keyring-test-cosmos
|
||||
│ └── ethermintd
|
||||
@@ -157,7 +157,7 @@ build/
|
||||
│ ├── data
|
||||
│ └── ethermintd.log
|
||||
├── node1
|
||||
│ ├── ethermintcli
|
||||
│ ├── ethermintd
|
||||
│ │ ├── key_seed.json
|
||||
│ │ └── keyring-test-cosmos
|
||||
│ └── ethermintd
|
||||
@@ -165,7 +165,7 @@ build/
|
||||
│ ├── data
|
||||
│ └── ethermintd.log
|
||||
├── node2
|
||||
│ ├── ethermintcli
|
||||
│ ├── ethermintd
|
||||
│ │ ├── key_seed.json
|
||||
│ │ └── keyring-test-cosmos
|
||||
│ └── ethermintd
|
||||
@@ -173,7 +173,7 @@ build/
|
||||
│ ├── data
|
||||
│ └── ethermintd.log
|
||||
└── node3
|
||||
├── ethermintcli
|
||||
├── ethermintd
|
||||
│ ├── key_seed.json
|
||||
│ └── keyring-test-cosmos
|
||||
└── ethermintd
|
||||
@@ -193,7 +193,7 @@ In order to see the logs of a particular node you can use the following command:
|
||||
docker exec ethermintdnode0 tail ethermintd.log
|
||||
|
||||
# node 0: REST & RPC logs
|
||||
docker exec ethermintdnode0 tail ethermintcli.log
|
||||
docker exec ethermintdnode0 tail ethermintd.log
|
||||
```
|
||||
|
||||
The logs for the daemon will look like:
|
||||
@@ -240,9 +240,9 @@ docker logs -f ethermintdnode0
|
||||
|
||||
To interact with the testnet via WebSockets or RPC/API, you will send your request to the corresponding ports:
|
||||
|
||||
| Eth JSON-RPC | Eth WS |
|
||||
|--------------|--------|
|
||||
| `8545` | `8546` |
|
||||
| EVM JSON-RPC | Eth Websocket |
|
||||
|--------------|---------------|
|
||||
| `8545` | `8546` |
|
||||
|
||||
You can send a curl command such as:
|
||||
|
||||
@@ -258,18 +258,18 @@ Additional instructions on how to interact with the WebSocket can be found on th
|
||||
|
||||
### Keys & Accounts
|
||||
|
||||
To interact with `ethermintcli` and start querying state or creating txs, you use the
|
||||
`ethermintcli` directory of any given node as your `home`, for example:
|
||||
To interact with `ethermintd` and start querying state or creating txs, you use the
|
||||
`ethermintd` directory of any given node as your `home`, for example:
|
||||
|
||||
```bash
|
||||
ethermintcli keys list --home ./build/node0/ethermintcli
|
||||
ethermintd keys list --home ./build/node0/ethermintd
|
||||
```
|
||||
|
||||
Now that accounts exists, you may create new accounts and send those accounts
|
||||
funds!
|
||||
|
||||
::: tip
|
||||
**Note**: Each node's seed is located at `./build/nodeN/ethermintcli/key_seed.json` and can be restored to the CLI using the `ethermintcli keys add --restore` command
|
||||
**Note**: Each node's seed is located at `./build/nodeN/ethermintd/key_seed.json` and can be restored to the CLI using the `ethermintd keys add --restore` command
|
||||
:::
|
||||
|
||||
### Special Binaries
|
||||
|
||||
@@ -32,7 +32,7 @@ ethermintd tendermint show-validator
|
||||
To create your validator, just use the following command:
|
||||
|
||||
```bash
|
||||
ethermintcli tx staking create-validator \
|
||||
ethermintd tx staking create-validator \
|
||||
--amount=1000000aphoton \
|
||||
--pubkey=$(ethermintd tendermint show-validator) \
|
||||
--moniker=<ethermint_validator> \
|
||||
@@ -51,7 +51,7 @@ When specifying commission parameters, the `commission-max-change-rate` is used
|
||||
:::
|
||||
|
||||
::: tip
|
||||
`Min-self-delegation` is a stritly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. A `min-self-delegation` of 1 means your validator will never have a self-delegation lower than `1000000aphoton`
|
||||
`Min-self-delegation` is a strictly positive integer that represents the minimum amount of self-delegated voting power your validator must always have. A `min-self-delegation` of 1 means your validator will never have a self-delegation lower than `1000000aphoton`
|
||||
:::
|
||||
|
||||
You can confirm that you are in the validator set by using a third party explorer.
|
||||
@@ -69,7 +69,7 @@ A `gentx` does three things:
|
||||
If you want to participate in genesis as a validator, you need to justify that
|
||||
you have some stake at genesis, create one (or multiple) transactions to bond this stake to your validator address, and include this transaction in the genesis file.
|
||||
|
||||
Your `cosmosvalconspub`, as shown on the section above, can be used to create a validator transaction on genesis as well.
|
||||
Your `ethvalconspub`, as shown on the section above, can be used to create a validator transaction on genesis as well.
|
||||
|
||||
Next, craft your `ethermintd gentx` command:
|
||||
|
||||
@@ -96,7 +96,7 @@ For more on `gentx`, use the help flag: `ethermintd gentx -h`
|
||||
Your validator is active if the following command returns anything:
|
||||
|
||||
```bash
|
||||
ethermintcli query tendermint-validator-set | grep "$(ethermintd tendermint show-validator)"
|
||||
ethermintd query tendermint-validator-set | grep "$(ethermintd tendermint show-validator)"
|
||||
```
|
||||
|
||||
You should now see your validator in one of the block explorers. You are looking for the `bech32`
|
||||
|
||||
Reference in New Issue
Block a user