Skip to content

Instantly share code, notes, and snippets.

@jackzampolin
Created July 2, 2018 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackzampolin/7f83dbb05972902ff2d07d564e848443 to your computer and use it in GitHub Desktop.
Save jackzampolin/7f83dbb05972902ff2d07d564e848443 to your computer and use it in GitHub Desktop.
Upgrading from `gaia-6002` to `gaia-7000`

Upgrading from gaia-6002 to gaia-7000

There was a change in the format of the ~/.gaiad/config/priv_key.json in the latest release of Tendermint core (through go-amino).

To switch your key to the new format you will need to change three type fields from random strings to human readable names. The following fields need to be changed:

.pub_key.type        -> tendermint/PubKeyEd25519
.last_signature.type -> tendermint/SignatureEd25519
.priv_key.type       -> tendermint/PrivKeyEd25519

Examples of new and old files are below:

OLD FORMAT ~/.gaiad/config/priv_validator.json

{
  "address": "3932BFD12BC9584ECCBE38F9CCFA97FA173CC873",
  "pub_key": {
    "type": "AC26791624DE60",
    "value": "wSTygw+OfryqInQu0xVS3rGTnSjBXjWC8jHY/TzgvSE="
  },
  "last_height": 519423,
  "last_round": 0,
  "last_step": 3,
  "last_signature": {
    "type": "6BF5903DA1DB28",
    "value": "Q4xlUcJVyRGHj7VB3kY2amy7v+hANPCY4NKHGj7EKVHAteJdPwAYnQeZjBXfxG5q1gbc/uKC8iDuf1iGjJqDDg=="
  },
  "last_signbytes": "7B2240636861696E5F6964223A22676169612D36303032222C224074797065223A22766F7465222C22626C6F636B5F
6964223A7B7D2C22686569676874223A3531393432332C22726F756E64223A302C2274696D657374616D70223A22323031382D30362D3237543
0373A33323A35312E3130395A222C2274797065223A327D",
  "priv_key": {
    "type": "954568A3288910",
    "value": "ATGo9d0Xxu4idtmDbQqgpnNSw1dPz6MVW+TlibVEZGTBJPKDD45+vKoidC7TFVLesZOdKMFeNYLyMdj9POC9IQ=="
  }
}

NEW FORMAT ~/.gaiad/config/priv_validator.json

{
  "address": "3932BFD12BC9584ECCBE38F9CCFA97FA173CC873",
  "pub_key": {
    "type": "tendermint/PubKeyEd25519",
    "value": "wSTygw+OfryqInQu0xVS3rGTnSjBXjWC8jHY/TzgvSE="
  },
  "last_height": 519423,
  "last_round": 0,
  "last_step": 3,
  "last_signature": {
    "type": "tendermint/SignatureEd25519",
    "value": "Q4xlUcJVyRGHj7VB3kY2amy7v+hANPCY4NKHGj7EKVHAteJdPwAYnQeZjBXfxG5q1gbc/uKC8iDuf1iGjJqDDg=="
  },
  "last_signbytes": "7B2240636861696E5F6964223A22676169612D36303032222C224074797065223A22766F7465222C22626C6F636B5F
6964223A7B7D2C22686569676874223A3531393432332C22726F756E64223A302C2274696D657374616D70223A22323031382D30362D3237543
0373A33323A35312E3130395A222C2274797065223A327D",
  "priv_key": {
    "type": "tendermint/PrivKeyEd25519",
    "value": "ATGo9d0Xxu4idtmDbQqgpnNSw1dPz6MVW+TlibVEZGTBJPKDD45+vKoidC7TFVLesZOdKMFeNYLyMdj9POC9IQ=="
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment