Skip to content

Commit

Permalink
Merge branch 'evmos:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lehieuhust authored Nov 7, 2022
2 parents db889b0 + d5670af commit c7f941a
Show file tree
Hide file tree
Showing 245 changed files with 701 additions and 974 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
check-latest: true
- uses: technote-space/get-diff-action@v6.1.1
id: git_diff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
check-latest: true
- name: release dry run
run: make release-dry-run
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
# Required: setup-go, for all versions v3.0.0+ of golangci-lint
- uses: actions/setup-go@v3
with:
go-version: 1.18.3
go-version: 1.19
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
with:
Expand All @@ -27,7 +28,7 @@ jobs:
- uses: golangci/golangci-lint-action@v3.3.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.46.2
version: latest
args: --timeout 10m
github-token: ${{ secrets.github_token }}
# Check only if there are differences in the source code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.1
Expand Down
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ run:
linters:
enable:
# - bodyclose
- deadcode
- depguard
- dogsled
- dupl
Expand All @@ -32,7 +31,6 @@ linters:
- unconvert
# - unparam
- unused
- varcheck
# - nolintlint
- asciicheck
# - exhaustive
Expand Down Expand Up @@ -71,7 +69,7 @@ linters-settings:
require-explanation: false
require-specific: false
gofumpt:
lang-version: "1.18"
lang-version: "1.19"
gomodguard:
blocked:
versions: # List of blocked module version constraints
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,25 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

### State Machine Breaking

- (deps) [\#1041](https://github.com/evmos/evmos/pull/1041) Add ics23 dragonberry replace in go.mod as mentioned in the [Cosmos SDK release](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.4)
- (deps) [\#1037](https://github.com/evmos/evmos/pull/1037) Bump Ethermint version to [`v0.20.0-rc2`](https://github.com/evmos/ethermint/releases/tag/v0.20.0-rc2)

### API Breaking

- (erc20) [\#914](https://github.com/evmos/evmos/pull/914) Support registering multiple assets on `RegisterCoinProposal` and `RegisterERC20Proposal`

### Improvements

- (go) [\#1039](https://github.com/evmos/evmos/pull/1039) Bump go v1.19
- (deps) [\#1033](https://github.com/evmos/evmos/pull/1033) Bump Cosmos SDK to [`v0.46.4`](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.4)
- (ante) [\#993](https://github.com/evmos/evmos/pull/993) Re-order AnteHandlers for better performance
- (docs) [\#883](https://github.com/evmos/evmos/pull/883) Add Ethereum tx indexer documentation.
- (docs) [\#985](https://github.com/evmos/evmos/pull/985) Specify repo branch name on markdown-link-check configuration.
- (docs) [\#980](https://github.com/evmos/evmos/pull/980) Fix documentation links to cosmos-sdk docs.
- (cmd) [\#974](https://github.com/evmos/evmos/pull/974) Add `prune` command.
- (cmd) [\#1027](https://github.com/evmos/evmos/pull/1027) Apply Google CLI Syntax for required and optional args.

## [v9.1.0] - 2022-10-25

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.2-bullseye AS build-env
FROM golang:1.19.3-bullseye AS build-env

WORKDIR /go/src/github.com/evmos/evmos

Expand All @@ -9,7 +9,7 @@ COPY . .

RUN make build

FROM golang:1.19.2-bullseye
FROM golang:1.19.3-bullseye

RUN apt-get update -y
RUN apt-get install ca-certificates jq -y
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ lint-fix-contracts:
.PHONY: lint lint-fix

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name '*.pb.go' | xargs gofumpt -w -l
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name '*.pb.go' | xargs gofumpt -w -l

.PHONY: format

Expand Down Expand Up @@ -554,7 +554,7 @@ localnet-show-logstream:
###############################################################################

PACKAGE_NAME:=github.com/evmos/evmos
GOLANG_CROSS_VERSION = v1.18
GOLANG_CROSS_VERSION = v1.19
GOPATH ?= '$(HOME)/go'
release-dry-run:
docker run \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ parent:
Evmos is a scalable, high-throughput Proof-of-Stake blockchain that is fully compatible and
interoperable with Ethereum. It's built using the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/) which runs on top of [Tendermint Core](https://github.com/tendermint/tendermint) consensus engine.

**Note**: Requires [Go 1.18+](https://golang.org/dl/)
**Note**: Requires [Go 1.19+](https://golang.org/dl/)

## Installation

Expand Down
4 changes: 2 additions & 2 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
ethante "github.com/evmos/ethermint/app/ante"
evmtypes "github.com/evmos/ethermint/x/evm/types"

vestingtypes "github.com/evmos/evmos/v9/x/vesting/types"
vestingtypes "github.com/evmos/evmos/v10/x/vesting/types"
)

// HandlerOptions defines the list of module keepers required to run the Evmos
Expand All @@ -25,7 +25,7 @@ type HandlerOptions struct {
BankKeeper evmtypes.BankKeeper
ExtensionOptionChecker ante.ExtensionOptionChecker
IBCKeeper *ibckeeper.Keeper
FeeMarketKeeper evmtypes.FeeMarketKeeper
FeeMarketKeeper ethante.FeeMarketKeeper
StakingKeeper vestingtypes.StakingKeeper
EvmKeeper ethante.EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
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 @@ -19,8 +19,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/v9/app"
claimstypes "github.com/evmos/evmos/v9/x/claims/types"
"github.com/evmos/evmos/v10/app"
claimstypes "github.com/evmos/evmos/v10/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 @@ -9,7 +9,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/v9/x/vesting/types"
vestingtypes "github.com/evmos/evmos/v10/x/vesting/types"
)

// EthVestingTransactionDecorator validates if clawback vesting accounts are
Expand Down
99 changes: 47 additions & 52 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,41 +109,41 @@ import (
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

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

"github.com/evmos/evmos/v9/app/ante"
v7 "github.com/evmos/evmos/v9/app/upgrades/v7"
v8 "github.com/evmos/evmos/v9/app/upgrades/v8"
v81 "github.com/evmos/evmos/v9/app/upgrades/v8_1"
v82 "github.com/evmos/evmos/v9/app/upgrades/v8_2"
v9 "github.com/evmos/evmos/v9/app/upgrades/v9"
v91 "github.com/evmos/evmos/v9/app/upgrades/v9_1"
"github.com/evmos/evmos/v9/x/claims"
claimskeeper "github.com/evmos/evmos/v9/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v9/x/claims/types"
"github.com/evmos/evmos/v9/x/epochs"
epochskeeper "github.com/evmos/evmos/v9/x/epochs/keeper"
epochstypes "github.com/evmos/evmos/v9/x/epochs/types"
"github.com/evmos/evmos/v9/x/erc20"
erc20client "github.com/evmos/evmos/v9/x/erc20/client"
erc20keeper "github.com/evmos/evmos/v9/x/erc20/keeper"
erc20types "github.com/evmos/evmos/v9/x/erc20/types"
"github.com/evmos/evmos/v9/x/incentives"
incentivesclient "github.com/evmos/evmos/v9/x/incentives/client"
incentiveskeeper "github.com/evmos/evmos/v9/x/incentives/keeper"
incentivestypes "github.com/evmos/evmos/v9/x/incentives/types"
"github.com/evmos/evmos/v9/x/inflation"
inflationkeeper "github.com/evmos/evmos/v9/x/inflation/keeper"
inflationtypes "github.com/evmos/evmos/v9/x/inflation/types"
"github.com/evmos/evmos/v9/x/recovery"
recoverykeeper "github.com/evmos/evmos/v9/x/recovery/keeper"
recoverytypes "github.com/evmos/evmos/v9/x/recovery/types"
"github.com/evmos/evmos/v9/x/revenue"
revenuekeeper "github.com/evmos/evmos/v9/x/revenue/keeper"
revenuetypes "github.com/evmos/evmos/v9/x/revenue/types"
"github.com/evmos/evmos/v9/x/vesting"
vestingkeeper "github.com/evmos/evmos/v9/x/vesting/keeper"
vestingtypes "github.com/evmos/evmos/v9/x/vesting/types"
_ "github.com/evmos/evmos/v10/client/docs/statik"

"github.com/evmos/evmos/v10/app/ante"
v10 "github.com/evmos/evmos/v10/app/upgrades/v10"
v8 "github.com/evmos/evmos/v10/app/upgrades/v8"
v81 "github.com/evmos/evmos/v10/app/upgrades/v8_1"
v82 "github.com/evmos/evmos/v10/app/upgrades/v8_2"
v9 "github.com/evmos/evmos/v10/app/upgrades/v9"
v91 "github.com/evmos/evmos/v10/app/upgrades/v9_1"
"github.com/evmos/evmos/v10/x/claims"
claimskeeper "github.com/evmos/evmos/v10/x/claims/keeper"
claimstypes "github.com/evmos/evmos/v10/x/claims/types"
"github.com/evmos/evmos/v10/x/epochs"
epochskeeper "github.com/evmos/evmos/v10/x/epochs/keeper"
epochstypes "github.com/evmos/evmos/v10/x/epochs/types"
"github.com/evmos/evmos/v10/x/erc20"
erc20client "github.com/evmos/evmos/v10/x/erc20/client"
erc20keeper "github.com/evmos/evmos/v10/x/erc20/keeper"
erc20types "github.com/evmos/evmos/v10/x/erc20/types"
"github.com/evmos/evmos/v10/x/incentives"
incentivesclient "github.com/evmos/evmos/v10/x/incentives/client"
incentiveskeeper "github.com/evmos/evmos/v10/x/incentives/keeper"
incentivestypes "github.com/evmos/evmos/v10/x/incentives/types"
"github.com/evmos/evmos/v10/x/inflation"
inflationkeeper "github.com/evmos/evmos/v10/x/inflation/keeper"
inflationtypes "github.com/evmos/evmos/v10/x/inflation/types"
"github.com/evmos/evmos/v10/x/recovery"
recoverykeeper "github.com/evmos/evmos/v10/x/recovery/keeper"
recoverytypes "github.com/evmos/evmos/v10/x/recovery/types"
"github.com/evmos/evmos/v10/x/revenue"
revenuekeeper "github.com/evmos/evmos/v10/x/revenue/keeper"
revenuetypes "github.com/evmos/evmos/v10/x/revenue/types"
"github.com/evmos/evmos/v10/x/vesting"
vestingkeeper "github.com/evmos/evmos/v10/x/vesting/keeper"
vestingtypes "github.com/evmos/evmos/v10/x/vesting/types"
)

func init() {
Expand Down Expand Up @@ -1062,17 +1062,6 @@ func initParamsKeeper(
}

func (app *Evmos) setupUpgradeHandlers() {
// v7 upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(
v7.UpgradeName,
v7.CreateUpgradeHandler(
app.mm, app.configurator,
app.BankKeeper,
app.InflationKeeper,
app.ClaimsKeeper,
),
)

// v8 upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(
v8.UpgradeName,
Expand Down Expand Up @@ -1115,6 +1104,14 @@ func (app *Evmos) setupUpgradeHandlers() {
),
)

// v10 upgrade handler
app.UpgradeKeeper.SetUpgradeHandler(
v10.UpgradeName,
v10.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 All @@ -1130,8 +1127,6 @@ func (app *Evmos) setupUpgradeHandlers() {
var storeUpgrades *storetypes.StoreUpgrades

switch upgradeInfo.Name {
case v7.UpgradeName:
// no store upgrades in v7
case v8.UpgradeName:
// add revenue module for testnet (v7 -> v8)
storeUpgrades = &storetypes.StoreUpgrades{
Expand All @@ -1147,10 +1142,10 @@ func (app *Evmos) setupUpgradeHandlers() {
Added: []string{revenuetypes.ModuleName},
Deleted: []string{"feesplit"},
}
case v9.UpgradeName:
// no store upgrade in v9
case v91.UpgradeName:
// no store upgrade in v9
case v9.UpgradeName, v91.UpgradeName:
// no store upgrade in v9 or v9.1
case v10.UpgradeName:
// no store upgrades in v10
}

if storeUpgrades != nil {
Expand Down
4 changes: 2 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
dbm "github.com/tendermint/tm-db"

"github.com/evmos/ethermint/encoding"
"github.com/evmos/evmos/v9/types"
claimstypes "github.com/evmos/evmos/v9/x/claims/types"
"github.com/evmos/evmos/v10/types"
claimstypes "github.com/evmos/evmos/v10/x/claims/types"
)

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

v7 "github.com/evmos/evmos/v9/app/upgrades/v7"
v82 "github.com/evmos/evmos/v9/app/upgrades/v8_2"
"github.com/evmos/evmos/v9/types"
v82 "github.com/evmos/evmos/v10/app/upgrades/v8_2"
"github.com/evmos/evmos/v10/types"
)

// ScheduleForkUpgrade executes any necessary fork logic for based upon the current
Expand All @@ -31,9 +30,6 @@ func (app *Evmos) ScheduleForkUpgrade(ctx sdk.Context) {

// handle mainnet forks with their corresponding upgrade name and info
switch ctx.BlockHeight() {
case v7.MainnetUpgradeHeight:
upgradePlan.Name = v7.UpgradeName
upgradePlan.Info = v7.UpgradeInfo
case v82.MainnetUpgradeHeight:
upgradePlan.Name = v82.UpgradeName
upgradePlan.Info = v82.UpgradeInfo
Expand Down
6 changes: 3 additions & 3 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
claimstypes "github.com/evmos/evmos/v9/x/claims/types"
claimstypes "github.com/evmos/evmos/v10/x/claims/types"

"github.com/evmos/ethermint/encoding"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/evmos/evmos/v9/cmd/config"
"github.com/evmos/evmos/v9/types"
"github.com/evmos/evmos/v10/cmd/config"
"github.com/evmos/evmos/v10/types"
)

func init() {
Expand Down
8 changes: 8 additions & 0 deletions app/upgrades/v10/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package v10

const (
// UpgradeName is the shared upgrade plan name for mainnet
UpgradeName = "v10.0.0"
// UpgradeInfo defines the binaries that will be used for the upgrade
UpgradeInfo = `'{"binaries":{"darwin/arm64":"https://github.com/evmos/evmos/releases/download/v10.0.0/evmos_10.0.0_Darwin_arm64.tar.gz","darwin/amd64":"https://github.com/evmos/evmos/releases/download/v10.0.0/evmos_10.0.0_Darwin_amd64.tar.gz","linux/arm64":"https://github.com/evmos/evmos/releases/download/v10.0.0/evmos_10.0.0_Linux_arm64.tar.gz","linux/amd64":"https://github.com/evmos/evmos/releases/download/v10.0.0/evmos_10.0.0_Linux_amd64.tar.gz","windows/x86_64":"https://github.com/evmos/evmos/releases/download/v10.0.0/evmos_10.0.0_Windows_x86_64.zip"}}'`
)
21 changes: 21 additions & 0 deletions app/upgrades/v10/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package v10

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 v10
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)

// Leave modules are as-is to avoid running InitGenesis.
logger.Debug("running module migrations ...")
return mm.RunMigrations(ctx, configurator, vm)
}
}
Loading

0 comments on commit c7f941a

Please sign in to comment.