8000 upgrade evmos module by facs95 · Pull Request #815 · evmos/evmos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

upgrade evmos module #815

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

Merged
merged 9 commits into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v7.0.0] - 2002-08-04

### State Machine Breaking

- () []()

## [v6.0.4] - 2002-08-03

### Improvements

- (deps) [\#819](https://github.com/evmos/evmos/pull/819) Bump ibc-go version to [`v3.1.1`](https://github.com/cosmos/ibc-go/releases/tag/v3.1.1)

### Bug Fixes

- (app) [\#820](https://github.com/evmos/evmos/pull/820) Set fork upgrade block height for `v7.0.0`

## [v6.0.3] - 2002-07-26

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
ethante "github.com/evmos/ethermint/app/ante"
evmtypes "github.com/evmos/ethermint/x/evm/types"

vestingtypes "github.com/evmos/evmos/v6/x/vesting/types"
vestingtypes "github.com/evmos/evmos/v7/x/vesting/types"
)

// HandlerOptions defines the list of module keepers required to run the Evmos
Expand Down
4 changes: 2 additions & 2 deletions app/ante/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/evmos/ethermint/encoding"
evmtypes "github.com/evmos/ethermint/x/evm/types"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"
"github.com/evmos/evmos/v6/app"
claimstypes "github.com/evmos/evmos/v6/x/claims/types"
"github.com/evmos/evmos/v7/app"
claimstypes "github.com/evmos/evmos/v7/x/claims/types"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/tmhash"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
Expand Down
2 changes: 1 addition & 1 deletion app/ante/vesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/authz"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
evmtypes "github.com/evmos/ethermint/x/evm/types"
vestingtypes "github.com/evmos/evmos/v6/x/vesting/types"
vestingtypes "github.com/evmos/evmos/v7/x/vesting/types"
)

// EthVestingTransactionDecorator validates if clawback vesting accounts are
Expand Down
74 changes: 44 additions & 30 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,36 +105,37 @@ import (
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

// unnamed import of statik for swagger UI support
_ "github.com/evmos/evmos/v6/client/docs/statik"

"github.com/evmos/evmos/v6/app/ante"
v2 "github.com/evmos/evmos/v6/app/upgrades/v2"
v4 "github.com/evmos/evmos/v6/app/upgrades/v4"
v5 "github.com/evmos/evmos/v6/app/upgrades/v5"
v6 "github.com/evmos/evmos/v6/app/upgrades/v6"
"github.com/evmos/evmos/v6/x/claims"
claimskeeper "github.com/evmos/evmos/v6/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v6/x/claims/types"
"github.com/evmos/evmos/v6/x/epochs"
epochskeeper "github.com/evmos/evmos/v6/x/epochs/keeper"
epochstypes "github.com/evmos/evmos/v6/x/epochs/types"
"github.com/evmos/evmos/v6/x/erc20"
erc20client "github.com/evmos/evmos/v6/x/erc20/client"
erc20keeper "github.com/evmos/evmos/v6/x/erc20/keeper"
erc20types "github.com/evmos/evmos/v6/x/erc20/types"
"github.com/evmos/evmos/v6/x/incentives"
incentivesclient "github.com/evmos/evmos/v6/x/incentives/client"
incentiveskeeper "github.com/evmos/evmos/v6/x/incentives/keeper"
incentivestypes "github.com/evmos/evmos/v6/x/incentives/types"
"github.com/evmos/evmos/v6/x/inflation"
inflationkeeper "github.com/evmos/evmos/v6/x/inflation/keeper"
inflationtypes "github.com/evmos/evmos/v6/x/inflation/types"
"github.com/evmos/evmos/v6/x/recovery"
recoverykeeper "github.com/evmos/evmos/v6/x/recovery/keeper"
recoverytypes "github.com/evmos/evmos/v6/x/recovery/types"
"github.com/evmos/evmos/v6/x/vesting"
vestingkeeper "github.com/evmos/evmos/v6/x/vesting/keeper"
vestingtypes "github.com/evmos/evmos/v6/x/vesting/types"
_ "github.com/evmos/evmos/v7/client/docs/statik"

"github.com/evmos/evmos/v7/app/ante"
v2 "github.com/evmos/evmos/v7/app/upgrades/v2"
v4 "github.com/evmos/evmos/v7/app/upgrades/v4"
v5 "github.com/evmos/evmos/v7/app/upgrades/v5"
v6 "github.com/evmos/evmos/v7/app/upgrades/v6"
v7 "github.com/evmos/evmos/v7/app/upgrades/v7"
"github.com/evmos/evmos/v7/x/claims"
claimskeeper "github.com/evmos/evmos/v7/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v7/x/claims/types"
"github.com/evmos/evmos/v7/x/epochs"
epochskeeper "github.com/evmos/evmos/v7/x/epochs/keeper"
epochstypes "github.com/evmos/evmos/v7/x/epochs/types"
"github.com/evmos/evmos/v7/x/erc20"
erc20client "github.com/evmos/evmos/v7/x/erc20/client"
erc20keeper "github.com/evmos/evmos/v7/x/erc20/keeper"
erc20types "github.com/evmos/evmos/v7/x/erc20/types"
"github.com/evmos/evmos/v7/x/incentives"
incentivesclient "github.com/evmos/evmos/v7/x/incentives/client"
incentiveskeeper "github.com/evmos/evmos/v7/x/incentives/keeper"
incentivestypes "github.com/evmos/evmos/v7/x/incentives/types"
"github.com/evmos/evmos/v7/x/inflation"
inflationkeeper "github.com/evmos/evmos/v7/x/inflation/keeper"
inflationtypes "github.com/evmos/evmos/v7/x/inflation/types"
"github.com/evmos/evmos/v7/x/recovery"
recoverykeeper "github.com/evmos/evmos/v7/x/recovery/keeper"
recoverytypes "github.com/evmos/evmos/v7/x/recovery/types"
"github.com/evmos/evmos/v7/x/vesting"
vestingkeeper "github.com/evmos/evmos/v7/x/vesting/keeper"
vestingtypes "github.com/evmos/evmos/v7/x/vesting/types"
)

func init() {
Expand Down Expand Up @@ -1054,6 +1055,17 @@ func (app *Evmos) setupUpgradeHandlers() {
),
)

// v7 upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(
v7.UpgradeName,
v7.CreateUpgradeHandler(
app.mm, app.configurator,
app.BankKeeper,
app.InflationKeeper,
app.ClaimsKeeper,
),
)

// When a planned update height is reached, the old binary will panic
// writing on disk the height and name of the update that triggered it
// This will read that value, and execute the preparations for the upgrade.
Expand All @@ -1077,6 +1089,8 @@ func (app *Evmos) setupUpgradeHandlers() {
// no store upgrades in v5
case v6.UpgradeName:
// no store upgrades in v6
case v7.UpgradeName:
// no store upgrades in v7
}

if storeUpgrades != nil {
Expand Down
2 changes: 1 addition & 1 deletion app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
dbm "github.com/tendermint/tm-db"

"github.com/evmos/ethermint/encoding"
"github.com/evmos/evmos/v6/types"
"github.com/evmos/evmos/v7/types"
)

func TestEvmosExport(t *testing.T) {
Expand Down
10 changes: 7 additions & 3 deletions app/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

v2 "github.com/evmos/evmos/v6/app/upgrades/v2"
v4 "github.com/evmos/evmos/v6/app/upgrades/v4"
"github.com/evmos/evmos/v6/types"
v2 "github.com/evmos/evmos/v7/app/upgrades/v2"
v4 "github.com/evmos/evmos/v7/app/upgrades/v4"
v7 "github.com/evmos/evmos/v7/app/upgrades/v7"
"github.com/evmos/evmos/v7/types"
)

// ScheduleForkUpgrade executes any necessary fork logic for based upon the current
Expand Down Expand Up @@ -37,6 +38,9 @@ func (app *Evmos) ScheduleForkUpgrade(ctx sdk.Context) {
case v4.MainnetUpgradeHeight:
upgradePlan.Name = v4.UpgradeName
upgradePlan.Info = v4.UpgradeInfo
case v7.MainnetUpgradeHeight:
upgradePlan.Name = v7.UpgradeName
upgradePlan.Info = v7.UpgradeInfo
default:
// No-op
return
Expand Down
4 changes: 2 additions & 2 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/evmos/ethermint/encoding"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/evmos/evmos/v6/cmd/config"
"github.com/evmos/evmos/v6/types"
"github.com/evmos/evmos/v7/cmd/config"
"github.com/evmos/evmos/v7/types"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v2/upgrades.go
F438
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

claimstypes "github.com/evmos/evmos/v6/x/claims/types"
erc20types "github.com/evmos/evmos/v6/x/erc20/types"
claimstypes "github.com/evmos/evmos/v7/x/claims/types"
erc20types "github.com/evmos/evmos/v7/x/erc20/types"
)

// CreateUpgradeHandler creates an SDK upgrade handler for v2
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v4/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
ibcclientkeeper "github.com/cosmos/ibc-go/v3/modules/core/02-client/keeper"
ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"

"github.com/evmos/evmos/v6/types"
"github.com/evmos/evmos/v7/types"
)

