- Delegates for MainNet should upgrade software to v0.6.2 before block height 432001. (2019-05-30)
- Those who have upgraded to v0.5.1+ before, you just need to restart the docker container with new tag v0.6.2.
- Those who are still on v0.5.0, please make sure you pull the up-to-date genesis file again, and then restart the docker container with new tag v0.6.2.
- Do not clean up local data for the upgrade.
- TestNet is upgraded to v0.6.2. (2019-05-29)
- TestNet is upgraded to v0.6.1 and restarted from a clean state again. (2019-05-24)
- TestNet is upgraded to v0.6.0. If you join the previous TestNet, you need to restart with a clean local state. (2019-05-23)
Here are the software versions we use:
- MainNet: v0.6.2
- TestNet: v0.6.2
- Pull the docker image:
docker pull iotex/iotex-core:v0.6.2
Please check if the docker image digest is d710efc6c76ad7e79414ef26e6386771de091767bd078eb9f7f32c79b3087692
.
- Set the environment with the following commands:
mkdir -p ~/iotex-var
cd ~/iotex-var
export IOTEX_HOME=$PWD
mkdir -p $IOTEX_HOME/data
mkdir -p $IOTEX_HOME/log
mkdir -p $IOTEX_HOME/etc
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/config_mainnet.yaml > $IOTEX_HOME/etc/config.yaml
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/genesis_mainnet.yaml > $IOTEX_HOME/etc/genesis.yaml
-
Edit
$IOTEX_HOME/etc/config.yaml
, look forexternalHost
andproducerPrivKey
, uncomment the lines and fill in your external IP and private key. -
(Optional) If you prefer to start from a snapshot, run the following commands:
curl -L https://t.iotex.me/mainnet-data-latest > $IOTEX_HOME/data.tar.gz
tar -xzf data.tar.gz
We will update the snapshot once a day. If you plan to run your node as a gateway, please use the snapshot with index data: https://t.iotex.me/mainnet-data-with-idx-latest.
- Run the following command to start a node:
docker run -d --restart on-failure --name iotex \
-p 4689:4689 \
-p 8080:8080 \
-v=$IOTEX_HOME/data:/var/data:rw \
-v=$IOTEX_HOME/log:/var/log:rw \
-v=$IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro \
-v=$IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro \
iotex/iotex-core:v0.6.2 \
iotex-server \
-config-path=/etc/iotex/config_override.yaml \
-genesis-path=/etc/iotex/genesis.yaml
Now your node should be started successfully.
If you want to also make your node be a gateway, which could process API requests from users, use the following command instead:
docker run -d --restart on-failure --name iotex \
-p 4689:4689 \
-p 14014:14014 \
-p 8080:8080 \
-v=$IOTEX_HOME/data:/var/data:rw \
-v=$IOTEX_HOME/log:/var/log:rw \
-v=$IOTEX_HOME/etc/config.yaml:/etc/iotex/config_override.yaml:ro \
-v=$IOTEX_HOME/etc/genesis.yaml:/etc/iotex/genesis.yaml:ro \
iotex/iotex-core:v0.6.2 \
iotex-server \
-config-path=/etc/iotex/config_override.yaml \
-genesis-path=/etc/iotex/genesis.yaml \
-plugin=gateway
- Make sure TCP ports 4689, 8080 (also 14014 if used) are open on your firewall and load balancer (if any).
There's almost no difference to join TestNet, but in step 2, you need to use the config and genesis files for TestNet:
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/config_testnet.yaml > $IOTEX_HOME/etc/config.yaml
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/genesis_testnet.yaml > $IOTEX_HOME/etc/genesis.yaml
In step 4, you need to use the snapshot for TestNet: https://t.iotex.me/testnet-data-latest and https://t.iotex.me/testnet-data-with-idx-latest.
In step 5, you need to replace the docker image tag in the command with v0.6.2
.
You can install ioctl
(a command-line interface for interacting with IoTeX blockchain)
curl https://raw.githubusercontent.com/iotexproject/iotex-core/master/install-cli.sh | sh
You can point ioctl
to your node (if you enable the gateway plugin):
ioctl config set endpoint localhost:14014 --insecure
Or you can point it to our nodes:
- MainNet secure:
api.iotex.one:443
- MainNet insecure:
api.iotex.one:80
- TestNet secure:
api.testnet.iotex.one:443
- TestNet insecure:
api.testnet.iotex.one:80
If you want to set an insecure endpoint, you need to add --insecure
option.
Generate key:
ioctl account create
Get consensus delegates of current epoch:
ioctl node delegate
Refer to CLI document for more details.
Claim reward:
ioctl action claim ${amountInIOTX} -l 10000 -p 1 -s ${ioAddress|alias}
Exchange to ERC20 on Ethereum via Faucet:
ioctl action invoke io1pcg2ja9krrhujpazswgz77ss46xgt88afqlk6y ${amountInIOTX} -s ${ioAddress|alias} -l 400000 -p 1 -b d0e30db0
Besides ioctl, we also provide a tool named "bookkeeper" to help calculate the reward distribution for voters by epoch. Refer to bookkeeper instruction for more details.
Container logs can be accessed with the following command.
docker logs iotex
Content can be filtered with:
docker logs -f --tail 100 iotex |grep --color -E "epoch|height|error|rolldposctx"
When starting the container with --name=iotex
, you must remove the old container before a new build.
docker stop iotex
docker rm iotex
Container can be "stopped" and "restarted" with:
docker stop iotex
docker start iotex