IOST 节点升级

1. git-lfs问题解决

    # https://developers.iost.io/docs/en/4-running-iost-node/Building-IOST.html
    curl -O https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh && bash script.deb.sh

2. 下载iost

    git clone https://github.com/iost-official/go-iost.git

3. 生成go.mod 文件

    go mod init

4. 修改atomic依赖项

原因:As of v1.5.0, the import path go.uber.org/atomic is the only supported way of using this package.

    go mod edit -replace github.com/uber-go/atomic=github.com/uber-go/atomic@v1.4.0

5. 编译

    cd $GOPATH/src/github.com/iost-official
    git clone https://github.com/iost-official/go-iost.git -b v3.2.0
    cd go-iost
    sudo apt install -y git-lfs && git lfs install
    git lfs pull
    make build install
    cd vm/v8vm/v8/; make deploy; cd ../../..

6. 获取snapshot

    cd /data/.iost/
    wget http://archive.iost.io/snapshot/storage.tar
    tar -xvf storage.tar
    rm storage.tar

7. 获取配置

    mkdir -p /data/.iost
    wget https://developers.iost.io/docs/assets/mainnet/latest/genesis.tgz
    tar zvfx genesis.tgz
    wget https://developers.iost.io/docs/assets/mainnet/latest/iserver.yml

8. 修改iserver.yml文件

    sed -i 's//var/lib/iserver//data/.iost/g' iserver.yml 

9. 添加supervisor监控

        [program:iost-server]
        directory       = /data/.iost
        command         = iserver -f iserver.yml
        directory 	= /data/.iost
        autostart       = true
        autorestart     = true
        stdout_logfile  = /var/log/iost-server.log
        redirect_stderr = true

10. 参考

原文地址:https://www.cnblogs.com/yueyun00/p/12202907.html