Skip to content

Instantly share code, notes, and snippets.

@jim380
Created August 1, 2020 06:10
Show Gist options
  • Save jim380/55bf5dbac22de22ad2aec19d7516aa88 to your computer and use it in GitHub Desktop.
Save jim380/55bf5dbac22de22ad2aec19d7516aa88 to your computer and use it in GitHub Desktop.
Genesis Verification
  1. $ certikd export --height <height> --for-zero-height > exported_genesis.json
  2. Change chain_id (or other parameters that need to be changed) in exported_genesis.json
  3. Download the proposed genesis file by the CertiK Foundation and save as proposed_genesis.json
  4. Sort the keys in both genesis files (export is non-deterministic)
$ jq . --sort-keys proposed_genesis.json > sorted_proposed_genesis.json
$ jq . --sort-keys exported_genesis.json > sorted_exported_genesis.json
  1. Verify if the sha512sum hashes match
$ sha512sum sorted_exported_genesis.json
$ sha512sum sorted_proposed_genesis.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment