Skip to main content

Hard Fork sentinelhub-2

Hardfork upgrade from blockchain sentinelhub-1 to sentinelhub-2

Upgrade #Binary VersionBlock HeightCommit Hash
sentinelhub-2v0.6.2901,8004cd6b2b

Set halt block height

  • Open the file ${HOME}/.sentinelhubd/config/app.toml with a text editor

  • Set the value halt-height = 901800

  • Save and close the file

  • Restart the Sentinel Hub daemon

  • Wait until the blockchain halt

Warning

Follow the next steps only after the blockchain halt!

Export the state

Verify the software version

sentinelhubd version --long
Note

Commit hash must be 1aed4ffff291f6cec7e3768806bebef4e9f4442c

Export the Blockchain state

HALT_HEIGHT=901800

sentinelhubd export --height ${HALT_HEIGHT} > ${HOME}/${HALT_HEIGHT}.json

Verify the SHA256 of the JSON file

jq -cSM '' ${HOME}/${HALT_HEIGHT}.json | sha256sum
Note

Exported Genesis file hash must be e519a0dbb7e7e177c72965c0f7cd8507a537548f56e696c44bd01360424137ad

Install the new software

Clone the source code

VERSION=v0.6.2
BASE_DIRECTORY=${GOPATH}/src/github.com/sentinel-official

rm -rf ${BASE_DIRECTORY}/hub/ && mkdir -p ${BASE_DIRECTORY} && cd ${BASE_DIRECTORY}/ && \
git clone https://github.com/sentinel-official/sentinelhub.git && cd ${BASE_DIRECTORY}/hub/ && \
git checkout ${VERSION}

Build and install the software

make install

Migrate the state

Verify the software version

sentinelhub version --long
Note

Commit hash must be 4cd6b2bb3609b6ca86414d50216568e90b847c28

Migrate the exported Blockchain state

CHAIN_ID=sentinelhub-2
GENESIS_TIME=2021-05-29T14:30:00Z
INITIAL_HEIGHT=901801

sentinelhub migrate \
--chain-id=${CHAIN_ID} \
--genesis-time=${GENESIS_TIME} \
--initial-height=${INITIAL_HEIGHT} \
${HALT_HEIGHT}.json > ${HOME}/genesis.json

Verify the SHA256 of the JSON file

jq -cSM '' ${HOME}/genesis.json | sha256sum
Note

Migreated Genesis file hash must be 1dbcd7d58845b4b0696d31daafa2096bb3d729e51f8e8fa17e9e73eda1376382

Setup

Initialize the chain configuration files

MONIKER=

sentinelhub init ${MONIKER} \
--chain-id ${CHAIN_ID}

Copy validator node and consensus private keys

FROM_DIR=${HOME}/.sentinelhubd/config
TO_DIR=${HOME}/.sentinelhub/config

cp ${FROM_DIR}/node_key.json ${TO_DIR}/node_key.json
cp ${FROM_DIR}/priv_validator_key.json ${TO_DIR}/priv_validator_key.json

Copy migrated Genesis file

cp ${HOME}/genesis.json ${TO_DIR}/genesis.json

Set minimun gas prices

  • Open the file ${HOME}/.sentinelhub/config/app.toml
  • Go to the line which contains the field minimum-gas-prices = ""
  • Change the value to minimum-gas-prices = "0.1udvpn"
  • Save the file

Set Peers and Seeds

  • Open the file ${HOME}/.sentinelhub/config/config.toml
  • Go to the line which contains the field persistent_peers = ""
  • Insert the below node addresses
  • Go to the line which contains the field seeds = ""
  • Insert the below node addresses
  • Save the file

Start

Start the Sentinel Hub daemon

sentinelhub start