Skip to content

Commit

Permalink
Evmos/release/v8.x.x (#61)
Browse files Browse the repository at this point in the history
* release: v8.0.0 changelog & upgrade heights (evmos#848)

* deps: bump tendermint `v0.34.21` (evmos#861)

* `v8.1.0` Release (evmos#875)

* `v8.1.0` Release changelog (evmos#877)

update changelog

* Upgrade handler (evmos#880)

* add v8.1 upgrade handler

* update constants

* update comment

* fix linter

* fix(app): implement hard fork logic for v8.2.0

* Revert "fix(app): implement hard fork logic for v8.2.0"

This reverts commit d2e248c.

* fix(app): implement hard fork logic for `v8.2.0` (evmos#922)

* fix(app): implement hard fork logic for v8.2.0

* update block height

* changelog

* chore(app): set upgrade height for v8.2.0 (evmos#934)

* change dependency path

Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
Co-authored-by: Tuan Pham Anh <baabeetaa@gmail.com>
Co-authored-by: Freddy Caceres <facs95@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
  • Loading branch information
5 people committed Sep 30, 2022
1 parent e52d765 commit 62a60da
Show file tree
Hide file tree
Showing 14 changed files with 130 additions and 23 deletions.
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ archives:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip
Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,25 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## Unreleased
## [v8.1.1] - 2022-09-23

### Bug Fixes

- (app) [\#922](https://github.com/evmos/evmos/pull/922) Add hard fork logic for `v8.2.0`

## [v8.1.0] - 2022-08-30

### State Machine Breaking

- (feesplit) [\#859](https://github.com/evmos/evmos/pull/859) Add amino codecs to `x/feesplit` module to support EIP-712 signatures.
- (deps) Bump Ethermint version to [`v0.19.2`](https://github.com/evmos/ethermint/releases/tag/v0.19.2)

## [v8.0.0] - 2022-08-16

### State Machine Breaking

- (deps) Bump Ethermint version to [`v0.19.0`](https://github.com/evmos/ethermint/releases/tag/v0.19.0)
- (feesplit) Add `x/feesplit` module

## [v8.0.0] - 2022-09-16

Expand Down
22 changes: 16 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,27 +107,29 @@ import (
// unnamed import of statik for swagger UI support
_ "github.com/pointnetwork/point-chain/v8/client/docs/statik"

"github.com/pointnetwork/point-chain/v8/app/ante"
"github.com/pointnetwork/point-chain/v8/app/ante"

v2 "github.com/pointnetwork/point-chain/v8/app/upgrades/v2"
v4 "github.com/pointnetwork/point-chain/v8/app/upgrades/v4"
v5 "github.com/pointnetwork/point-chain/v8/app/upgrades/v5"
v6 "github.com/pointnetwork/point-chain/v8/app/upgrades/v6"
v7 "github.com/pointnetwork/point-chain/v8/app/upgrades/v7"
v8 "github.com/pointnetwork/point-chain/v8/app/upgrades/v8"
v8 "github.com/pointnetwork/point-chain/v8/app/upgrades/v8"
v81 "github.com/pointnetwork/point-chain/v8/app/upgrades/v8_1"
"github.com/pointnetwork/point-chain/v8/x/claims"
claimskeeper "github.com/pointnetwork/point-chain/v8/x/claims/keeper"
claimstypes "github.com/pointnetwork/point-chain/v8/x/claims/types"
claimstypes "github.com/pointnetwork/point-chain/v8/x/claims/types"
"github.com/pointnetwork/point-chain/v8/x/epochs"
epochskeeper "github.com/pointnetwork/point-chain/v8/x/epochs/keeper"
epochstypes "github.com/pointnetwork/point-chain/v8/x/epochs/types"
"github.com/pointnetwork/point-chain/v8/x/erc20"
"github.com/pointnetwork/point-chain/v8/x/erc20"
erc20client "github.com/pointnetwork/point-chain/v8/x/erc20/client"
erc20keeper "github.com/pointnetwork/point-chain/v8/x/erc20/keeper"
erc20types "github.com/pointnetwork/point-chain/v8/x/erc20/types"
"github.com/pointnetwork/point-chain/v8/x/feesplit"
"github.com/pointnetwork/point-chain/v8/x/feesplit"
feesplitkeeper "github.com/pointnetwork/point-chain/v8/x/feesplit/keeper"
feesplittypes "github.com/pointnetwork/point-chain/v8/x/feesplit/types"
"github.com/pointnetwork/point-chain/v8/x/incentives"
"github.com/pointnetwork/point-chain/v8/x/incentives"
incentivesclient "github.com/pointnetwork/point-chain/v8/x/incentives/client"
incentiveskeeper "github.com/pointnetwork/point-chain/v8/x/incentives/keeper"
incentivestypes "github.com/pointnetwork/point-chain/v8/x/incentives/types"
Expand Down Expand Up @@ -1093,6 +1095,14 @@ func (app *Evmos) setupUpgradeHandlers() {
),
)

// v8.1 upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(
v81.UpgradeName,
v81.CreateUpgradeHandler(
app.mm, app.configurator,
),
)

// 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 Down
4 changes: 4 additions & 0 deletions app/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
v2 "github.com/pointnetwork/point-chain/v8/app/upgrades/v2"
v4 "github.com/pointnetwork/point-chain/v8/app/upgrades/v4"
v7 "github.com/pointnetwork/point-chain/v8/app/upgrades/v7"
v82 "github.com/pointnetwork/point-chain/v8/app/upgrades/v8_2"
"github.com/pointnetwork/point-chain/v8/types"
)

Expand Down Expand Up @@ -41,6 +42,9 @@ func (app *Evmos) ScheduleForkUpgrade(ctx sdk.Context) {
case v7.MainnetUpgradeHeight:
upgradePlan.Name = v7.UpgradeName
upgradePlan.Info = v7.UpgradeInfo
case v82.MainnetUpgradeHeight:
upgradePlan.Name = v82.UpgradeName
upgradePlan.Info = v82.UpgradeInfo
default:
// No-op
return
Expand Down
12 changes: 12 additions & 0 deletions app/upgrades/v8_1/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package v81

const (
// UpgradeName is the shared upgrade plan name for mainnet and testnet
UpgradeName = "v8.1.0"
// MainnetUpgradeHeight defines the Evmos mainnet block height on which the upgrade will take place
MainnetUpgradeHeight = 4_500_000
// TestnetUpgradeHeight defines the Evmos testnet block height on which the upgrade will take place
TestnetUpgradeHeight = 5_280_000
// UpgradeInfo defines the binaries that will be used for the upgrade
UpgradeInfo = `'{"binaries":{"darwin/arm64":"https://github.com/evmos/evmos/releases/download/v8.1.0/evmos_8.1.0_Darwin_arm64.tar.gz","darwin/x86_64":"https://github.com/evmos/evmos/releases/download/v8.1.0/evmos_8.1.0_Darwin_x86_64.tar.gz","linux/arm64":"https://github.com/evmos/evmos/releases/download/v8.1.0/evmos_8.1.0_Linux_arm64.tar.gz","linux/amd64":"https://github.com/evmos/evmos/releases/download/v8.1.0/evmos_8.1.0_Linux_x86_64.tar.gz","windows/x86_64":"https://github.com/evmos/evmos/releases/download/v8.1.0/evmos_8.1.0_Windows_x86_64.zip"}}'`
)
25 changes: 25 additions & 0 deletions app/upgrades/v8_1/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package v81

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

// CreateUpgradeHandler creates an SDK upgrade handler for v8.1
func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger().With("upgrade", UpgradeName)

// Refs:
// - https://docs.cosmos.network/master/building-modules/upgrade.html#registering-migrations
// - https://docs.cosmos.network/master/migrations/chain-upgrade-guide-044.html#chain-upgrade

// Leave modules are as-is to avoid running InitGenesis.
logger.Debug("running module migrations ...")
return mm.RunMigrations(ctx, configurator, vm)
}
}
10 changes: 10 additions & 0 deletions app/upgrades/v8_2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package v82

const (
// UpgradeName is the shared upgrade plan name for mainnet
UpgradeName = "v8.2.0"
// MainnetUpgradeHeight defines the Evmos mainnet block height on which the upgrade will take place
MainnetUpgradeHeight = 4_888_000
// UpgradeInfo defines the binaries that will be used for the upgrade
UpgradeInfo = `'{"binaries":{"darwin/amd64":"https://github.com/evmos/evmos/releases/download/v8.2.0/evmos_8.2.0_Darwin_arm64.tar.gz","darwin/x86_64":"https://github.com/evmos/evmos/releases/download/v8.2.0/evmos_8.2.0_Darwin_x86_64.tar.gz","linux/arm64":"https://github.com/evmos/evmos/releases/download/v8.2.0/evmos_8.2.0_Linux_arm64.tar.gz","linux/amd64":"https://github.com/evmos/evmos/releases/download/v8.2.0/evmos_8.2.0_Linux_amd64.tar.gz","windows/x86_64":"https://github.com/evmos/evmos/releases/download/v8.2.0/evmos_8.2.0_Windows_x86_64.zip"}}'`
)
2 changes: 1 addition & 1 deletion docs/validators/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ We officially support macOS, Windows and Linux only in the following architectur
* `darwin/arm64`
* `darwin/x86_64`
* `linux/arm64`
* `linux/x86_64`
* `linux/amd64`
* `windows/x86_64`

### Minimum Requirements
Expand Down
2 changes: 1 addition & 1 deletion docs/validators/upgrades/automated.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Cosmovisor will continually poll the `$DAEMON_HOME/data/upgrade-info.json` for n
"darwin/arm64": "https://github.com/pointnetwork/point-chain/releases/download/v3.0.0/evmos_3.0.0_Darwin_arm64.tar.gz",
"darwin/x86_64": "https://github.com/pointnetwork/point-chain/releases/download/v3.0.0/evmos_3.0.0_Darwin_x86_64.tar.gz",
"linux/arm64": "https://github.com/pointnetwork/point-chain/releases/download/v3.0.0/evmos_3.0.0_Linux_arm64.tar.gz",
"linux/x86_64": "https://github.com/pointnetwork/point-chain/releases/download/v3.0.0/evmos_3.0.0_Linux_x86_64.tar.gz",
"linux/amd64": "https://github.com/pointnetwork/point-chain/releases/download/v3.0.0/evmos_3.0.0_Linux_amd64.tar.gz",
"windows/x86_64": "https://github.com/pointnetwork/point-chain/releases/download/v3.0.0/evmos_3.0.0_Windows_x86_64.zip"
}
}
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/cosmos/ibc-go/v3 v3.2.0
github.com/ethereum/go-ethereum v1.10.19
github.com/evmos/ethermint v0.19.2
github.com/evmos/evmos/v8 v8.1.0
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc=
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
Expand Down Expand Up @@ -254,8 +255,6 @@ github.com/ethereum/go-ethereum v1.10.19 h1:EOR5JbL4MD5yeOqv8W2iC1s4NximrTjqFccU
github.com/ethereum/go-ethereum v1.10.19/go.mod h1:IJBNMtzKcNHPtllYihy6BL2IgK1u+32JriaTbdt4v+w=
github.com/evmos/ethermint v0.19.2 h1:9sPg+7my7jZqKYZcls1+r5pQRw9oZO77TsEqtDohp88=
github.com/evmos/ethermint v0.19.2/go.mod h1:pgPk2Anaw0cTwF7mRf0O+Zs4IjHLwkPpHZr6bTQbcWo=
github.com/evmos/evmos/v8 v8.1.0 h1:hecg4LxSODzEdyi2PkUFdcmxmJdToUpCOlduHDiZhuQ=
github.com/evmos/evmos/v8 v8.1.0/go.mod h1:nBcr2FCK49S5coy90wlauBZxOnHvIsSCC/q16bIfmX0=
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0=
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk=
Expand Down
4 changes: 3 additions & 1 deletion x/feesplit/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ func (AppModuleBasic) Name() string {

// RegisterLegacyAminoCodec performs a no-op as the fees do not support Amino
// encoding.
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {}
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
types.RegisterLegacyAminoCodec(cdc)
}

// ConsensusVersion returns the consensus state-breaking version for the module.
func (AppModuleBasic) ConsensusVersion() uint64 {
Expand Down
41 changes: 35 additions & 6 deletions x/feesplit/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,32 @@ import (
"github.com/cosmos/cosmos-sdk/types/msgservice"
)

// ModuleCdc references the global fees module codec. Note, the codec
// should ONLY be used in certain instances of tests and for JSON encoding.
//
// The actual codec used for serialization should be provided to
// modules/fees and defined at the application level.
var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
var (
amino = codec.NewLegacyAmino()

// ModuleCdc references the global erc20 module codec. Note, the codec should
// ONLY be used in certain instances of tests and for JSON encoding.
//
// The actual codec used for serialization should be provided to modules/erc20 and
// defined at the application level.
ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

// AminoCdc is a amino codec created to support amino JSON compatible msgs.
AminoCdc = codec.NewAminoCodec(amino)
)

const (
// Amino names
cancelFeeSplitName = "evmos/MsgCancelFeeSplit"
registerFeeSplitName = "evmos/MsgRegisterFeeSplit"
updateFeeSplitName = "evmos/MsgUpdateFeeSplit"
)

// NOTE: This is required for the GetSignBytes function
func init() {
RegisterLegacyAminoCodec(amino)
amino.Seal()
}

// RegisterInterfaces register implementations
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
Expand All @@ -25,3 +45,12 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {

msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
}

// RegisterLegacyAminoCodec registers the necessary x/feesplit interfaces and
// concrete types on the provided LegacyAmino codec. These types are used for
// Amino JSON serialization and EIP-712 compatibility.
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgCancelFeeSplit{}, cancelFeeSplitName, nil)
cdc.RegisterConcrete(&MsgRegisterFeeSplit{}, registerFeeSplitName, nil)
cdc.RegisterConcrete(&MsgUpdateFeeSplit{}, updateFeeSplitName, nil)
}
6 changes: 3 additions & 3 deletions x/feesplit/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (msg MsgRegisterFeeSplit) ValidateBasic() error {

// GetSignBytes encodes the message for signing
func (msg *MsgRegisterFeeSplit) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg))
}

// GetSigners defines whose signature is required
Expand Down Expand Up @@ -115,7 +115,7 @@ func (msg MsgCancelFeeSplit) ValidateBasic() error {

// GetSignBytes encodes the message for signing
func (msg *MsgCancelFeeSplit) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg))
}

// GetSigners defines whose signature is required
Expand Down Expand Up @@ -162,7 +162,7 @@ func (msg MsgUpdateFeeSplit) ValidateBasic() error {

// GetSignBytes encodes the message for signing
func (msg *MsgUpdateFeeSplit) GetSignBytes() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(msg))
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg))
}

// GetSigners defines whose signature is required
Expand Down

0 comments on commit 62a60da

Please sign in to comment.