GithubHelp home page GithubHelp logo

iotexproject / iotex-bootstrap Goto Github PK

View Code? Open in Web Editor NEW
96.0 27.0 41.0 3.71 MB

All necessary configuration files and step-by-step instructions for setting up and running a full-node on the IoTeX blockchain. Start contributing to the IoTeX network and explore advanced node features.

Home Page: https://iotex.io

Shell 97.47% Makefile 0.81% Go 1.72%
delegate full-node instructions mining iotx

iotex-bootstrap's Introduction

IoTeX Delegate Manual

Index

Here are the software versions we use:

  • MainNet: v1.14.1

To start and run a testnet node, please click Join Testnet

This is the recommended way to start an IoTeX node

  1. Pull the docker image:
docker pull iotex/iotex-core:v1.14.1
  1. 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/v1.14.1/config_mainnet.yaml > $IOTEX_HOME/etc/config.yaml
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.14.1/genesis_mainnet.yaml > $IOTEX_HOME/etc/genesis.yaml
curl https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/v1.14.1/trie.db.patch > $IOTEX_HOME/data/trie.db.patch
  1. Edit $IOTEX_HOME/etc/config.yaml, look for externalHost and producerPrivKey, uncomment the lines and fill in your external IP and private key. If you leave producerPrivKey empty, your node will be assgined with a random key.

  2. Start from a snapshot (rather than sync from the genesis block), run the following commands:

curl -L https://t.iotex.me/mainnet-data-latest > $IOTEX_HOME/data.tar.gz
tar -xzf data.tar.gz

or download from Google Cloud:

curl -L https://storage.googleapis.com/blockchain-archive/mainnet-data-latest.tar.gz > $IOTEX_HOME/data.tar.gz
tar -xzf data.tar.gz

We will update the snapshot once a day. For advanced users, there are three options to consider:

  • Option 1: 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.

  • Optional 2: If you only want to sync chain data from 0 height without relaying on legacy delegate election data from Ethereum, you can setup legacy delegate election data with following command:

curl -L https://storage.googleapis.com/blockchain-golden/poll.mainnet.tar.gz > $IOTEX_HOME/poll.tar.gz; tar -xzf $IOTEX_HOME/poll.tar.gz --directory $IOTEX_HOME/data
  • Optional 3: If you want to sync the chain from 0 height and also fetching legacy delegate election data from Ethereum, please change the gravityChainAPIs in config.yaml to use your infura key with Ethereum archive mode supported or change the API endpoint to an Ethereum archive node which you can access.
  1. 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:v1.14.1 \
        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 15014:15014 \
        -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:v1.14.1 \
        iotex-server \
        -config-path=/etc/iotex/config_override.yaml \
        -genesis-path=/etc/iotex/genesis.yaml \
        -plugin=gateway
  1. Make sure TCP ports 4689, 8080 (also 14014 if used) are open on your firewall and load balancer (if any).

This is not the preferred way to start an IoTeX node

  1. Set the environment with the following commands:

Same as Join MainNet step 2

  1. Build server binary:
git clone https://github.com/iotexproject/iotex-core.git
cd iotex-core
git checkout v1.14.1

// optional
export GOPROXY=https://goproxy.io
go mod download
make clean build-all
cp ./bin/server $IOTEX_HOME/iotex-server
  1. Edit configs

Same as Join MainNet step 3. Also make sure you update all db paths in config.yaml to correct location if you don't put them under /var/data/

  1. Start from a snapshot

Same as Join MainNet step 4

  1. Run the following command to start a node:
nohup $IOTEX_HOME/iotex-server \
        -config-path=$IOTEX_HOME/etc/config.yaml \
        -genesis-path=$IOTEX_HOME/etc/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:

nohup $IOTEX_HOME/iotex-server \
        -config-path=$IOTEX_HOME/etc/config.yaml \
        -genesis-path=$IOTEX_HOME/etc/genesis.yaml \
        -plugin=gateway &
  1. Make sure TCP ports 4689, 8080 (also 14014 if used) are open on your firewall and load balancer (if any).

ioctl

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 API nodes:

  • MainNet secure: api.iotex.one:443
  • MainNet insecure: api.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.

Other Commonly Used Commands

Claim reward:

ioctl action claim ${amountInIOTX} -l 10000 -p 1 -s ${ioAddress|alias}

Exchange IoTeX native token to ERC20 token on Ethereum via Tube service:

ioctl action invoke io1p99pprm79rftj4r6kenfjcp8jkp6zc6mytuah5 ${amountInIOTX} -s ${ioAddress|alias} -l 400000 -p 1 -b d0e30db0

Click IoTeX Tube docs for detailed documentation of the tube service.

JSON RPC API(Babel service)

Our node supports most of methods of Ethereum's JSON-RPC protocol. The local endpoint of babal service is localhost:15014 on the gateway node.

Additional method support could be requested here.

logrotate is pre-installed when building the image. But crond (daemon to execute scheduled commands) doesn't automatically start when the docker contaiter starts in alpine linux.

To enable log logrotation, docker exec -it <container> crond -b is expected to be run after the container starts

Checking Node log

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"

Stop and remove container

When starting the container with --name=iotex, you must remove the old container before a new build.

docker stop iotex
docker rm iotex

Pause and Restarting container

Container can be "stopped" and "restarted" with:

docker stop iotex
docker start iotex

Make sure you have $IOTEX_HOME already set up, and all the files(configs, dbs etc) are placed in the right locations (Please refer to the Join MainNet section).

To upgrade mainnet node, use following command. By default, it will upgrade to latest mainnet version.

sudo bash # If your docker requires root privilege
bash <(curl -s https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/scripts/setup_fullnode.sh)

To enable gateway on mainnet

sudo bash # If your docker requires root privilege
bash <(curl -s https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/scripts/setup_fullnode.sh) plugin=gateway

To stop auto upgdrade cron job and iotex server program, you can run

