change binary name (#431)
This commit is contained in:
parent
5ff2b316cb
commit
bcca24f752
@ -23,8 +23,8 @@ RUN apk add --update ca-certificates
|
|||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
# Copy over binaries from the build-env
|
# Copy over binaries from the build-env
|
||||||
COPY --from=build-env /go/src/github.com/Chainsafe/ethermint/build/emintd /usr/bin/emintd
|
COPY --from=build-env /go/src/github.com/Chainsafe/ethermint/build/ethermintd /usr/bin/ethermintd
|
||||||
COPY --from=build-env /go/src/github.com/Chainsafe/ethermint/build/emintcli /usr/bin/emintcli
|
COPY --from=build-env /go/src/github.com/Chainsafe/ethermint/build/ethermintcli /usr/bin/ethermintcli
|
||||||
|
|
||||||
# Run emintd by default
|
# Run ethermintd by default
|
||||||
CMD ["emintd"]
|
CMD ["ethermintd"]
|
||||||
|
14
Makefile
14
Makefile
@ -19,8 +19,8 @@ COMMIT := $(shell git log -1 --format='%H')
|
|||||||
PACKAGES=$(shell go list ./... | grep -Ev 'vendor|importer|rpc/tester')
|
PACKAGES=$(shell go list ./... | grep -Ev 'vendor|importer|rpc/tester')
|
||||||
DOCKER_TAG = unstable
|
DOCKER_TAG = unstable
|
||||||
DOCKER_IMAGE = cosmos/ethermint
|
DOCKER_IMAGE = cosmos/ethermint
|
||||||
ETHERMINT_DAEMON_BINARY = emintd
|
ETHERMINT_DAEMON_BINARY = ethermintd
|
||||||
ETHERMINT_CLI_BINARY = emintcli
|
ETHERMINT_CLI_BINARY = ethermintcli
|
||||||
GO_MOD=GO111MODULE=on
|
GO_MOD=GO111MODULE=on
|
||||||
BINDIR ?= $(GOPATH)/bin
|
BINDIR ?= $(GOPATH)/bin
|
||||||
BUILDDIR ?= $(CURDIR)/build
|
BUILDDIR ?= $(CURDIR)/build
|
||||||
@ -139,11 +139,11 @@ docker:
|
|||||||
docker create --name ethermint -t -i cosmos/ethermint:latest ethermint
|
docker create --name ethermint -t -i cosmos/ethermint:latest ethermint
|
||||||
# move the binaries to the ./build directory
|
# move the binaries to the ./build directory
|
||||||
mkdir -p ./build/
|
mkdir -p ./build/
|
||||||
docker cp ethermint:/usr/bin/emintd ./build/ ; \
|
docker cp ethermint:/usr/bin/ethermintd ./build/ ; \
|
||||||
docker cp ethermint:/usr/bin/emintcli ./build/
|
docker cp ethermint:/usr/bin/ethermintcli ./build/
|
||||||
|
|
||||||
docker-localnet:
|
docker-localnet:
|
||||||
docker build -f ./networks/local/ethermintnode/Dockerfile . -t emintd/node
|
docker build -f ./networks/local/ethermintnode/Dockerfile . -t ethermintd/node
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
### Tools & Dependencies ###
|
### Tools & Dependencies ###
|
||||||
@ -340,13 +340,13 @@ ifeq ($(OS),Windows_NT)
|
|||||||
mkdir build &
|
mkdir build &
|
||||||
@$(MAKE) docker-localnet
|
@$(MAKE) docker-localnet
|
||||||
|
|
||||||
IF not exist "build/node0/$(ETHERMINT_DAEMON_BINARY)/config/genesis.json" docker run --rm -v $(CURDIR)/build\ethermint\Z emintd/node "emintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"
|
IF not exist "build/node0/$(ETHERMINT_DAEMON_BINARY)/config/genesis.json" docker run --rm -v $(CURDIR)/build\ethermint\Z ethermintd/node "ethermintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
else
|
else
|
||||||
mkdir -p ./build/
|
mkdir -p ./build/
|
||||||
@$(MAKE) docker-localnet
|
@$(MAKE) docker-localnet
|
||||||
|
|
||||||
if ! [ -f build/node0/$(ETHERMINT_DAEMON_BINARY)/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/ethermint:Z emintd/node "emintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"; fi
|
if ! [ -f build/node0/$(ETHERMINT_DAEMON_BINARY)/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/ethermint:Z ethermintd/node "ethermintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"; fi
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -47,10 +47,10 @@ const appName = "Ethermint"
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// DefaultCLIHome sets the default home directories for the application CLI
|
// DefaultCLIHome sets the default home directories for the application CLI
|
||||||
DefaultCLIHome = os.ExpandEnv("$HOME/.emintcli")
|
DefaultCLIHome = os.ExpandEnv("$HOME/.ethermintcli")
|
||||||
|
|
||||||
// DefaultNodeHome sets the folder where the applcation data and configuration will be stored
|
// DefaultNodeHome sets the folder where the applcation data and configuration will be stored
|
||||||
DefaultNodeHome = os.ExpandEnv("$HOME/.emintd")
|
DefaultNodeHome = os.ExpandEnv("$HOME/.ethermintd")
|
||||||
|
|
||||||
// ModuleBasics defines the module BasicManager is in charge of setting up basic,
|
// ModuleBasics defines the module BasicManager is in charge of setting up basic,
|
||||||
// non-dependant module elements, such as codec registration
|
// non-dependant module elements, such as codec registration
|
||||||
|
@ -64,7 +64,7 @@ necessary files (private validator, genesis, config, etc.).
|
|||||||
|
|
||||||
Note, strict routability for addresses is turned off in the config file.`,
|
Note, strict routability for addresses is turned off in the config file.`,
|
||||||
|
|
||||||
Example: "emintd testnet --v 4 --keyring-backend test --output-dir ./output --starting-ip-address 192.168.10.2",
|
Example: "ethermintd testnet --v 4 --keyring-backend test --output-dir ./output --starting-ip-address 192.168.10.2",
|
||||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||||
config := ctx.Config
|
config := ctx.Config
|
||||||
|
|
||||||
@ -88,8 +88,8 @@ Note, strict routability for addresses is turned off in the config file.`,
|
|||||||
cmd.Flags().Int(flagNumValidators, 4, "Number of validators to initialize the testnet with")
|
cmd.Flags().Int(flagNumValidators, 4, "Number of validators to initialize the testnet with")
|
||||||
cmd.Flags().StringP(flagOutputDir, "o", "./build", "Directory to store initialization data for the testnet")
|
cmd.Flags().StringP(flagOutputDir, "o", "./build", "Directory to store initialization data for the testnet")
|
||||||
cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)")
|
cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)")
|
||||||
cmd.Flags().String(flagNodeDaemonHome, "emintd", "Home directory of the node's daemon configuration")
|
cmd.Flags().String(flagNodeDaemonHome, "ethermintd", "Home directory of the node's daemon configuration")
|
||||||
cmd.Flags().String(flagNodeCLIHome, "emintcli", "Home directory of the node's cli configuration")
|
cmd.Flags().String(flagNodeCLIHome, "ethermintcli", "Home directory of the node's cli configuration")
|
||||||
cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)")
|
cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)")
|
||||||
cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
|
cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
|
||||||
cmd.Flags().String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", types.DenomDefault), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photon,0.001stake)")
|
cmd.Flags().String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", types.DenomDefault), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photon,0.001stake)")
|
||||||
|
@ -49,8 +49,8 @@ func main() {
|
|||||||
config.Seal()
|
config.Seal()
|
||||||
|
|
||||||
rootCmd := &cobra.Command{
|
rootCmd := &cobra.Command{
|
||||||
Use: "emintcli",
|
Use: "ethermintcli",
|
||||||
Short: "Command line interface for interacting with emintd",
|
Short: "Command line interface for interacting with ethermintd",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add --chain-id to persistent flags and mark it required
|
// Add --chain-id to persistent flags and mark it required
|
@ -59,7 +59,7 @@ func main() {
|
|||||||
ctx := server.NewDefaultContext()
|
ctx := server.NewDefaultContext()
|
||||||
|
|
||||||
rootCmd := &cobra.Command{
|
rootCmd := &cobra.Command{
|
||||||
Use: "emintd",
|
Use: "ethermintd",
|
||||||
Short: "Ethermint App Daemon (server)",
|
Short: "Ethermint App Daemon (server)",
|
||||||
PersistentPreRunE: server.PersistentPreRunEFn(ctx),
|
PersistentPreRunE: server.PersistentPreRunEFn(ctx),
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
emintdnode0:
|
ethermintdnode0:
|
||||||
container_name: emintdnode0
|
container_name: ethermintdnode0
|
||||||
image: "emintd/node"
|
image: "ethermintd/node"
|
||||||
ports:
|
ports:
|
||||||
- "26656-26657:26656-26657"
|
- "26656-26657:26656-26657"
|
||||||
- "1317:1317"
|
- "1317:1317"
|
||||||
@ -11,7 +11,7 @@ services:
|
|||||||
- "8546:8546"
|
- "8546:8546"
|
||||||
environment:
|
environment:
|
||||||
- ID=0
|
- ID=0
|
||||||
- LOG=${LOG:-emintd.log}
|
- LOG=${LOG:-ethermintd.log}
|
||||||
volumes:
|
volumes:
|
||||||
- ./build:/ethermint:Z
|
- ./build:/ethermint:Z
|
||||||
networks:
|
networks:
|
||||||
@ -19,9 +19,9 @@ services:
|
|||||||
ipv4_address: 192.168.10.2
|
ipv4_address: 192.168.10.2
|
||||||
entrypoint: "bash start.sh"
|
entrypoint: "bash start.sh"
|
||||||
|
|
||||||
emintdnode1:
|
ethermintdnode1:
|
||||||
container_name: emintdnode1
|
container_name: ethermintdnode1
|
||||||
image: "emintd/node"
|
image: "ethermintd/node"
|
||||||
ports:
|
ports:
|
||||||
- "26659-26660:26656-26657"
|
- "26659-26660:26656-26657"
|
||||||
- "1318:1317"
|
- "1318:1317"
|
||||||
@ -29,7 +29,7 @@ services:
|
|||||||
- "8546:8546"
|
- "8546:8546"
|
||||||
environment:
|
environment:
|
||||||
- ID=1
|
- ID=1
|
||||||
- LOG=${LOG:-emintd.log}
|
- LOG=${LOG:-ethermintd.log}
|
||||||
volumes:
|
volumes:
|
||||||
- ./build:/ethermint:Z
|
- ./build:/ethermint:Z
|
||||||
networks:
|
networks:
|
||||||
@ -37,12 +37,12 @@ services:
|
|||||||
ipv4_address: 192.168.10.3
|
ipv4_address: 192.168.10.3
|
||||||
entrypoint: "bash start.sh"
|
entrypoint: "bash start.sh"
|
||||||
|
|
||||||
emintdnode2:
|
ethermintdnode2:
|
||||||
container_name: emintdnode2
|
container_name: ethermintdnode2
|
||||||
image: "emintd/node"
|
image: "ethermintd/node"
|
||||||
environment:
|
environment:
|
||||||
- ID=2
|
- ID=2
|
||||||
- LOG=${LOG:-emintd.log}
|
- LOG=${LOG:-ethermintd.log}
|
||||||
ports:
|
ports:
|
||||||
- "26661-26662:26656-26657"
|
- "26661-26662:26656-26657"
|
||||||
- "1319:1317"
|
- "1319:1317"
|
||||||
@ -55,12 +55,12 @@ services:
|
|||||||
ipv4_address: 192.168.10.4
|
ipv4_address: 192.168.10.4
|
||||||
entrypoint: "bash start.sh"
|
entrypoint: "bash start.sh"
|
||||||
|
|
||||||
emintdnode3:
|
ethermintdnode3:
|
||||||
container_name: emintdnode3
|
container_name: ethermintdnode3
|
||||||
image: "emintd/node"
|
image: "ethermintd/node"
|
||||||
environment:
|
environment:
|
||||||
- ID=3
|
- ID=3
|
||||||
- LOG=${LOG:-emintd.log}
|
- LOG=${LOG:-ethermintd.log}
|
||||||
ports:
|
ports:
|
||||||
- "26663-26664:26656-26657"
|
- "26663-26664:26656-26657"
|
||||||
- "1320:1317"
|
- "1320:1317"
|
||||||
|
@ -11,7 +11,7 @@ Connect your Metamask wallet with Ethermint on a localnet mode. {synopsis}
|
|||||||
Start the Ethermint node using your terminal:
|
Start the Ethermint node using your terminal:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info"
|
ethermintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info"
|
||||||
```
|
```
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
@ -21,7 +21,7 @@ You can also start a node from scratch by running `./init.sh` from the Ethermint
|
|||||||
In another tab start the REST server. Here replace `mykey` with the name of the key that you want to use and set the `chain-id` the chain identifier of your application.
|
In another tab start the REST server. Here replace `mykey` with the name of the key that you want to use and set the `chain-id` the chain identifier of your application.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey --chain-id 1
|
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey --chain-id 1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Adding a custom Network for Ethermint
|
## Adding a custom Network for Ethermint
|
||||||
@ -44,7 +44,7 @@ Now you can export your private key from the terminal using the following comman
|
|||||||
to replace `mykey` with the name of the key that you want to export:
|
to replace `mykey` with the name of the key that you want to export:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli keys unsafe-export-eth-key mykey
|
ethermintcli keys unsafe-export-eth-key mykey
|
||||||
```
|
```
|
||||||
|
|
||||||
Go back to the browser and select the `Private Key` option. Then paste the private key exported from
|
Go back to the browser and select the `Private Key` option. Then paste the private key exported from
|
||||||
|
@ -119,7 +119,7 @@ For further information on how to run a node, please refer to [this](./../quicks
|
|||||||
In another Terminal wintdow/tab, start the [REST and JSON-RPC server](./../quickstart/clients.md#rest-and-tendermint-rpc.md):
|
In another Terminal wintdow/tab, start the [REST and JSON-RPC server](./../quickstart/clients.md#rest-and-tendermint-rpc.md):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey--chain-id 8 --trace
|
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey--chain-id 8 --trace
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deploy contract
|
## Deploy contract
|
||||||
|
@ -18,10 +18,10 @@ Ethermint is integrated with a CLI client that can be used to send transactions
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# available query commands
|
# available query commands
|
||||||
emintcli query -h
|
ethermintcli query -h
|
||||||
|
|
||||||
# available transaction commands
|
# available transaction commands
|
||||||
emintcli tx -h
|
ethermintcli tx -h
|
||||||
```
|
```
|
||||||
|
|
||||||
### Client Servers
|
### Client Servers
|
||||||
@ -32,11 +32,11 @@ The Ethermint client supports both [REST endpoints](https://cosmos.network/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.
|
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 (`emintd`) and then execute (in another
|
To run the REST Server, you need to run the Ethermint daemon (`ethermintd`) and then execute (in another
|
||||||
process):
|
process):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli rest-server --laddr "tcp://localhost:8545" --unlock-key $KEY --chain-id $CHAINID --trace
|
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.
|
You should see the logs from the REST and the RPC server.
|
||||||
|
@ -90,7 +90,7 @@ To start a connection with the Tendermint websocket you need to define the addre
|
|||||||
flag when initializing the REST server (default `tcp://localhost:26657`):
|
flag when initializing the REST server (default `tcp://localhost:26657`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli rest-server --laddr "tcp://localhost:8545" --node "tcp://localhost:8080" --unlock-key <my_key> --chain-id <chain_id>
|
ethermintcli rest-server --laddr "tcp://localhost:8545" --node "tcp://localhost:8080" --unlock-key <my_key> --chain-id <chain_id>
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, start a websocket subscription with [ws](https://github.com/hashrocket/ws)
|
Then, start a websocket subscription with [ws](https://github.com/hashrocket/ws)
|
||||||
@ -115,7 +115,7 @@ You can start a connection with the Ethereum websocket using the `--wsport` flag
|
|||||||
the REST server (default `8546`):
|
the REST server (default `8546`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli rest-server --laddr "tcp://localhost:8545" --wsport 8546 --unlock-key <my_key> --chain-id <chain_id>
|
ethermintcli rest-server --laddr "tcp://localhost:8545" --wsport 8546 --unlock-key <my_key> --chain-id <chain_id>
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, start a websocket subscription with [ws](https://github.com/hashrocket/ws)
|
Then, start a websocket subscription with [ws](https://github.com/hashrocket/ws)
|
||||||
|
@ -17,8 +17,8 @@ make install
|
|||||||
Check that the binaries have been successfuly installed:
|
Check that the binaries have been successfuly installed:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd -h
|
ethermintd -h
|
||||||
emintcli -h
|
ethermintcli -h
|
||||||
```
|
```
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
@ -33,8 +33,8 @@ This will install the binaries on the `./build` directory. Now, check that the b
|
|||||||
successfuly installed:
|
successfuly installed:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd -h
|
ethermintd -h
|
||||||
emintcli -h
|
ethermintcli -h
|
||||||
```
|
```
|
||||||
|
|
||||||
## Releases
|
## Releases
|
||||||
|
@ -26,7 +26,7 @@ to keep your binaries and configuration files.
|
|||||||
In another terminal window or tab, run the Ethereum JSON-RPC server as well as the SDK REST server:
|
In another terminal window or tab, run the Ethereum JSON-RPC server as well as the SDK REST server:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey --chain-id 8
|
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key mykey --chain-id 8
|
||||||
```
|
```
|
||||||
|
|
||||||
## Manual deployment
|
## Manual deployment
|
||||||
@ -39,15 +39,15 @@ The instructions for setting up a brand new full node from scratch are the the s
|
|||||||
To start your node, just type:
|
To start your node, just type:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd start
|
ethermintd start
|
||||||
```
|
```
|
||||||
|
|
||||||
## Key Management
|
## Key Management
|
||||||
|
|
||||||
To run a node with the same key every time: replace `emintcli keys add $KEY` in `./init.sh` with:
|
To run a node with the same key every time: replace `ethermintcli keys add $KEY` in `./init.sh` with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo "your mnemonic here" | emintcli keys add $KEY --recover
|
echo "your mnemonic here" | ethermintcli keys add $KEY --recover
|
||||||
```
|
```
|
||||||
|
|
||||||
::: tip Ethermint currently only supports 24 word mnemonics.
|
::: tip Ethermint currently only supports 24 word mnemonics.
|
||||||
@ -56,19 +56,19 @@ echo "your mnemonic here" | emintcli keys add $KEY --recover
|
|||||||
You can generate a new key/mnemonic with:
|
You can generate a new key/mnemonic with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli keys add $KEY
|
ethermintcli 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 for example):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli keys unsafe-export-eth-key $KEY
|
ethermintcli keys unsafe-export-eth-key $KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
For more about the available key commands, use the `--help` flag
|
For more about the available key commands, use the `--help` flag
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli keys -h
|
ethermintcli keys -h
|
||||||
```
|
```
|
||||||
|
|
||||||
### Keyring backend options
|
### Keyring backend options
|
||||||
@ -81,7 +81,7 @@ relevant command and the password prompt will occur through the command line. Th
|
|||||||
as a CLI config option with:
|
as a CLI config option with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli config keyring-backend file
|
ethermintcli config keyring-backend file
|
||||||
```
|
```
|
||||||
|
|
||||||
## Clearing data from chain
|
## Clearing data from chain
|
||||||
@ -91,7 +91,7 @@ emintcli config keyring-backend file
|
|||||||
Alternatively, you can **reset** the blockchain database, remove the node's address book files, and reset the `priv_validator.json` to the genesis state.
|
Alternatively, you can **reset** the blockchain database, remove the node's address book files, and reset the `priv_validator.json` to the genesis state.
|
||||||
|
|
||||||
::: danger
|
::: danger
|
||||||
If you are running a **validator node**, always be careful when doing `emintd unsafe-reset-all`. You should never use this command if you are not switching `chain-id`.
|
If you are running a **validator node**, always be careful when doing `ethermintd unsafe-reset-all`. You should never use this command if you are not switching `chain-id`.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::: danger
|
::: danger
|
||||||
@ -101,15 +101,15 @@ If you are running a **validator node**, always be careful when doing `emintd un
|
|||||||
First, remove the outdated files and reset the data.
|
First, remove the outdated files and reset the data.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rm $HOME/.emintd/config/addrbook.json $HOME/.emintd/config/genesis.json
|
rm $HOME/.ethermintd/config/addrbook.json $HOME/.ethermintd/config/genesis.json
|
||||||
emintd unsafe-reset-all
|
ethermintd unsafe-reset-all
|
||||||
```
|
```
|
||||||
|
|
||||||
Your node is now in a pristine state while keeping the original `priv_validator.json` and `config.toml`. If you had any sentry nodes or full nodes setup before, your node will still try to connect to them, but may fail if they haven't also been upgraded.
|
Your node is now in a pristine state while keeping the original `priv_validator.json` and `config.toml`. If you had any sentry nodes or full nodes setup before, your node will still try to connect to them, but may fail if they haven't also been upgraded.
|
||||||
|
|
||||||
### Delete Data
|
### Delete Data
|
||||||
|
|
||||||
Data for the Daemon and CLI binaries should be stored at `~/.emintd` and `~/.emintcli`, respectively by default. To **delete** the existing binaries and configuration, run:
|
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:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rm -rf ~/.emint*
|
rm -rf ~/.emint*
|
||||||
|
@ -24,21 +24,21 @@ $MONIKER=testing
|
|||||||
$KEY=mykey
|
$KEY=mykey
|
||||||
$CHAINID=8
|
$CHAINID=8
|
||||||
|
|
||||||
emintd init $MONIKER --chain-id=$CHAINID
|
ethermintd init $MONIKER --chain-id=$CHAINID
|
||||||
```
|
```
|
||||||
|
|
||||||
::: warning
|
::: warning
|
||||||
Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable.
|
Monikers can contain only ASCII characters. Using Unicode characters will render your node unreachable.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
You can edit this `moniker` later, in the `$(HOME)/.emintd/config/config.toml` file:
|
You can edit this `moniker` later, in the `$(HOME)/.ethermintd/config/config.toml` file:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# A custom human readable name for this node
|
# A custom human readable name for this node
|
||||||
moniker = "<your_custom_moniker>"
|
moniker = "<your_custom_moniker>"
|
||||||
```
|
```
|
||||||
|
|
||||||
You can edit the `$HOME/.emintd/config/app.toml` file in order to enable the anti spam mechanism and reject incoming transactions with less than the minimum gas prices:
|
You can edit the `$HOME/.ethermintd/config/app.toml` file in order to enable the anti spam mechanism and reject incoming transactions with less than the minimum gas prices:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# This is a TOML config file.
|
# This is a TOML config file.
|
||||||
@ -57,21 +57,21 @@ minimum-gas-prices = ""
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create a key to hold your account
|
# Create a key to hold your account
|
||||||
emintcli keys add $KEY
|
ethermintcli keys add $KEY
|
||||||
|
|
||||||
# Add that key into the genesis.app_state.accounts array in the genesis file
|
# 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
|
# 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
|
# with the genesis.app_state.staking.params.bond_denom denom, the default is staking
|
||||||
emintd add-genesis-account $(emintcli keys show validator -a) 1000000000stake,10000000000photon
|
ethermintd add-genesis-account $(ethermintcli keys show validator -a) 1000000000stake,10000000000photon
|
||||||
|
|
||||||
# Generate the transaction that creates your validator
|
# Generate the transaction that creates your validator
|
||||||
emintd gentx --name $KEY
|
ethermintd gentx --name $KEY
|
||||||
|
|
||||||
# Add the generated bonding transaction to the genesis file
|
# Add the generated bonding transaction to the genesis file
|
||||||
emintd collect-gentxs
|
ethermintd collect-gentxs
|
||||||
|
|
||||||
# Finally, check the correctness of the genesis.json file
|
# Finally, check the correctness of the genesis.json file
|
||||||
emintd validate-genesis
|
ethermintd validate-genesis
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run Testnet
|
### Run Testnet
|
||||||
@ -79,7 +79,7 @@ emintd validate-genesis
|
|||||||
Now its safe to start the daemon:
|
Now its safe to start the daemon:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd start
|
ethermintd start
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then stop the node using Ctrl+C.
|
You can then stop the node using Ctrl+C.
|
||||||
@ -94,15 +94,15 @@ To build start a 4 node testnet run:
|
|||||||
make localnet-start
|
make localnet-start
|
||||||
```
|
```
|
||||||
|
|
||||||
This command creates a 4-node network using the `emintdnode` Docker image.
|
This command creates a 4-node network using the `ethermintdnode` Docker image.
|
||||||
The ports for each node are found in this table:
|
The ports for each node are found in this table:
|
||||||
|
|
||||||
| Node ID | P2P Port | REST/RPC Port |
|
| Node ID | P2P Port | REST/RPC Port |
|
||||||
|--------------|----------|---------------|
|
|------------------|----------|---------------|
|
||||||
| `emintnode0` | `26656` | `26657` |
|
| `ethermintnode0` | `26656` | `26657` |
|
||||||
| `emintnode1` | `26659` | `26660` |
|
| `ethermintnode1` | `26659` | `26660` |
|
||||||
| `emintnode2` | `26661` | `26662` |
|
| `ethermintnode2` | `26661` | `26662` |
|
||||||
| `emintnode3` | `26663` | `26664` |
|
| `ethermintnode3` | `26663` | `26664` |
|
||||||
|
|
||||||
To update the binary, just rebuild it and restart the nodes
|
To update the binary, just rebuild it and restart the nodes
|
||||||
|
|
||||||
@ -115,10 +115,10 @@ The command above command will run containers in the background using Docker co
|
|||||||
```bash
|
```bash
|
||||||
...
|
...
|
||||||
Creating network "chainsafe-ethermint_localnet" with driver "bridge"
|
Creating network "chainsafe-ethermint_localnet" with driver "bridge"
|
||||||
Creating emintdnode0 ... done
|
Creating ethermintdnode0 ... done
|
||||||
Creating emintdnode2 ... done
|
Creating ethermintdnode2 ... done
|
||||||
Creating emintdnode1 ... done
|
Creating ethermintdnode1 ... done
|
||||||
Creating emintdnode3 ... done
|
Creating ethermintdnode3 ... done
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -133,55 +133,55 @@ make localnet-stop
|
|||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
The `make localnet-start` creates files for a 4-node testnet in `./build` by
|
The `make localnet-start` creates files for a 4-node testnet in `./build` by
|
||||||
calling the `emintd testnet` command. This outputs a handful of files in the
|
calling the `ethermintd testnet` command. This outputs a handful of files in the
|
||||||
`./build` directory:
|
`./build` directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tree -L 3 build/
|
tree -L 3 build/
|
||||||
|
|
||||||
build/
|
build/
|
||||||
├── emintcli
|
├── ethermintcli
|
||||||
├── emintd
|
├── ethermintd
|
||||||
├── gentxs
|
├── gentxs
|
||||||
│ ├── node0.json
|
│ ├── node0.json
|
||||||
│ ├── node1.json
|
│ ├── node1.json
|
||||||
│ ├── node2.json
|
│ ├── node2.json
|
||||||
│ └── node3.json
|
│ └── node3.json
|
||||||
├── node0
|
├── node0
|
||||||
│ ├── emintcli
|
│ ├── ethermintcli
|
||||||
│ │ ├── key_seed.json
|
│ │ ├── key_seed.json
|
||||||
│ │ └── keyring-test-cosmos
|
│ │ └── keyring-test-cosmos
|
||||||
│ └── emintd
|
│ └── ethermintd
|
||||||
│ ├── config
|
│ ├── config
|
||||||
│ ├── data
|
│ ├── data
|
||||||
│ └── emintd.log
|
│ └── ethermintd.log
|
||||||
├── node1
|
├── node1
|
||||||
│ ├── emintcli
|
│ ├── ethermintcli
|
||||||
│ │ ├── key_seed.json
|
│ │ ├── key_seed.json
|
||||||
│ │ └── keyring-test-cosmos
|
│ │ └── keyring-test-cosmos
|
||||||
│ └── emintd
|
│ └── ethermintd
|
||||||
│ ├── config
|
│ ├── config
|
||||||
│ ├── data
|
│ ├── data
|
||||||
│ └── emintd.log
|
│ └── ethermintd.log
|
||||||
├── node2
|
├── node2
|
||||||
│ ├── emintcli
|
│ ├── ethermintcli
|
||||||
│ │ ├── key_seed.json
|
│ │ ├── key_seed.json
|
||||||
│ │ └── keyring-test-cosmos
|
│ │ └── keyring-test-cosmos
|
||||||
│ └── emintd
|
│ └── ethermintd
|
||||||
│ ├── config
|
│ ├── config
|
||||||
│ ├── data
|
│ ├── data
|
||||||
│ └── emintd.log
|
│ └── ethermintd.log
|
||||||
└── node3
|
└── node3
|
||||||
├── emintcli
|
├── ethermintcli
|
||||||
│ ├── key_seed.json
|
│ ├── key_seed.json
|
||||||
│ └── keyring-test-cosmos
|
│ └── keyring-test-cosmos
|
||||||
└── emintd
|
└── ethermintd
|
||||||
├── config
|
├── config
|
||||||
├── data
|
├── data
|
||||||
└── emintd.log
|
└── ethermintd.log
|
||||||
```
|
```
|
||||||
|
|
||||||
Each `./build/nodeN` directory is mounted to the `/emintd` directory in each container.
|
Each `./build/nodeN` directory is mounted to the `/ethermintd` directory in each container.
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|
||||||
@ -189,10 +189,10 @@ In order to see the logs of a particular node you can use the following command:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# node 0: daemon logs
|
# node 0: daemon logs
|
||||||
docker exec emintdnode0 tail emintd.log
|
docker exec ethermintdnode0 tail ethermintd.log
|
||||||
|
|
||||||
# node 0: REST & RPC logs
|
# node 0: REST & RPC logs
|
||||||
docker exec emintdnode0 tail emintcli.log
|
docker exec ethermintdnode0 tail ethermintcli.log
|
||||||
```
|
```
|
||||||
|
|
||||||
The logs for the daemon will look like:
|
The logs for the daemon will look like:
|
||||||
@ -230,7 +230,7 @@ You can also watch logs as they are produced via Docker with the `--follow` (`-f
|
|||||||
example:
|
example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker logs -f emintdnode0
|
docker logs -f ethermintdnode0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Interact With the Testnet
|
### Interact With the Testnet
|
||||||
@ -256,18 +256,18 @@ Additional instructions on how to interact with the WebSocket can be found on th
|
|||||||
|
|
||||||
### Keys & Accounts
|
### Keys & Accounts
|
||||||
|
|
||||||
To interact with `emintcli` and start querying state or creating txs, you use the
|
To interact with `ethermintcli` and start querying state or creating txs, you use the
|
||||||
`emintcli` directory of any given node as your `home`, for example:
|
`ethermintcli` directory of any given node as your `home`, for example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli keys list --home ./build/node0/emintcli
|
ethermintcli keys list --home ./build/node0/ethermintcli
|
||||||
```
|
```
|
||||||
|
|
||||||
Now that accounts exists, you may create new accounts and send those accounts
|
Now that accounts exists, you may create new accounts and send those accounts
|
||||||
funds!
|
funds!
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
**Note**: Each node's seed is located at `./build/nodeN/emintcli/key_seed.json` and can be restored to the CLI using the `emintcli keys add --restore` command
|
**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
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Special Binaries
|
### Special Binaries
|
||||||
@ -291,17 +291,17 @@ If you are looking to connect to a persistent public testnet. You will need to m
|
|||||||
If you want to start a network from scratch, you will need to start the [genesis procedure](#genesis-procedure) by creating a `genesis.json` and submit + collect the genesis transactions from the [validators](./validator-setup.md).
|
If you want to start a network from scratch, you will need to start the [genesis procedure](#genesis-procedure) by creating a `genesis.json` and submit + collect the genesis transactions from the [validators](./validator-setup.md).
|
||||||
:::
|
:::
|
||||||
|
|
||||||
If you want to connect to an existing testnet, fetch the testnet's `genesis.json` file and copy it into the `emintd`'s config directory (i.e `$HOME/.emintd/config/genesis.json`).
|
If you want to connect to an existing testnet, fetch the testnet's `genesis.json` file and copy it into the `ethermintd`'s config directory (i.e `$HOME/.ethermintd/config/genesis.json`).
|
||||||
|
|
||||||
Then verify the correctness of the genesis configuration file:
|
Then verify the correctness of the genesis configuration file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd validate-genesis
|
ethermintd validate-genesis
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Add Seed Nodes
|
#### Add Seed Nodes
|
||||||
|
|
||||||
Your node needs to know how to find peers. You'll need to add healthy seed nodes to `$HOME/.emintd/config/config.toml`. If those seeds aren't working, you can find more seeds and persistent peers on an existing explorer.
|
Your node needs to know how to find peers. You'll need to add healthy seed nodes to `$HOME/.ethermintd/config/config.toml`. If those seeds aren't working, you can find more seeds and persistent peers on an existing explorer.
|
||||||
|
|
||||||
For more information on seeds and peers, you can the Tendermint [P2P documentation](https://docs.tendermint.com/master/spec/p2p/peer.html).
|
For more information on seeds and peers, you can the Tendermint [P2P documentation](https://docs.tendermint.com/master/spec/p2p/peer.html).
|
||||||
|
|
||||||
@ -315,23 +315,23 @@ Once the ethermint daemon is up and running, you can request tokens to your addr
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# query your initial balance
|
# query your initial balance
|
||||||
emintcli q bank balances $(emintcli keys show <mykey> -a)
|
ethermintcli q bank balances $(ethermintcli keys show <mykey> -a)
|
||||||
|
|
||||||
# send a tx to request tokens to your account address
|
# send a tx to request tokens to your account address
|
||||||
emintcli tx faucet request 100photon --from <mykey>
|
ethermintcli tx faucet request 100photon --from <mykey>
|
||||||
|
|
||||||
# query your balance after the request
|
# query your balance after the request
|
||||||
emintcli q bank balances $(emintcli keys show <mykey> -a)
|
ethermintcli q bank balances $(ethermintcli keys show <mykey> -a)
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also check to total amount funded by the faucet and the total supply of the chain via:
|
You can also check to total amount funded by the faucet and the total supply of the chain via:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# total amount funded by the faucet
|
# total amount funded by the faucet
|
||||||
emintcli q faucet funded
|
ethermintcli q faucet funded
|
||||||
|
|
||||||
# total supply
|
# total supply
|
||||||
emintcli q supply total
|
ethermintcli q supply total
|
||||||
```
|
```
|
||||||
|
|
||||||
## Next {hide}
|
## Next {hide}
|
||||||
|
@ -10,7 +10,7 @@ Learn how to upgrade your full node to the latest software version {synopsis}
|
|||||||
|
|
||||||
These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet.
|
These instructions are for full nodes that have ran on previous versions of and would like to upgrade to the latest testnet.
|
||||||
|
|
||||||
First, stop your instance of `emintd`. Next, upgrade the software:
|
First, stop your instance of `ethermintd`. Next, upgrade the software:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ethermint
|
cd ethermint
|
||||||
@ -30,7 +30,7 @@ You will need to ensure that the version installed matches the one needed for th
|
|||||||
If the new version you are upgrading to has breaking changes, you will have to restart your chain. If it is **not** breaking, you can skip to [Restart](#restart-node).
|
If the new version you are upgrading to has breaking changes, you will have to restart your chain. If it is **not** breaking, you can skip to [Restart](#restart-node).
|
||||||
:::
|
:::
|
||||||
|
|
||||||
To upgrade the genesis file, you can either fetch it from a trusted source or export it locally using the `emintd export` command.
|
To upgrade the genesis file, you can either fetch it from a trusted source or export it locally using the `ethermintd export` command.
|
||||||
|
|
||||||
### Fetch from a Trusted Source
|
### Fetch from a Trusted Source
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ If you are joining an existing testnet, you can fetch the genesis from the appro
|
|||||||
Save the new genesis as `new_genesis.json`. Then, replace the old `genesis.json` with `new_genesis.json`.
|
Save the new genesis as `new_genesis.json`. Then, replace the old `genesis.json` with `new_genesis.json`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd $HOME/.emintd/config
|
cd $HOME/.ethermintd/config
|
||||||
cp -f genesis.json new_genesis.json
|
cp -f genesis.json new_genesis.json
|
||||||
mv new_genesis.json genesis.json
|
mv new_genesis.json genesis.json
|
||||||
```
|
```
|
||||||
@ -54,19 +54,19 @@ useful for manual analysis of the state at a given height.
|
|||||||
Export state with:
|
Export state with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd export > new_genesis.json
|
ethermintd export > new_genesis.json
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also export state from a particular height (at the end of processing the block of that height):
|
You can also export state from a particular height (at the end of processing the block of that height):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd export --height [height] > new_genesis.json
|
ethermintd export --height [height] > new_genesis.json
|
||||||
```
|
```
|
||||||
|
|
||||||
If you plan to start a new network for 0 height (i.e genesis) from the exported state, export with the `--for-zero-height` flag:
|
If you plan to start a new network for 0 height (i.e genesis) from the exported state, export with the `--for-zero-height` flag:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd export --height [height] --for-zero-height > new_genesis.json
|
ethermintd export --height [height] --for-zero-height > new_genesis.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, replace the old `genesis.json` with `new_genesis.json`.
|
Then, replace the old `genesis.json` with `new_genesis.json`.
|
||||||
@ -81,7 +81,7 @@ At this point, you might want to run a script to update the exported genesis int
|
|||||||
You can use the `migrate` command to migrate from a given version to the next one (eg: `v0.X.X` to `v1.X.X`):
|
You can use the `migrate` command to migrate from a given version to the next one (eg: `v0.X.X` to `v1.X.X`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd migrate [target-version] [/path/to/genesis.json] --chain-id=<new_chain_id> --genesis-time=<yyyy-mm-ddThh:mm:ssZ>
|
ethermintd migrate [target-version] [/path/to/genesis.json] --chain-id=<new_chain_id> --genesis-time=<yyyy-mm-ddThh:mm:ssZ>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Restart Node
|
## Restart Node
|
||||||
@ -89,7 +89,7 @@ emintd migrate [target-version] [/path/to/genesis.json] --chain-id=<new_chain_id
|
|||||||
To restart your node once the new genesis has been updated, use the `start` command:
|
To restart your node once the new genesis has been updated, use the `start` command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd start
|
ethermintd start
|
||||||
```
|
```
|
||||||
|
|
||||||
## Next {hide}
|
## Next {hide}
|
||||||
|
@ -26,15 +26,15 @@ You may want to skip the next section if you have already set up a [full node](.
|
|||||||
Your `cosmosvalconspub` consensus public key fron tendermint can be used to create a new validator by staking tokens. You can find your validator pubkey by running:
|
Your `cosmosvalconspub` consensus public key fron tendermint can be used to create a new validator by staking tokens. You can find your validator pubkey by running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd tendermint show-validator
|
ethermintd tendermint show-validator
|
||||||
```
|
```
|
||||||
|
|
||||||
To create your validator, just use the following command:
|
To create your validator, just use the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli tx staking create-validator \
|
ethermintcli tx staking create-validator \
|
||||||
--amount=1000000photon \
|
--amount=1000000photon \
|
||||||
--pubkey=$(emintd tendermint show-validator) \
|
--pubkey=$(ethermintd tendermint show-validator) \
|
||||||
--moniker=<ethermint_validator> \
|
--moniker=<ethermint_validator> \
|
||||||
--chain-id=<chain_id> \
|
--chain-id=<chain_id> \
|
||||||
--commission-rate="0.10" \
|
--commission-rate="0.10" \
|
||||||
@ -64,31 +64,31 @@ A `gentx` does three things:
|
|||||||
|
|
||||||
1. Makes the `validator` account you created into a validator operator account (i.e. the account that controls the validator).
|
1. Makes the `validator` account you created into a validator operator account (i.e. the account that controls the validator).
|
||||||
2. Self-delegates the provided `amount` of staking tokens.
|
2. Self-delegates the provided `amount` of staking tokens.
|
||||||
3. Link the operator account with a Tendermint node pubkey that will be used for signing blocks. If no `--pubkey` flag is provided, it defaults to the local node pubkey created via the `emintd init` command above.
|
3. Link the operator account with a Tendermint node pubkey that will be used for signing blocks. If no `--pubkey` flag is provided, it defaults to the local node pubkey created via the `ethermintd init` command above.
|
||||||
|
|
||||||
If you want to participate in genesis as a validator, you need to justify that
|
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.
|
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 `cosmosvalconspub`, as shown on the section above, can be used to create a validator transaction on genesis as well.
|
||||||
|
|
||||||
Next, craft your `emintd gentx` command:
|
Next, craft your `ethermintd gentx` command:
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
When specifying commission parameters, the `commission-max-change-rate` is used to measure % _point_ change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point.
|
When specifying commission parameters, the `commission-max-change-rate` is used to measure % _point_ change over the `commission-rate`. E.g. 1% to 2% is a 100% rate increase, but only 1 percentage point.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintd gentx \
|
ethermintd gentx \
|
||||||
--amount <amount_of_delegation_uatom> \
|
--amount <amount_of_delegation_uatom> \
|
||||||
--commission-rate <commission_rate> \
|
--commission-rate <commission_rate> \
|
||||||
--commission-max-rate <commission_max_rate> \
|
--commission-max-rate <commission_max_rate> \
|
||||||
--commission-max-change-rate <commission_max_change_rate> \
|
--commission-max-change-rate <commission_max_change_rate> \
|
||||||
--pubkey $(emintd tendermint show-validator) \
|
--pubkey $(ethermintd tendermint show-validator) \
|
||||||
--name $KEY
|
--name $KEY
|
||||||
```
|
```
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
For more on `gentx`, use the help flag: `emintd gentx -h`
|
For more on `gentx`, use the help flag: `ethermintd gentx -h`
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Confirm Your Validator is Running
|
## Confirm Your Validator is Running
|
||||||
@ -96,11 +96,11 @@ For more on `gentx`, use the help flag: `emintd gentx -h`
|
|||||||
Your validator is active if the following command returns anything:
|
Your validator is active if the following command returns anything:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emintcli query tendermint-validator-set | grep "$(emintd tendermint show-validator)"
|
ethermintcli 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`
|
You should now see your validator in one of the block explorers. You are looking for the `bech32`
|
||||||
encoded `address` in the `~/.emintd/config/priv_validator.json` file.
|
encoded `address` in the `~/.ethermintd/config/priv_validator.json` file.
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
To be in the validator set, you need to have more total voting power than the 100th validator.
|
To be in the validator set, you need to have more total voting power than the 100th validator.
|
||||||
@ -111,7 +111,7 @@ To be in the validator set, you need to have more total voting power than the 10
|
|||||||
When attempting to perform routine maintenance or planning for an upcoming coordinated
|
When attempting to perform routine maintenance or planning for an upcoming coordinated
|
||||||
upgrade, it can be useful to have your validator systematically and gracefully halt the chain and shutdown the node.
|
upgrade, it can be useful to have your validator systematically and gracefully halt the chain and shutdown the node.
|
||||||
|
|
||||||
You can achieve this by setting one of the following flags during when using the `emintd start` command:
|
You can achieve this by setting one of the following flags during when using the `ethermintd start` command:
|
||||||
|
|
||||||
- `--halt-height`: to the block height at which to shutdown the node
|
- `--halt-height`: to the block height at which to shutdown the node
|
||||||
- `--halt-time`: to the minimum block time (in Unix seconds) at which to shutdown the node
|
- `--halt-time`: to the minimum block time (in Unix seconds) at which to shutdown the node
|
||||||
|
32
init.sh
32
init.sh
@ -5,48 +5,48 @@ CHAINID=8
|
|||||||
MONIKER="localtestnet"
|
MONIKER="localtestnet"
|
||||||
|
|
||||||
# remove existing daemon and client
|
# remove existing daemon and client
|
||||||
rm -rf ~/.emint*
|
rm -rf ~/.ethermint*
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
emintcli config keyring-backend test
|
ethermintcli config keyring-backend test
|
||||||
|
|
||||||
# Set up config for CLI
|
# Set up config for CLI
|
||||||
emintcli config chain-id $CHAINID
|
ethermintcli config chain-id $CHAINID
|
||||||
emintcli config output json
|
ethermintcli config output json
|
||||||
emintcli config indent true
|
ethermintcli config indent true
|
||||||
emintcli config trust-node true
|
ethermintcli config trust-node true
|
||||||
|
|
||||||
# if $KEY exists it should be deleted
|
# if $KEY exists it should be deleted
|
||||||
emintcli keys add $KEY
|
ethermintcli keys add $KEY
|
||||||
|
|
||||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||||
emintd init $MONIKER --chain-id $CHAINID
|
ethermintd init $MONIKER --chain-id $CHAINID
|
||||||
|
|
||||||
# Allocate genesis accounts (cosmos formatted addresses)
|
# Allocate genesis accounts (cosmos formatted addresses)
|
||||||
emintd add-genesis-account $(emintcli keys show $KEY -a) 1000000000000000000photon,1000000000000000000stake
|
ethermintd add-genesis-account $(ethermintcli keys show $KEY -a) 1000000000000000000photon,1000000000000000000stake
|
||||||
|
|
||||||
# Sign genesis transaction
|
# Sign genesis transaction
|
||||||
emintd gentx --name $KEY --keyring-backend test
|
ethermintd gentx --name $KEY --keyring-backend test
|
||||||
|
|
||||||
# Collect genesis tx
|
# Collect genesis tx
|
||||||
emintd collect-gentxs
|
ethermintd collect-gentxs
|
||||||
|
|
||||||
# Enable faucet
|
# Enable faucet
|
||||||
cat $HOME/.emintd/config/genesis.json | jq '.app_state["faucet"]["enable_faucet"]=true' > $HOME/.emintd/config/tmp_genesis.json && mv $HOME/.emintd/config/tmp_genesis.json $HOME/.emintd/config/genesis.json
|
cat $HOME/.ethermintd/config/genesis.json | jq '.app_state["faucet"]["enable_faucet"]=true' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json
|
||||||
|
|
||||||
echo -e '\n\ntestnet faucet enabled'
|
echo -e '\n\ntestnet faucet enabled'
|
||||||
echo -e 'to transfer tokens to your account address use:'
|
echo -e 'to transfer tokens to your account address use:'
|
||||||
echo -e "emintcli tx faucet request 100photon --from $KEY\n"
|
echo -e "ethermintcli tx faucet request 100photon --from $KEY\n"
|
||||||
|
|
||||||
|
|
||||||
# Run this to ensure everything worked and that the genesis file is setup correctly
|
# Run this to ensure everything worked and that the genesis file is setup correctly
|
||||||
emintd validate-genesis
|
ethermintd validate-genesis
|
||||||
|
|
||||||
# Command to run the rest server in a different terminal/window
|
# Command to run the rest server in a different terminal/window
|
||||||
echo -e '\nrun the following command in a different terminal/window to run the REST server and JSON-RPC:'
|
echo -e '\nrun the following command in a different terminal/window to run the REST server and JSON-RPC:'
|
||||||
echo -e "emintcli rest-server --laddr \"tcp://localhost:8545\" --unlock-key $KEY --chain-id $CHAINID --trace\n"
|
echo -e "ethermintcli rest-server --laddr \"tcp://localhost:8545\" --unlock-key $KEY --chain-id $CHAINID --trace\n"
|
||||||
|
|
||||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||||
emintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info" --trace
|
ethermintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info" --trace
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
all:
|
all:
|
||||||
docker build --tag emintd/node ethermintnode
|
docker build --tag ethermintd/node ethermintnode
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
@ -22,11 +22,11 @@ WORKDIR /
|
|||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
# Copy over binaries from the build-env
|
# Copy over binaries from the build-env
|
||||||
COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/build/emintd /usr/bin/emintd
|
COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/build/ethermintd /usr/bin/ethermintd
|
||||||
COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/build/emintcli /usr/bin/emintcli
|
COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/build/ethermintcli /usr/bin/ethermintcli
|
||||||
COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/scripts/start.sh /
|
COPY --from=build-env /go/src/github.com/ChainSafe/ethermint/scripts/start.sh /
|
||||||
|
|
||||||
EXPOSE 26656 26657 1317 8545 8546
|
EXPOSE 26656 26657 1317 8545 8546
|
||||||
|
|
||||||
# Run emintd by default, omit entrypoint to ease using container with emintcli
|
# Run ethermintd by default, omit entrypoint to ease using container with ethermintcli
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
ENTRYPOINT ["/bin/bash", "-c"]
|
@ -18,7 +18,7 @@ KEY="mykey"
|
|||||||
CHAINID=8
|
CHAINID=8
|
||||||
MONIKER="mymoniker"
|
MONIKER="mymoniker"
|
||||||
|
|
||||||
## default port prefixes for emintd
|
## default port prefixes for ethermintd
|
||||||
NODE_P2P_PORT="2660"
|
NODE_P2P_PORT="2660"
|
||||||
NODE_PORT="2663"
|
NODE_PORT="2663"
|
||||||
NODE_RPC_PORT="2666"
|
NODE_RPC_PORT="2666"
|
||||||
@ -73,30 +73,30 @@ arrcli=()
|
|||||||
|
|
||||||
init_func() {
|
init_func() {
|
||||||
echo "create and add new keys"
|
echo "create and add new keys"
|
||||||
"$PWD"/build/emintcli config keyring-backend test --home "$DATA_CLI_DIR$i"
|
"$PWD"/build/ethermintcli config keyring-backend test --home "$DATA_CLI_DIR$i"
|
||||||
"$PWD"/build/emintcli keys add $KEY"$i" --home "$DATA_CLI_DIR$i" --no-backup --chain-id $CHAINID
|
"$PWD"/build/ethermintcli keys add $KEY"$i" --home "$DATA_CLI_DIR$i" --no-backup --chain-id $CHAINID
|
||||||
echo "init Ethermint with moniker=$MONIKER and chain-id=$CHAINID"
|
echo "init Ethermint with moniker=$MONIKER and chain-id=$CHAINID"
|
||||||
"$PWD"/build/emintd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
|
"$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i"
|
||||||
echo "init emintcli with chain-id=$CHAINID and config it trust-node true"
|
echo "init ethermintcli with chain-id=$CHAINID and config it trust-node true"
|
||||||
"$PWD"/build/emintcli config chain-id $CHAINID --home "$DATA_CLI_DIR$i"
|
"$PWD"/build/ethermintcli config chain-id $CHAINID --home "$DATA_CLI_DIR$i"
|
||||||
"$PWD"/build/emintcli config output json --home "$DATA_CLI_DIR$i"
|
"$PWD"/build/ethermintcli config output json --home "$DATA_CLI_DIR$i"
|
||||||
"$PWD"/build/emintcli config indent true --home "$DATA_CLI_DIR$i"
|
"$PWD"/build/ethermintcli config indent true --home "$DATA_CLI_DIR$i"
|
||||||
"$PWD"/build/emintcli config trust-node true --home "$DATA_CLI_DIR$i"
|
"$PWD"/build/ethermintcli config trust-node true --home "$DATA_CLI_DIR$i"
|
||||||
echo "prepare genesis: Allocate genesis accounts"
|
echo "prepare genesis: Allocate genesis accounts"
|
||||||
"$PWD"/build/emintd add-genesis-account \
|
"$PWD"/build/ethermintd add-genesis-account \
|
||||||
"$("$PWD"/build/emintcli keys show "$KEY$i" -a --home "$DATA_CLI_DIR$i" )" 1000000000000000000photon,1000000000000000000stake \
|
"$("$PWD"/build/ethermintcli keys show "$KEY$i" -a --home "$DATA_CLI_DIR$i" )" 1000000000000000000photon,1000000000000000000stake \
|
||||||
--home "$DATA_DIR$i" --home-client "$DATA_CLI_DIR$i"
|
--home "$DATA_DIR$i" --home-client "$DATA_CLI_DIR$i"
|
||||||
echo "prepare genesis: Sign genesis transaction"
|
echo "prepare genesis: Sign genesis transaction"
|
||||||
"$PWD"/build/emintd gentx --name $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --home-client "$DATA_CLI_DIR$i"
|
"$PWD"/build/ethermintd gentx --name $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --home-client "$DATA_CLI_DIR$i"
|
||||||
echo "prepare genesis: Collect genesis tx"
|
echo "prepare genesis: Collect genesis tx"
|
||||||
"$PWD"/build/emintd collect-gentxs --home "$DATA_DIR$i"
|
"$PWD"/build/ethermintd collect-gentxs --home "$DATA_DIR$i"
|
||||||
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
|
echo "prepare genesis: Run validate-genesis to ensure everything worked and that the genesis file is setup correctly"
|
||||||
"$PWD"/build/emintd validate-genesis --home "$DATA_DIR$i"
|
"$PWD"/build/ethermintd validate-genesis --home "$DATA_DIR$i"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_func() {
|
start_func() {
|
||||||
echo "starting ethermint node $i in background ..."
|
echo "starting ethermint node $i in background ..."
|
||||||
"$PWD"/build/emintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info" \
|
"$PWD"/build/ethermintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info" \
|
||||||
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
--p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
||||||
--home "$DATA_DIR$i" \
|
--home "$DATA_DIR$i" \
|
||||||
>"$DATA_DIR"/node"$i".log 2>&1 & disown
|
>"$DATA_DIR"/node"$i".log 2>&1 & disown
|
||||||
@ -109,13 +109,13 @@ start_func() {
|
|||||||
|
|
||||||
start_cli_func() {
|
start_cli_func() {
|
||||||
echo "starting ethermint node $i in background ..."
|
echo "starting ethermint node $i in background ..."
|
||||||
"$PWD"/build/emintcli rest-server --unlock-key $KEY"$i" --chain-id $CHAINID --trace \
|
"$PWD"/build/ethermintcli rest-server --unlock-key $KEY"$i" --chain-id $CHAINID --trace \
|
||||||
--laddr "tcp://localhost:$RPC_PORT$i" --node tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
--laddr "tcp://localhost:$RPC_PORT$i" --node tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \
|
||||||
--home "$DATA_CLI_DIR$i" --read-timeout 30 --write-timeout 30 \
|
--home "$DATA_CLI_DIR$i" --read-timeout 30 --write-timeout 30 \
|
||||||
>"$DATA_CLI_DIR"/cli"$i".log 2>&1 & disown
|
>"$DATA_CLI_DIR"/cli"$i".log 2>&1 & disown
|
||||||
|
|
||||||
ETHERMINT_CLI_PID=$!
|
ETHERMINT_CLI_PID=$!
|
||||||
echo "started emintcli node, pid=$ETHERMINT_CLI_PID"
|
echo "started ethermintcli node, pid=$ETHERMINT_CLI_PID"
|
||||||
# add PID to array
|
# add PID to array
|
||||||
arrcli+=("$ETHERMINT_CLI_PID")
|
arrcli+=("$ETHERMINT_CLI_PID")
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
emintd --home /ethermint/node$ID/emintd/ start > emintd.log &
|
ethermintd --home /ethermint/node$ID/ethermintd/ start > ethermintd.log &
|
||||||
sleep 5
|
sleep 5
|
||||||
emintcli rest-server --laddr "tcp://localhost:8545" --chain-id 7305661614933169792 --trace > emintcli.log &
|
ethermintcli rest-server --laddr "tcp://localhost:8545" --chain-id 7305661614933169792 --trace > ethermintcli.log &
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
@ -1,7 +1,7 @@
|
|||||||
// This is a test utility for Ethermint's Web3 JSON-RPC services.
|
// This is a test utility for Ethermint's Web3 JSON-RPC services.
|
||||||
//
|
//
|
||||||
// To run these tests please first ensure you have the emintd running
|
// To run these tests please first ensure you have the ethermintd running
|
||||||
// and have started the RPC service with `emintcli rest-server`.
|
// and have started the RPC service with `ethermintcli rest-server`.
|
||||||
//
|
//
|
||||||
// You can configure the desired ETHERMINT_NODE_HOST and ETHERMINT_INTEGRATION_TEST_MODE
|
// You can configure the desired ETHERMINT_NODE_HOST and ETHERMINT_INTEGRATION_TEST_MODE
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user