v2

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: LGPL-3.0 Imports: 28 Imported by: 0

README

Upgrade v2.0.0 Test

Environment Requirements

  • OS: Mac or Linux
  • Golang: 1.20+
  • Node.js: 14+
  • Docker: 24+

Test Steps

git clone https://github.com/cvn-network/cvn.git
cd cvn
git checkout release/v1.0.x
make install
# check cvn version, should be release/v1.0.x-101a8cfb
cvnd version

# build cvn-cosmovisor image
git checkout release/v2.0.x
docker build -f ./cmd/cosmovisor/Dockerfile -t ghcr.io/cvn-network/cvn-cosmovisor:2.0.0 .

./app/upgrades/v2/test.sh run_cvn_node
./app/upgrades/v2/test.sh show_node_version

# open another terminal && cd cvn
./app/upgrades/v2/test.sh show_inflation_rate
./app/upgrades/v2/test.sh show_inflation_distribution
./app/upgrades/v2/test.sh show_base_fee
./app/upgrades/v2/test.sh show_slashing_signed_blocks_window
./app/upgrades/v2/test.sh show_gov_module_account

# open another terminal && cd cvn
./app/upgrades/v2/test.sh deploy_soul_contract
./app/upgrades/v2/test.sh submit_register_erc20_proposal_and_vote <soul-contract-address>
# if you see `"status": "PROPOSAL_STATUS_PASSED"`, then proposal passed
./app/upgrades/v2/test.sh show_proposal_status
# await for proposal to pass
./app/upgrades/v2/test.sh show_erc20_token_pairs
./app/upgrades/v2/test.sh show_metadata

# open another terminal && cd cvn
./app/upgrades/v2/test.sh submit_upgrade_proposal_and_vote
# if you see `"status": "PROPOSAL_STATUS_PASSED"`, then proposal passed
./app/upgrades/v2/test.sh show_proposal_status
# await for proposal to pass
# check node logs, await for upgrade
# if you see `ERR UPGRADE "v2" NEEDED at height: xxx` and `ERR CONSENSUS FAILURE!!!`, then upgrade plan is working,
# and the node will be restarted automatically use the new binary,
# and you can see the new version in the node logs
# finally, you can see `INF executed block height=xxx`, then upgrade done

# open another terminal && cd cvn
make install
# check cvn version, should be release/v2.0.x-xxx
cvnd version
./app/upgrades/v2/test.sh show_inflation_rate
./app/upgrades/v2/test.sh show_inflation_distribution
./app/upgrades/v2/test.sh show_base_fee
./app/upgrades/v2/test.sh show_slashing_signed_blocks_window

./app/upgrades/v2/test.sh show_erc20_token_pairs
./app/upgrades/v2/test.sh show_metadata

# open another terminal && cd cvn
./app/upgrades/v2/test.sh withdraw_rewards
./app/upgrades/v2/test.sh show_balance <soul-contract-address> <from-address>

Documentation

Index

Constants

View Source
const UpgradeName = "v2.0.0"

Variables

This section is empty.

Functions

func CreateUpgradeHandler

func CreateUpgradeHandler(
	mm *module.Manager,
	configurator module.Configurator,
	bank bankkeeper.Keeper,
	inflation inflationkeeper.Keeper,
	slashing slashingkeeper.Keeper,
	feeMarket feemarketkeeper.Keeper,
	erc20 erc20keeper.Keeper,
	auth authkeeper.AccountKeeper,
	kvStoreKey kvStoreKey,
) upgradetypes.UpgradeHandler

CreateUpgradeHandler creates an SDK upgrade handler for v2.0.0

func PreUpgradeCommand

func PreUpgradeCommand() *cobra.Command

Types

type Upgrade

type Upgrade struct {
	// contains filtered or unexported fields
}

func NewUpgrade

func NewUpgrade(
	logger log.Logger, bank bankkeeper.Keeper, inflation inflationkeeper.Keeper,
	slashing slashingkeeper.Keeper, feeMarket feemarketkeeper.Keeper, erc20 erc20keeper.Keeper,
	auth authkeeper.AccountKeeper, kvStoreKey kvStoreKey,
) Upgrade

func (Upgrade) UpdateGovModuleAccountPermissions

func (u Upgrade) UpdateGovModuleAccountPermissions(ctx sdk.Context)

func (Upgrade) UpdateMetadata

func (u Upgrade) UpdateMetadata(ctx sdk.Context)

func (Upgrade) UpdateModuleParam

func (u Upgrade) UpdateModuleParam(ctx sdk.Context)

func (Upgrade) UpdateSoulTokenPair

func (u Upgrade) UpdateSoulTokenPair(ctx sdk.Context)

Jump to

Keyboard shortcuts

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