Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyring migrate command doc #8979

Merged
merged 17 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/migrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ This folder contains all the migration guides to update your app and modules to
1. [App and Modules Migration](./app_and_modules.md)
1. [Chain Upgrade Guide to v0.40](./chain-upgrade-guide-040.md)
1. [REST Endpoints Migration](./rest.md)
1. [Keyring Migration](./keyring.md)
24 changes: 24 additions & 0 deletions docs/migrations/keyring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
order: 4
-->
# Keyring Migrate Quick Start
amaury1093 marked this conversation as resolved.
Show resolved Hide resolved

`keyring` is the SDK's mechanism for managing private/public keypair. Cosmos SDK v0.42 (Stargate) introduced some breaking changes in the keyring. Upgrading your chain from <=v0.39 to Stargate requires you to migrate your keys inside the `keyring` to the latest version. For more detailed information about the keyring, you can read [the keyring guide](../run-node/keyring.md)
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved

This guide describes how to perform the keyring migration process.
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved

The migration process is handled by the following CLI command:
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved

```bash
Usage
simd keys migrate <old_home_dir>
```

This command migrates key information from the legacy (db-based) Keybase to the new [keyring](https://github.com/99designs/keyring)-based Keyring. The legacy Keybase used to persist keys in a LevelDB database stored in a 'keys' sub-directory of the old client application home directory **old_home_dir**, e.g. `$HOME/.gaiacli/keys/` for [Gaia](https://github.com/cosmos/gaia).
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved

For each key material entry, the command will prompt if the key should be skipped or not. If the key is not to be skipped, the passphrase must be entered. The key will only be migrated if the passphrase is correct. Otherwise, the command will exit and migration must be repeated.
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved

The `migrate` CLI commands takes the following flags:
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved
- `--dry-run` boolean flag. If it is set to false, it runs the migration without actually persisting any changes to the new Keybase. If it is set to true, it persists keys. This flag is useful for testing purposes: we recommend you to dry run the migration once before running it persistently.
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved
- `--keyring-backend` string flag. It allows you to select a backend. For more detailed information about the available backends, you can read [the keyring guide](../run-node/keyring.md).
cyberbono3 marked this conversation as resolved.
Show resolved Hide resolved