全部刪除,從來
打入
./scripts/init.sh MONIKER genesis.json 913bd0f4bea4ef512ffba39ab90eae84c1420862@34.82.131.35:26656
會出現下面內容
grep: genesis.json: No such file or directory
{"app_message":{"accounts":[],"auth":{"params":{"max_memo_characters":"256","sig_verify_cost_ed25519":"590","sig_verify_cost_secp256k1":"1000","tx_sig_limit":"7","tx_size_cost_per_byte":"10"}},"bank":{"send_enabled":true},"crisis":{"constant_fee":{"amount":"1000","denom":"stake"}},"distribution":{"base_proposer_reward":"0.010000000000000000","bonus_proposer_reward":"0.040000000000000000","community_tax":"0.020000000000000000","delegator_starting_infos":[],"delegator_withdraw_infos":[],"fee_pool":{"community_pool":[]},"outstanding_rewards":[],"previous_proposer":"","validator_accumulated_commissions":[],"validator_current_rewards":[],"validator_historical_rewards":[],"validator_slash_events":[],"withdraw_addr_enabled":true},"genutil":{"gentxs":null},"gov":{"deposit_params":{"max_deposit_period":"172800000000000","min_deposit":[{"amount":"10000000","denom":"stake"}]},"deposits":null,"proposals":null,"starting_proposal_id":"1","tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto":"0.334000000000000000"},"votes":null,"voting_params":{"voting_period":"172800000000000"}},"mint":{"minter":{"annual_provisions":"0.000000000000000000","inflation":"0.130000000000000000"},"params":{"blocks_per_year":"6311520","goal_bonded":"0.670000000000000000","inflation_max":"0.200000000000000000","inflation_min":"0.070000000000000000","inflation_rate_change":"0.130000000000000000","mint_denom":"stake"}},"params":null,"slashing":{"missed_blocks":{},"params":{"downtime_jail_duration":"600000000000","max_evidence_age":"120000000000","min_signed_per_window":"0.500000000000000000","signed_blocks_window":"100","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"signing_infos":{}},"staking":{"delegations":null,"exported":false,"last_total_power":"0","last_validator_powers":null,"params":{"bond_denom":"stake","max_entries":7,"max_validators":100,"unbonding_time":"1814400000000000"},"redelegations":null,"unbonding_delegations":null,"validators":null},"supply":{"supply":[]},"whitelist":{"params":{"approver":""},"whitelist":null}},"chain_id":"test-chain-Yf1yZE","gentxs_dir":"","moniker":"MONIKER","node_id":"94a71b65ceadb052d77bb0a221a9f80e9d04c845"}
cp: cannot stat 'genesis.json': No such file or directory
./dev:
docker-compose.yml genesis.json testnet-local.sh
`./scripts/init.sh` 的第二個參數要指向 `genesis.json` 的位置
➜ likecoin-chain git:(sheungwan) ls -R
.:
LICENSE README.md app cmd dev docker docker-compose.template.yml go.mod go.sum ip scripts x
./app:
app.go export.go
./cmd:
likecli liked
./cmd/likecli:
main.go
./cmd/liked:
main.go
./dev:
docker-compose.yml genesis.json testnet-local.sh
./docker:
Dockerfile app base
./docker/app:
Dockerfile Dockerfile-root build.sh
./docker/base:
Dockerfile build.sh
./ip:
ip.go providers.go
./scripts:
build.sh gentx.sh init.sh staking.sh
./x:
gov staking whitelist
./x/gov:
doc.go module.go
./x/staking:
doc.go module.go
./x/whitelist:
alias.go client genesis.go handler.go keeper.go module.go querier.go types
./x/whitelist/client:
cli rest
./x/whitelist/client/cli:
query.go tx.go
./x/whitelist/client/rest:
query.go rest.go
./x/whitelist/types:
codec.go errors.go events.go genesis.go keys.go msg.go params.go querier.go whitelist.go
> Download genesis.json here and put it somewhere (e.g. in likecoin-chain folder).
你有做這一步嗎?
除非只打入 ./scripts/init.sh MONIKER genesis.json 後半段不打才能執行
下載 genesis.json 和運行 script 無關,試用你的瀏覽器下載
➜ likecoin-chain git:(sheungwan) ✗ ls -R
.:
LICENSE app dev docker-compose.template.yml genesis.json go.sum scripts
README.md cmd docker docker-compose.yml go.mod ip x
然後就可以繼續 init.sh
第一個參數 MONIKER 改成你想要你的 node 顯示的名字
第二個參數指向下載的 genesis.json 的路徑
之後又跑了一次網上流程
➜ likecoin-chain git:(sheungwan) ✗ ./scripts/init.sh MONIKER genesis.json 913bd0f4bea4ef512ffba39ab90eae84c1420862@34.82.131.35:26656
➜ likecoin-chain git:(sheungwan) ✗ docker-compose up -d
Creating likechain_liked ... done
➜ likecoin-chain git:(sheungwan) ✗
又回到最初了
getting external IP address
Got external IP: 112.118.167.147
p2p.external_address = <tcp://112.118.167.147:26656>
I[2020-10-04|06:35:04.344] starting ABCI with Tendermint module=main
ERROR: error during handshake: error on replay: validator set is nil in genesis and still empty after InitChain
你有沒有在運行前刪掉 .liked 和 .likecli?
每次運行 init.sh 都會生成,所以運行前要刪掉,新的 init.sh 才會有效
刪掉 .liked 和 .likecli
再試
➜ ~ ./scripts/init.sh KYLENODE genesis.json 913bd0f4bea4ef512ffba39ab90eae84c1420862@34.82.131.35:26656
回了這個==>> zsh: no such file or directory: ./scripts/init.sh
不是 liked 和 likecli 啊,那兩個是程序源碼
是 .liked 和 .likecli 啊,在項目根目錄裏
I[2020-10-04|08:04:22.526] Executed block module=state height=3735 validTxs=0 invalidTxs=0
I[2020-10-04|08:04:22.534] Committed state module=state height=3735 txs=0 appHash=6E77DBC0046EC99A4B07AE10E7E8E87B0AE2B83CE6EDCAFABF58E8D0D45D1956
目前 height 為 5,054,559,印象中大約 25 GB