// CreateUpgradeHandler creates an SDK upgrade handler for v4
Expand Down
4 changes: 2 additions & 2 deletions app/upgrades/v4/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"github.com/evmos/ethermint/crypto/ethsecp256k1"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/evmos/evmos/v6/app"
v4 "github.com/evmos/evmos/v6/app/upgrades/v4"
"github.com/evmos/evmos/v7/app"
v4 "github.com/evmos/evmos/v7/app/upgrades/v4"
)

type UpgradeTestSuite struct {
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v5/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
feemarketv011 "github.com/evmos/ethermint/x/feemarket/migrations/v011"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/evmos/evmos/v6/types"
claimskeeper "github.com/evmos/evmos/v6/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v6/x/claims/types"
"github.com/evmos/evmos/v7/types"
claimskeeper "github.com/evmos/evmos/v7/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v7/x/claims/types"
)

// TestnetDenomMetadata defines the metadata for the tEVMOS denom on testnet
Expand Down
10 changes: 5 additions & 5 deletions app/upgrades/v5/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (

ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"

"github.com/evmos/evmos/v6/app"
v5 "github.com/evmos/evmos/v6/app/upgrades/v5"
evmostypes "github.com/evmos/evmos/v6/types"
claimskeeper "github.com/evmos/evmos/v6/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v6/x/claims/types"
"github.com/evmos/evmos/v7/app"
v5 "github.com/evmos/evmos/v7/app/upgrades/v5"
evmostypes "github.com/evmos/evmos/v7/types"
claimskeeper "github.com/evmos/evmos/v7/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v7/x/claims/types"
)

type UpgradeTestSuite struct {
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v6/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
evmtypes "github.com/evmos/ethermint/x/evm/types"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

v5 "github.com/evmos/evmos/v6/app/upgrades/v5"
"github.com/evmos/evmos/v6/types"
claimskeeper "github.com/evmos/evmos/v6/x/claims/keeper"
v5 "github.com/evmos/evmos/v7/app/upgrades/v5"
"github.com/evmos/evmos/v7/types"
claimskeeper "github.com/evmos/evmos/v7/x/claims/keeper"
)

// CreateUpgradeHandler creates an SDK upgrade handler for v5
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/v6/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"github.com/evmos/ethermint/crypto/ethsecp256k1"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/evmos/evmos/v6/app"
v6 "github.com/evmos/evmos/v6/app/upgrades/v6"
evmostypes "github.com/evmos/evmos/v6/types"
"github.com/evmos/evmos/v7/app"
v6 "github.com/evmos/evmos/v7/app/upgrades/v6"
evmostypes "github.com/evmos/evmos/v7/types"
)

type UpgradeTestSuite struct {
Expand Down
22 changes: 22 additions & 0 deletions app/upgrades/v7/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package v7

const (
// UpgradeName is the shared upgrade plan name for mainnet and testnet
UpgradeName = "v7.0.0"
// MainnetUpgradeHeight defines the Evmos mainnet block height on which the upgrade will take place
MainnetUpgradeHeight = 2_476_000
// TestnetUpgradeHeight defines the Evmos testnet block height on which the upgrade will take place
TestnetUpgradeHeight = 2_176_500 // TODO:
// UpgradeInfo defines the binaries that will be used for the upgrade
UpgradeInfo = `'{"binaries":{"darwin/arm64":"https://github.com/evmos/evmos/releases/download/v7.0.0/evmos_7.0.0_Darwin_arm64.tar.gz","darwin/x86_64":"https://github.com/evmos/evmos/releases/download/v7.0.0/evmos_7.0.0_Darwin_x86_64.tar.gz","linux/arm64":"https://github.com/evmos/evmos/releases/download/v7.0.0/evmos_7.0.0_Linux_arm64.tar.gz","linux/x86_64":"https://github.com/evmos/evmos/releases/download/v7.0.0/evmos_7.0.0_Linux_x86_64.tar.gz","windows/x86_64":"https://github.com/evmos/evmos/releases/download/v7.0.0/evmos_7.0.0_Windows_x86_64.zip"}}'`

// FaucetAddressFrom is the inaccessible secp address of the Testnet Faucet
FaucetAddressFrom = "evmos1z4ya98ga2xnffn2mhjym7tzlsm49ec23890sze"
// FaucetAddressTo is the new eth_secp address of the Testnet Faucet
FaucetAddressTo = "evmos1ujm4z5v9zkdqm70xnptr027gqu90f7lxjr0fch"

// ContributorAddrFrom is the lost address of an early contributor
ContributorAddrFrom = "evmos1659xwt0hnu5humgek7scefhnpcm2w6hyvy4fsq"
// ContributorAddrTo is the new address of an early contributor
ContributorAddrTo = "evmos1pktlmqrz448cuazl98tqmsj4kjwpqpmaa0cjcf"
)
Loading
0