sudo bash # If your docker requires root privilege
bash <(curl -s https://raw.githubusercontent.com/iotexproject/iotex-bootstrap/master/scripts/stop_fullnode.sh)

Node with gateway plugin enabled will perform extra indexing to serve API requests of more detail chain information, such as number of actions in a block or query actions by hash.

Please refer here for Q&A.

iotex-bootstrap's People

Contributors

1doce8 avatar chenyanchen avatar coderzhi avatar dustinxie avatar envestcc avatar fishmeat avatar frankonly avatar guo avatar huangzhiran avatar imakowski avatar iotask avatar kkhaveabigdream avatar koseoyoung avatar liuhaai avatar lizhefeng avatar madongming avatar millken avatar puncsky avatar ququzone avatar raullenchai avatar simonerom avatar wyh136 avatar zh131312 avatar zjshen14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iotex-bootstrap's Issues

oneline upgrader transport.py warning

/snap/docker/2746/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.

config error without using Docker

{"level":"error","caller":"factory/statedb.go:138","msg":"Failed to execute state factory creation option 0xf1eac0: failed to open kvstore patch, /var/data/trie.db.patch: open /var/data/trie.db.patch: no such file or directory", ...}

ipfs chainID separation

With the new 1.7.0 release it was announced that the chain ID's will now properly separate the testnet and Mainnet, however in the config files there are still numerous mentions of the 4689 chain ID (mainnet) on testnet configs. For example here:

- /dns4/bootnode-0.testnet.iotex.one/tcp/4689/ipfs/12D3KooWFnaTYuLo8Mkbm3wzaWHtUuaxBRe24Uiopu15Wr5EhD3o

Can this be changed to 4690?

auto upgrade

we would like to add a feature in current upgrader script to allow user to set up auto upgrade.

During the setup phase, we shall ask user if they like to enable auto upgrade. If so, we should have something run periodically(like per day) to check if there is a different mainnet/testnet version in iotex-bootstrap repo.
If there is a new one, do an upgrade(including upgrade config and replace with user fields) automatically.

Cannot docker pull v1.1.1

The docker image cannot be pulled. Also Docker HUB shows "0 bytes" for the size of the image:

Schermata 2020-08-23 alle 20 10 36

» docker pull iotex/iotex-core:v1.1.1

v1.1.1: Pulling from iotex/iotex-core
df20fa9351a1: Already exists 
73249b6d84aa: Already exists 
4766d37a6dd4: Already exists 
4a7266942057: Pulling fs layer 
7f45140ce81b: Pulling fs layer 
be4e563096cd: Pulling fs layer 
c8816247370e: Waiting 
error pulling image configuration: unknown blob

Failed to start server.

I follow the step to run iotex node ,but when i run the command :
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:v1.2.0 iotex-server -config-path=/etc/iotex/config_override.yaml -genesis-path=/etc/iotex/genesis.yaml

the error occurd:

{"level":"fatal","ts":1621306827.6981044,"caller":"itx/server.go:174","msg":"Failed to start server.","ioAddr":"io1hrj20xkqd38e8mwjs0af5c4xds0u792land67q","error":"error when starting blockchain: error when starting election committee: failed to get tip height: failed to get tip height: failed to execute callback with any client: 401 Unauthorized account disabled\n","errorVerbose":"401 Unauthorized account disabled\n\nfailed to execute callback with any client\ngithub.com/iotexproject/iotex-election/carrier.(*EthClientPool).Execute\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/carrier/carrier.go:111\ngithub.com/iotexproject/iotex-election/carrier.(*ethereumCarrier).tip\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/carrier/carrier.go:188\ngithub.com/iotexproject/iotex-election/carrier.(*ethereumCarrier).Tip\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/carrier/carrier.go:184\ngithub.com/iotexproject/iotex-election/committee.(*committee).Start\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/committee/committee.go:215\ngithub.com/iotexproject/iotex-core/chainservice.(*ChainService).Start\n\t/go/apps/iotex-core/chainservice/chainservice.go:471\ngithub.com/iotexproject/iotex-core/server/itx.(*Server).Start\n\t/go/apps/iotex-core/server/itx/server.go:94\ngithub.com/iotexproject/iotex-core/server/itx.StartServer\n\t/go/apps/iotex-core/server/itx/server.go:173\nmain.main\n\t/go/apps/iotex-core/server/main.go:125\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373\nfailed to get tip height\ngithub.com/iotexproject/iotex-election/carrier.(*ethereumCarrier).tip\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/carrier/carrier.go:203\ngithub.com/iotexproject/iotex-election/carrier.(*ethereumCarrier).Tip\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/carrier/carrier.go:184\ngithub.com/iotexproject/iotex-election/committee.(*committee).Start\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/committee/committee.go:215\ngithub.com/iotexproject/iotex-core/chainservice.(*ChainService).Start\n\t/go/apps/iotex-core/chainservice/chainservice.go:471\ngithub.com/iotexproject/iotex-core/server/itx.(*Server).Start\n\t/go/apps/iotex-core/server/itx/server.go:94\ngithub.com/iotexproject/iotex-core/server/itx.StartServer\n\t/go/apps/iotex-core/server/itx/server.go:173\nmain.main\n\t/go/apps/iotex-core/server/main.go:125\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373\nfailed to get tip height\ngithub.com/iotexproject/iotex-election/committee.(*committee).Start\n\t/go/pkg/mod/github.com/iotexproject/[email protected]/committee/committee.go:217\ngithub.com/iotexproject/iotex-core/chainservice.(*ChainService).Start\n\t/go/apps/iotex-core/chainservice/chainservice.go:471\ngithub.com/iotexproject/iotex-core/server/itx.(*Server).Start\n\t/go/apps/iotex-core/server/itx/server.go:94\ngithub.com/iotexproject/iotex-core/server/itx.StartServer\n\t/go/apps/iotex-core/server/itx/server.go:173\nmain.main\n\t/go/apps/iotex-core/server/main.go:125\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373\nerror when starting election committee\ngithub.com/iotexproject/iotex-core/chainservice.(*ChainService).Start\n\t/go/apps/iotex-core/chainservice/chainservice.go:472\ngithub.com/iotexproject/iotex-core/server/itx.(*Server).Start\n\t/go/apps/iotex-core/server/itx/server.go:94\ngithub.com/iotexproject/iotex-core/server/itx.StartServer\n\t/go/apps/iotex-core/server/itx/server.go:173\nmain.main\n\t/go/apps/iotex-core/server/main.go:125\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373\nerror when starting blockchain\ngithub.com/iotexproject/iotex-core/server/itx.(*Server).Start\n\t/go/apps/iotex-core/server/itx/server.go:95\ngithub.com/iotexproject/iotex-core/server/itx.StartServer\n\t/go/apps/iotex-core/server/itx/server.go:173\nmain.main\n\t/go/apps/iotex-core/server/main.go:125\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1373"}

please help me

https://github.com/iotexproject/iotex-bootstrap/blob/master/184_patch/patch.sh should retry if failed to download

Otherwise it may download an incapable file like this

xxxxxx:~/iotex-var/data# cat 21522640.patch
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
<script>(function(){var js = "window['__CF$cv$params']={r:'786f95106dc8c470',m:'ZPAwTJYvgQY0tgj_QsOpdlk8P4x1XTBedn7_OcSrcSQ-1673292572-0-AYVyQkBIEqo8YHPf7uFiXri7q6/ec30QKJNNBKnwnZsMl3TRlxi/QcvQZkAmvdxUxJjOJtlKBTOZ13cfYDG2ZPgzK3oVmTuyjnvCYio+MhrFzxlkYrnu0YGFCFaav0jBFA==',s:[0x99ceb23ed8,0x5a0a97cf42],u:'/cdn-cgi/challenge-platform/h/b'};var now=Date.now()/1000,offset=14400,ts=''+(Math.floor(now)-Math.floor(now%offset)),_cpo=document.createElement('script');_cpo.nonce='',_cpo.src='/cdn-cgi/challenge-platform/h/b/scripts/alpha/invisible.js?ts='+ts,document.getElementsByTagName('head')[0].appendChild(_cpo);";var _0xh = document.createElement('iframe');_0xh.height = 1;_0xh.width = 1;_0xh.style.position = 'absolute';_0xh.style.top = 0;_0xh.style.left = 0;_0xh.style.border = 'none';_0xh.style.visibility = 'hidden';document.body.appendChild(_0xh);function handler() {var _0xi = _0xh.contentDocument || _0xh.contentWindow.document;if (_0xi) {var _0xj = _0xi.createElement('script');_0xj.nonce = '';_0xj.innerHTML = js;_0xi.getElementsByTagName('head')[0].appendChild(_0xj);}}if (document.readyState !== 'loading') {handler();} else if (window.addEventListener) {document.addEventListener('DOMContentLoaded', handler);} else {var prev = document.onreadystatechange || function () {};document.onreadystatechange = function (e) {prev(e);if (document.readyState !== 'loading') {document.onreadystatechange = prev;handler();}};}})();</script></body>
</html>

find some typo in README_CN.md

here

主网安全端口: api.iotex.one:443
主网安非全端口: api.iotex.one:80
测试网安全端口: api.testnet.iotex.one:443
测试网安全端口: api.testnet.iotex.one:80

Infra guide

In addition to the steps to run each node, we should offer an infra guide for delegates/candidates, which could be another MD file in this repo.

cc @zjshen14 @yutongp

make config replace work on macOS

Currently replacing externalHost,producerPrivKey only work on linux system, but not macOS.
We may need some change to make it also work on mac as well

iotex-bootstrap testnet information is invalid

Currently if someone wanted to start testing on an IoTeX test node, they would fail, as the instructions tell you to use iotex-core 1.6, but the only way to make it work is to use image iotex/iotex-core:v1.6.1-rc2

Please update README.md with current instructions

upgrader should remove old poll.db.bolt

we did a migration on poll.db months back, and put the old data in $IOTEX_HOME/data/poll.db.bolt.
now seems the migration has succeed, so we no longer need to keep the old data for delegates.

add logic in upgrader, if $IOTEX_HOME/data/poll.db.bolt exist, just remove it.

Unable to start node without docker

Hello.
Trying to setup node and connect to mainnet without docker via README of this repository.
But when I start the node, I've got an error:

sudo ./iotex-server -config-path=/data/iotex-var/etc/config.yaml -genesis-path=/data/iotex-var/etc/genesis.yaml -plugin=gateway
2020/06/16 06:42:22 maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined
{"level":"info","ts":1592289742.4042342,"caller":"server/main.go:65","msg":"Config in use: {Plugins:map[0:] Network:{Host:0.0.0.0 Port:4689 ExternalHost:*.*.*.* ExternalPort:4689 BootstrapNodes:[/dns4/bootnode-0.mainnet.iotex.one/tcp/4689/p2p/12D3KooWPfQDF8ASjd4r7jS9e7F1wn6zod7Mf4ERr8etoY6ctQp5 /dns4/bootnode-1.mainnet.iotex.one/tcp/4689/p2p/12D3KooWN4TQ1CWRA7yvJdQCdti1qARLXXu2UEHJfycn3XbnAnRh /dns4/bootnode-2.mainnet.iotex.one/tcp/4689/p2p/12D3KooWSiktocuUke16bPoW9zrLawEBaEc1UriaPRwm82xbr2BQ /dns4/bootnode-3.mainnet.iotex.one/tcp/4689/p2p/12D3KooWEsmwaorbZX3HRCnhkMPjMAHzwu3om1pdGrtVm2QaM35n] MasterKey:ee19d7a9dd4f9bf5e7ce6cdd170c940d4f5fdf99f5c5aefd76cd0fd10c3d028f RelayType: RateLimit:{GlobalUnicastAvg:300 GlobalUnicastBurst:500 PeerAvg:300 PeerBurst:500} EnableRateLimit:true PrivateNetworkPSK:} Chain:{ChainDBPath:/root/iotex-var/data/chain.db TrieDBPath:/root/iotex-var/data/trie.db IndexDBPath:/var/data/index.db CandidateIndexDBPath:/var/data/candidate.index.db ID:1 Address: ProducerPrivKey: SignatureScheme:[secp256k1] EmptyGenesis:false GravityChainDB:{DbPath:/root/iotex-var/data/poll.db NumRetries:8 MaxCacheSize:0 RDS:{AwsRDSEndpoint: AwsRDSPort:0 AwsRDSUser: AwsPass: AwsDBName:} SQLITE3:{SQLite3File:} SplitDBSizeMB:0 SplitDBHeight:0 HistoryStateRetention:0} Committee:{NumOfRetries:20 GravityChainAPIs:[https://mainnet.infura.io/v3/63720cd30b674dafa601606ee4c12ca5] GravityChainHeightInterval:0 GravityChainStartHeight:0 GravityChainCeilingHeight:0 RegisterContractAddress: StakingContractAddress: PaginationSize:255 VoteThreshold: ScoreThreshold: SelfStakingThreshold: CacheSize:1000 NumOfFetchInParallel:0 SkipManifiedCandidate:false GravityChainBatchSize:0} EnableTrielessStateDB:true EnableArchiveMode:false EnableAsyncIndexWrite:true EnableSystemLogIndexer:false EnableStakingProtocol:true CompressBlock:false AllowedBlockGasResidue:10000 MaxCacheSize:1000 PollInitialCandidatesInterval:10s WorkingSetCacheSize:20} ActPool:{MaxNumActsPerPool:32000 MaxGasLimitPerPool:320000000 MaxNumActsPerAcct:2000 ActionExpiry:10m0s MinGasPriceStr:1000000000000 BlackList:[]} Consensus:{Scheme:ROLLDPOS RollDPoS:{FSM:{EventChanSize:10000 UnmatchedEventTTL:3s UnmatchedEventInterval:100ms AcceptBlockTTL:4s AcceptProposalEndorsementTTL:2s AcceptLockEndorsementTTL:2s CommitTTL:2s} ToleratedOvertime:2s Delay:10s ConsensusDBPath:/var/data/consensus.db}} BlockSync:{Interval:10s BufferSize:400 IntervalSize:20 MaxRepeat:3 RepeatDecayStep:3} Dispatcher:{EventChanSize:10000} API:{UseRDS:false Port:14014 TpsWindow:10 GasStation:{SuggestBlockWindow:20 DefaultGas:1000000000000 Percentile:60} RangeQueryLimit:1000} System:{Active:true HeartbeatInterval:10s HTTPAdminPort:9009 HTTPStatsPort:8080 StartSubChainInterval:10s SystemLogDBPath:/var/data/systemlog.db} DB:{DbPath: NumRetries:3 MaxCacheSize:64 RDS:{AwsRDSEndpoint: AwsRDSPort:0 AwsRDSUser: AwsPass: AwsDBName:} SQLITE3:{SQLite3File:./explorer.db} SplitDBSizeMB:0 SplitDBHeight:900000 HistoryStateRetention:2000} Log:{Zap:0xc0000cd100 StderrRedirectFile:0xc000274670 RedirectStdLog:true} SubLogs:map[global:{Zap:0xc0000cd100 StderrRedirectFile:0xc000274670 RedirectStdLog:true}] Genesis:{Blockchain:{Timestamp:1553558500 BlockGasLimit:20000000 ActionGasLimit:5000000 BlockInterval:10s NumSubEpochs:15 DardanellesNumSubEpochs:30 NumDelegates:24 NumCandidateDelegates:36 TimeBasedRotation:true PacificBlockHeight:432001 AleutianBlockHeight:864001 BeringBlockHeight:1512001 CookBlockHeight:1641601 DardanellesBlockHeight:1816201 DaytonaBlockHeight:3238921 EasterBlockHeight:4478761 FbkMigrationBlockHeight:5157001 FairbankBlockHeight:5165641} Account:{InitBalanceMap:map[io10a298zmzvrt4guq79a9f4x7qedj59y7ery84he:100000000000000000000000000 io13sj9mzpewn25ymheukte4v39hvjdtrfp00mlyv:100000000000000000000000000 io14gnqxf9dpkn05g337rl7eyt2nxasphf5m6n0rd:100000000000000000000000000 io158hyzrmf4a8xll7gfc8xnwlv70jgp44tzy5nvd:100000000000000000000000000 io15flratm0nhh5xpxz2lznrrpmnwteyd86hxdtj0:100000000000000000000000000 io19d0p3ah4g8ww9d7kcxfq87yxe7fnr8rpth5shj:100000000000000000000000000 io19kshh892255x4h5ularvr3q3al2v8cgl80fqrt:100000000000000000000000000 io1cdqx6p5rquudxuewflfndpcl0l8t5aezen9slr:100000000000000000000000000 io1cl6rl2ev5dfa988qmgzg2x4hfazmp9vn2g66ng:100000000000000000000000000 io1ed52svvdun2qv8sf2m0xnynuxfaulv6jlww7ur:100000000000000000000000000 io1eq4ehs6xx6zj9gcsax7h3qydwlxut9xcfcjras:100000000000000000000000000 io1fxzh50pa6qc6x5cprgmgw4qrp5vw97zk5pxt3q:100000000000000000000000000 io1hh97f273nhxcq8ajzcpujtt7p9pqyndfmavn9r:100000000000000000000000000 io1jh0ekmccywfkmj7e8qsuzsupnlk3w5337hjjg2:100000000000000000000000000 io1juvx5g063eu4ts832nukp4vgcwk2gnc5cu9ayd:100000000000000000000000000 io1k9y4a9juk45zaqwvjmhtz6yjc68twqds4qcvzv:100000000000000000000000000 io1l3wc0smczyay8xq747e2hw63mzg3ctp6uf8wsg:100000000000000000000000000 io1llupp3n8q5x8usnr5w08j6hc6hn55x64l46rr7:100000000000000000000000000 io1ns7y0pxmklk8ceattty6n7makpw76u770u5avy:100000000000000000000000000 io1ph0u2psnd7muq5xv9623rmxdsxc4uapxhzpg02:100000000000000000000000000 io1q4tdrahguffdu4e9j9aj4f38p2nee0r9vlhx7s:100000000000000000000000000 io1skmqp33qme8knyw0fzgt9takwrc2nvz4sevk5c:100000000000000000000000000 io1uqhmnttmv0pg8prugxxn7d8ex9angrvfjfthxa:9800000000000000000000000000 io1v3gkc49d5vwtdfdka2ekjl3h468egun8e43r7z:100000000000000000000000000 io1vrl48nsdm8jaujccd9cx4ve23cskr0ys6urx92:100000000000000000000000000 io1xuavja5dwde8pvy4yms06yyncad4yavghjhwra:100000000000000000000000000 io1yhvu38epz5vmkjaclp45a7t08r27slmcc0zjzh:100000000000000000000000000 io1znka733xefxjjw2wqddegplwtefun0mfdmz7dw:100000000000000000000000000]} Poll:{PollMode:nativeMix EnableGravityChainVoting:true GravityChainStartHeight:7614500 GravityChainCeilingHeight:10199000 GravityChainHeightInterval:100 RegisterContractAddress:0x95724986563028deb58f15c5fac19fa09304f32d StakingContractAddress:0x87c9dbff0016af23f5b1ab9b8e072124ab729193 NativeStakingContractAddress:io1xpq62aw85uqzrccg9y5hnryv8ld2nkpycc3gza NativeStakingContractCode: ConsortiumCommitteeContractCode: VoteThreshold:100000000000000000000 ScoreThreshold:2000000000000000000000000 SelfStakingThreshold:1200000000000000000000000 Delegates:[] ProbationEpochPeriod:6 ProbationIntensityRate:90 UnproductiveDelegateMaxCacheSize:20} Rewarding:{InitBalanceStr:200000000000000000000000000 BlockRewardStr:16000000000000000000 DardanellesBlockRewardStr:8000000000000000000 EpochRewardStr:12500000000000000000000 AleutianEpochRewardStr:18750000000000000000000 NumDelegatesForEpochReward:100 ExemptAddrStrsFromEpochReward:[io15fqav3tugm96ge7anckx0k4gukz5m4mqf0jpv3 io1x9kjkr0qv2fa7j4t2as8lrj223xxsqt4tl7xp7 io1ar5l5s268rtgzshltnqv88mua06ucm58dx678y io1xsx5n94kg2zv64r7tm8vyz9mh86amfak9ka9xx io1vtm2zgn830pn6auc2cvnchgwdaefa9gr4z0s86 io159fv8mu9d5djk8u2t0flgw4yqmt6fg98uqjka8 io1c3r4th3zrk4uhv83a9gr4gvn3y6pzaj6mc84ea io14vmhs9c75r2ptxdaqrtk0dz7skct30pxmt69d9 io1gf08snppu2a2wfd50pjas2j6q2kcxjzqph3pep io1u5ff879gg2dw9vfpxr2tsmuaz07e2rea6gvl7s io1du4eq4f88n4wyc026l3gamjwetlgsg4jz7j884 io12yxdwewry70gr9fs6fphyfaky9c7gurmzk8f4f io1lx53nfgq2dnzrz5ecz2ecs7vvl6qll0mkn970w io1u5xy0ecnrjrdkzyctfqh37lgr5pcfzphgqrdwt io1aj8arp07xw6s9rgh42af5xf98csyuehnnwlk52 io18gdmv5g0xhkuj2cdyvp8076uwhl7h3gesmzh8u io1td5fvamm3qf22r5h93gay6ggqdh9z0edeqx63u io1qs785af9k9xf3xgd6vut7um9zcthtrvsn2xap2 io127ftn4ry6wgxdrw4hcd6gdwqlq70ujk98dvtw5 io1wv5m0xyermvr2n0wjx2cjsqwyk863drdl5qfyn io1v0q5g2f8z6l3v25krl677chdx7g5pwt9kvqfpc io1xsdegzr2hdj5sv5ad4nr0yfgpsd98e40u6svem io1fks575kklxafq4fwjccmz5d3pmq5ynxk5h6h0v io15npzu93ug8r3zdeysppnyrcdu2xssz0lcam9l9 io1gh7xfrsnj6p5uqgjpk9xq6jg9na28aewgp7a9v io1nyjs526mnqcsx4twa7nptkg08eclsw5c2dywp4 io1jafqlvntcxgyp6e0uxctt3tljzc3vyv5hg4ukh io1z7mjef7w528nasnsafan0rp6yuvkvq405l6r8j io1cup9k8hl8fp40vrj29ex8djc346780dk223end io1scs89jur7qklzh5vfrmha3c40u8yajjx6kvzg9 io10kyvvzu08pjeylymq4umknjal25ea3ptfknrpf io18mvepyxkcd5jkyplfqn27ydkpsendrey3xe2l8 io1nz40npqa3yvek4zdasmqaetl2j4h6urejfkera io1m7p9yrejngxyvxhvn7p9g9uwlvd7uuamg8wcjd io1cwwm08dwv9phh3wt5vsdhu9gcypw9q2sc7pl9s io14aj46jjmtt83vts9syhrs9st80czumg40cjasl] FoundationBonusStr:80000000000000000000 NumDelegatesForFoundationBonus:36 FoundationBonusLastEpoch:8760 FoundationBonusP2StartEpoch:9698 FoundationBonusP2EndEpoch:18458 ProductivityThreshold:85} Staking:{VoteWeightCalConsts:{DurationLg:1.2 AutoStake:1 SelfStake:1.06} RegistrationConsts:{Fee:100000000000000000000 MinSelfStake:1200000000000000000000000} WithdrawWaitingPeriod:72h0m0s MinStakeAmount:100000000000000000000 BootstrapCandidates:[]}}}","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689"}
{"level":"info","ts":1592289742.407197,"caller":"committee/committee.go:149","msg":"Carrier created","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689","registerContractAddress":"0x95724986563028deb58f15c5fac19fa09304f32d","stakingContractAddress":"0x87c9dbff0016af23f5b1ab9b8e072124ab729193"}
{"level":"info","ts":1592289742.4089408,"caller":"blockchain/blockchain.go:430","msg":"Add a subscriber.","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689"}
{"level":"info","ts":1592289742.4101293,"caller":"blockchain/blockchain.go:430","msg":"Add a subscriber.","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689"}
{"level":"info","ts":1592289742.4148414,"caller":"poll/nativestaking.go:176","msg":"Set native staking contract address = io1xpq62aw85uqzrccg9y5hnryv8ld2nkpycc3gza","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689"}
{"level":"info","ts":1592289742.421036,"caller":"[email protected]/p2p.go:359","msg":"P2p host started.","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689","address":["/ip4/127.0.0.1/tcp/4689/p2p/12D3KooWMW3fVB8NnfYcCcfHcn2aGDPKWGji1wR8jVn7cTKL9UJ8","/ip4/*.*.*.*/tcp/4689/p2p/12D3KooWMW3fVB8NnfYcCcfHcn2aGDPKWGji1wR8jVn7cTKL9UJ8","/ip4/*.*.*.*/tcp/4689/p2p/12D3KooWMW3fVB8NnfYcCcfHcn2aGDPKWGji1wR8jVn7cTKL9UJ8"],"secureIO":true,"gossip":true}
{"level":"info","ts":1592289743.42017,"caller":"p2p/agent.go:256","msg":"Connected bootstrap node.","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689","address":"/dns4/bootnode-1.mainnet.iotex.one/tcp/4689/p2p/12D3KooWN4TQ1CWRA7yvJdQCdti1qARLXXu2UEHJfycn3XbnAnRh"}
{"level":"info","ts":1592289743.4209867,"caller":"p2p/agent.go:256","msg":"Connected bootstrap node.","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689","address":"/dns4/bootnode-2.mainnet.iotex.one/tcp/4689/p2p/12D3KooWSiktocuUke16bPoW9zrLawEBaEc1UriaPRwm82xbr2BQ"}
{"level":"info","ts":1592289743.442204,"caller":"p2p/agent.go:256","msg":"Connected bootstrap node.","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689","address":"/dns4/bootnode-0.mainnet.iotex.one/tcp/4689/p2p/12D3KooWPfQDF8ASjd4r7jS9e7F1wn6zod7Mf4ERr8etoY6ctQp5"}
{"level":"fatal","ts":1592289743.4426446,"caller":"itx/server.go:174","msg":"Failed to start server.","ioAddr":"io1zda5z84lyupaycxtfp87y96dy0d36frgx4pv2g","networkAddr":"0.0.0.0:4689","error":"error when starting blockchain: error when starting election committee: unable to open database file","errorVerbose":"unable to open database file\nerror when starting election committee\ngithub.com/iotexproject/iotex-core/chainservice.(*ChainService).Start\n\t/root/iotex-core/chainservice/chainservice.go:404\ngithub.com/iotexproject/iotex-core/server/itx.(*Server).Start\n\t/root/iotex-core/server/itx/server.go:97\ngithub.com/iotexproject/iotex-core/server/itx.StartServer\n\t/root/iotex-core/server/itx/server.go:173\nmain.main\n\t/root/iotex-core/server/main.go:101\nruntime.main\n\t/root/.go/src/runtime/proc.go:203\nruntime.goexit\n\t/root/.go/src/runtime/asm_amd64.s:1357\nerror when starting blockchain\ngithub.com/iotexproject/iotex-core/server/itx.(*Server).Start\n\t/root/iotex-core/server/itx/server.go:98\ngithub.com/iotexproject/iotex-core/server/itx.StartServer\n\t/root/iotex-core/server/itx/server.go:173\nmain.main\n\t/root/iotex-core/server/main.go:101\nruntime.main\n\t/root/.go/src/runtime/proc.go:203\nruntime.goexit\n\t/root/.go/src/runtime/asm_amd64.s:1357"}

where *.*.*.* - my external ip.

if config.yaml or genesis.yaml doesn't exist upgrader should error out

grep: /home/yutong/iotex-var/etc/config.yaml: No such file or directory
grep: /home/yutong/iotex-var/etc/config.yaml: No such file or directory

this should error out instead of creating config with empty key

chain:

  # If you are a delegate, make sure producerPrivKey is the key for the operator address you have registered.
  # producerPrivKey: SET YOUR PRIVATE KEY HERE (e.g., 96f0aa5e8523d6a28dc35c927274be4e931e74eaa720b418735debfcbfe712b8)

Download snapshot in upgrader script

If there is no dB files under IOTEX_HOME/data , ask user if they want to download correspondence snapshot. If user answers YES, then download, unzip and put in data folder for them.

Tar file to download:
If user choose to turn on gateway on mainnet:
https://t.iotex.me/mainnet-data-with-idx-latest
If user choose to turn off gateway on mainnet:
https://t.iotex.me/mainnet-data-latest
If user choose to turn on gateway on testnet:
https://t.iotex.me/testnet-data-with-idx-latest
If user choose to turn off gateway on testnet:
https://t.iotex.me/testnet-data-latest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.