github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/update-node.md (about)

     1  ### 1. Safely end the node process, otherwise it may damage the database.
     2  
     3  ```shell
     4  # ps -ef | grep fbchaind
     5  
     6  # sudo kill -2  ${pid}
     7  ```
     8  ### 2. Check if the node stops normally
     9  
    10  ```shell
    11  # sudo docker-compose logs -f --tail 100
    12  ```
    13  
    14  If exiting normally, the following log will be printed:
    15  
    16      fbchain    | E[2023-11-24|05:48:29.190][10] Stopping peer for error. module=p2p peer="Peer{MConn{43.198.41.15:26656} 5e05489a5ff1d61c8931ee2b7b35ef2a2ddb6e0f out}" err="read tcp 172.17.0.2:55224->43.198.41.15:26656: use of closed network connection"
    17      fbchain    | E[2023-11-24|05:48:29.192][10] Stopped accept routine, as transport is closed. module=p2p numPeers=0
    18      fbchain    | Close App
    19      fbchain    | I[2023-11-24|05:48:29.214][10] stopping iavl. module=iavl commitheight=16776857
    20      fbchain    | I[2023-11-24|05:48:29.215][10] CommitSchedule. module=iavl Height=16776857 Tree=acc IavlHeight=0 NodeNum=154 tpp=154 fss-add=12 fss-rm=0 trc="commitSchedule<0ms>, cacheNode<0ms>, Pruning<0ms>, batchSet-node<0ms>, batchSet-fss<0ms>, batchCommit<0ms>"
    21      fbchain    | I[2023-11-24|05:48:29.217][10] PruningSchedule. module=iavl Height=16773000 Tree=acc trc="pruningSchedule<2ms>, deleteVersion<1ms>, Commit<0ms>"
    22      fbchain    | I[2023-11-24|05:48:29.217][10] stopping iavl completed. module=iavl commitheight=16776857
    23      fbchain    | I[2023-11-24|05:48:29.220][10] stopping iavl. module=iavl commitheight=16776857
    24      fbchain    | I[2023-11-24|05:48:29.230][10] CommitSchedule. module=iavl Height=16776857 Tree=evm IavlHeight=0 NodeNum=1531 tpp=1531 fss-add=176 fss-rm=0 trc="commitSchedule<8ms>, cacheNode<1ms>, Pruning<0ms>, batchSet-node<2ms>, batchSet-fss<0ms>, batchCommit<4ms>"
    25      fbchain    | I[2023-11-24|05:48:29.256][10] PruningSchedule. module=iavl Height=16773000 Tree=evm trc="pruningSchedule<26ms>, deleteVersion<19ms>, Commit<6ms>"
    26      fbchain    | I[2023-11-24|05:48:29.256][10] stopping iavl completed. module=iavl commitheight=16776857
    27      fbchain    | I[2023-11-24|05:48:29.259][10] exiting.... module=main 
    28      fbchain exited with code 143
    29  
    30  ### To avoid unexpected situations where the node cannot be restored, it is recommended to rename the data directory ./fbchaind/data backup
    31  
    32  
    33  
    34  ### 4.  Modify the docker-compose.yml file
    35  
    36  ```shell
    37  
    38  # sudo vi docker-compose.yml 
    39  
    40  ```
    41  Note: This upgrade has modified the [image warehouse](https://hub.docker.com/search?q=eeebyte%2Ffullnode) and version number.
    42  
    43  If it is a **arm architecture server**
    44  - image: **eeebyte/fullnode-arm:v1.6.8.6**
    45  
    46  If it is a **x86 architecture server**
    47  - image: **eeebyte/fullnode-x86:v1.6.8.6**
    48  
    49  The following configuration is for reference and needs to be configured according to your own path.
    50  ```yml
    51      version: "3"
    52      services:
    53        fbchain:
    54          container_name: fbchain
    55          #Please confirm if the server architecture running the node is ARM or x86
    56          image: eeebyte/fullnode-arm:v1.6.8.6
    57          #restart: unless-stopped
    58          environment:
    59            - FBC_LOG_FILE=/root/logs/fbchaind.log
    60            - FBC_LOG_STDOUT=false
    61            #Please confirm again whether the database used by the node is Rocksdb or Goleveldb, and modify this field according to your own database type
    62            - FBC_DB_BACKEND=rocksdb
    63            - FBC_ELAPSED=DeliverTxs=2,Round=1,CommitRound=1,Produce=1
    64            - FBC_LOG_LEVEL=main:info,iavl:info,*:error,tx-receiver:info
    65            - FBC_NODE_MODE=val #archive, val, rpc
    66            - FBC_FAST_QUERY=true
    67            - FBC_DEBUG_API=false
    68            - FBC_MIN_GAS_PRICE=0.0000001fibo
    69            - FBC_ADDR_BOOK_STRICT=false
    70            - FBC_UNSAFE_CORS=true
    71            - FBC_PERSISTENT_PEERS=
    72          volumes:
    73            - ./fbchaind:/root/.fbchaind
    74            - ./logs:/root/logs
    75            - ./cli:/cli
    76          ports:
    77            - "26656:26656"
    78            - "26657:26657"
    79            - "26660:26660"
    80            - "8546:8546"
    81            - "8545:8545"
    82            - "6060:6060"
    83  ```
    84  ### 5. Update image
    85  ```shell
    86  sudo docker-compose pull 
    87  ```
    88  ### 6. Check the version number, the correct version number is v1.6.8.6
    89  ```
    90  # sudo ./cli/fbchaind  version
    91  v1.6.8.6
    92  ```
    93  ### 7. Starting node with a large amount of data may take several minutes to see the log results. Normal synchronization indicates successful updates.
    94  
    95  ```shell
    96  # docker-compose up -d
    97  # docker-compose logs -f --tail 100
    98  ```