migrate

package
v1.0.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

README

Migrate IRISHub to v1.0.0 from v0.16.3

1. Export genesis file

Stop irishub v0.16.3 daemon and use irishub v0.16.3 to export mainnet state genesis with --for-zero-height at the upgrade block height

iris export --home [v0.16.3_node_home] --height [upgrade-height] --for-zero-height

2. Migrate genesis file

Migrate the exported genesis.json with irishub v1.0.0

iris migrate genesis.json --chain-id irishub-1 > genesis_v1.0.0.json

Check if md5 is correct

md5sum genesis_v1.0.0.json

3. Initialize new node

Initialize the new node with irishub v1.0.0

iris init [moniker] --home [v1.0.0_node_home]

4. Migrate privkey file

Migrate privkey file with irishub v1.0.0

go run migrate/scripts/privValUpgrade.go [v0.16.3_node_home]/config/priv_validator.json [v1.0.0_node_home]/config/priv_validator_key.json [v1.0.0_node_home]/data/priv_validator_state.json

5. Migrate node key file

Migrate node key file with irishub v1.0.0

cp [v0.16.3_node_home]/config/node_key.json [v1.0.0_node_home]/config/node_key.json

6. Copy migrated genesis file

Copy genesis_v1.0.0.json to new node home

cp genesis_v1.0.0.json [v1.0.0_node_home]/config/genesis.json

7. Config new node

Configure minimum-gas-prices in [v1.0.0_node_home]/config/app.toml


# The minimum gas prices a validator is willing to accept for processing a
# transaction. A transaction's fees must meet the minimum of any denomination
# specified in this config (e.g. 0.25token1;0.0001token2).
minimum-gas-prices = "0.2uiris"

Copy persistent_peers in [v0.16.3_node_home]/config/config.toml to [v1.0.0_node_home]/config/config.toml


# Comma separated list of nodes to keep persistent connections to
persistent_peers = ""

And configure other fields refer to [v0.16.3_node_home]/config/config.toml

8. Start new node

Start new node with irishub v1.0.0

iris unsafe-reset-all --home [v1.0.0_node_home]
iris start --home [v1.0.0_node_home]

Documentation

Index

Constants

View Source
const (
	IRISATTO = "iris-atto"
	UIRIS    = "uiris"
)

Variables

View Source
var Precision = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(12), nil))

Functions

func Migrate

func Migrate(cdc codec.JSONMarshaler, initialState v0_16.GenesisFileState) (appState map[string]json.RawMessage)

func MigrateGenesisCmd

func MigrateGenesisCmd() *cobra.Command

MigrateGenesisCmd returns a command to execute genesis state migration.

Types

type SigningInfoSlice

type SigningInfoSlice []slashingtypes.SigningInfo

func (SigningInfoSlice) Len

func (s SigningInfoSlice) Len() int

func (SigningInfoSlice) Less

func (s SigningInfoSlice) Less(i, j int) bool

func (SigningInfoSlice) Swap

func (s SigningInfoSlice) Swap(i, j int)

Directories

Path Synopsis
gov

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL