From 184ef2ad4127517828a4a04cc2c51594b66ac012 Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Mon, 17 Jan 2022 09:59:51 -0700 Subject: [PATCH] feat: add instructions for testing migration file hash (#1143) * feat: add instructions for testing migration file hash * fix: sort json before hashing --- migrate/v0_16/testing_genesis_hash.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 migrate/v0_16/testing_genesis_hash.md diff --git a/migrate/v0_16/testing_genesis_hash.md b/migrate/v0_16/testing_genesis_hash.md new file mode 100644 index 00000000..64130078 --- /dev/null +++ b/migrate/v0_16/testing_genesis_hash.md @@ -0,0 +1,21 @@ +### Testing kava-9 migration +To verify that the migration procedure for kava-9 is deterministic, run the following commands to compute the genesis hash of a known block. + +```sh +# install latest v0.16 release candidate +cd $HOME/kava # replace if location of kava directory is different +git fetch +git checkout v0.16.0-rc3 +make install +cd $HOME + +# download block 1627000 from kava-8 +wget https://kava-genesis-files.s3.amazonaws.com/kava-8/block-export-1627000.json + +# run the migration (make sure there are no other kava processes running) +kava migrate block-export-1627000.json > block-export-1627000-migrated.json + +# calculate hash of migrated file +jq -S -c -M '' block-export-1627000-migrated.json | shasum -a 256 +``` +