From 87f70c3b4e03d7d0949d55b01874e2146dfb6523 Mon Sep 17 00:00:00 2001 From: Daniel Burckhardt Date: Mon, 31 Oct 2022 17:46:48 +0100 Subject: [PATCH 1/4] deps: bump go to v1.19 (#1416) * deps: bump go to v1.19 * deps: add dragonberry patch repalce in go.mod * deps: add ival bump to v0.19.4 * deps: remove unrelated version bumps to adress in differnet PR * go mod tidy * add changelog * fix typo in changelog --- .github/workflows/build.yml | 2 +- .github/workflows/goreleaser.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 20 ++++++++++---------- .golangci.yml | 2 +- CHANGELOG.md | 1 + Makefile | 2 +- README.md | 2 +- go.mod | 5 +++-- networks/local/ethermintnode/Dockerfile | 2 +- 10 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index beba3c2f35..47a3a6190a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 1bda08f33d..a71039bd4e 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 36c7721dc5..5032112a2e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.1 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 810799015c..f4cac262a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -45,7 +45,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 @@ -59,14 +59,14 @@ jobs: run: | make test-import if: env.GIT_DIFF - + test-rpc: runs-on: ubuntu-latest timeout-minutes: 15 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 @@ -87,7 +87,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 @@ -155,7 +155,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 @@ -175,7 +175,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 @@ -184,7 +184,7 @@ jobs: **/**.go go.mod go.sum - - name: Test simulation with random genesis + - name: Test simulation with random genesis run: | make test-sim-random-genesis-fast if: env.GIT_DIFF @@ -195,7 +195,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 @@ -215,7 +215,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 diff --git a/.golangci.yml b/.golangci.yml index f740ede69c..c83bcb01a5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -65,7 +65,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 diff --git a/CHANGELOG.md b/CHANGELOG.md index a7ec000b2e..4616194189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (rpc) [#1378](https://github.com/evmos/ethermint/pull/1378) Add support for EVM RPC metrics * (ante) [#1390](https://github.com/evmos/ethermint/pull/1390) Added multisig tx support. * (test) [#1396](https://github.com/evmos/ethermint/pull/1396) Increase test coverage for the EVM module `keeper` +* (deps) [#1416](https://github.com/evmos/ethermint/pull/1416) Bump Go version to `1.19` ### Bug Fixes diff --git a/Makefile b/Makefile index 763fcf96f3..82bb582398 100755 --- a/Makefile +++ b/Makefile @@ -165,7 +165,7 @@ build-all: tools build lint test ############################################################################### PACKAGE_NAME:=github.com/evmos/ethermint -GOLANG_CROSS_VERSION = v1.18 +GOLANG_CROSS_VERSION = v1.19 GOPATH ?= '$(HOME)/go' release-dry-run: docker run \ diff --git a/README.md b/README.md index 83587e8261..2af515158b 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ parent: Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality 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 diff --git a/go.mod b/go.mod index c4bb52cf23..60f209c782 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/evmos/ethermint -go 1.18 +go 1.19 require ( cosmossdk.io/math v1.0.0-beta.3 @@ -190,10 +190,11 @@ require ( ) replace ( + // use cosmos keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 - // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 + // use cosmos flavored protobufs github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 ) diff --git a/networks/local/ethermintnode/Dockerfile b/networks/local/ethermintnode/Dockerfile index a275b75124..15e72bebaa 100644 --- a/networks/local/ethermintnode/Dockerfile +++ b/networks/local/ethermintnode/Dockerfile @@ -15,7 +15,7 @@ COPY . . RUN make build-linux # Final image -FROM golang:1.18 as final +FROM golang:1.19 as final WORKDIR / From fd91448fa7c43a91d039de6b090b88b422ca5426 Mon Sep 17 00:00:00 2001 From: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Date: Mon, 31 Oct 2022 14:47:57 -0300 Subject: [PATCH 2/4] chore(cli): apply google CLI Syntax for required and optional args (#1417) * chore(cli): apply google CLI Syntax for required and optional args * chore(cli): add changes in CHANGELOG * chore(cli): fix link to PR in CHANGELOG * chore(cli): fix args in feemarket * chore(cli): update docs based on comments --- CHANGELOG.md | 1 + cmd/ethermintd/genaccounts.go | 2 +- x/evm/client/cli/query.go | 4 ++-- x/evm/client/cli/tx.go | 2 +- x/evm/spec/09_client.md | 6 +++--- x/feemarket/spec/08_client.md | 8 ++++---- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4616194189..532b7265d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (ante) [#1390](https://github.com/evmos/ethermint/pull/1390) Added multisig tx support. * (test) [#1396](https://github.com/evmos/ethermint/pull/1396) Increase test coverage for the EVM module `keeper` * (deps) [#1416](https://github.com/evmos/ethermint/pull/1416) Bump Go version to `1.19` +* (cmd) [\#1417](https://github.com/evmos/ethermint/pull/1417) Apply Google CLI Syntax for required and optional args. ### Bug Fixes diff --git a/cmd/ethermintd/genaccounts.go b/cmd/ethermintd/genaccounts.go index ceaf7b938c..e3a0286183 100644 --- a/cmd/ethermintd/genaccounts.go +++ b/cmd/ethermintd/genaccounts.go @@ -32,7 +32,7 @@ const ( // AddGenesisAccountCmd returns add-genesis-account cobra Command. func AddGenesisAccountCmd(defaultNodeHome string) *cobra.Command { cmd := &cobra.Command{ - Use: "add-genesis-account [address_or_key_name] [coin][,[coin]]", + Use: "add-genesis-account ADDRESS_OR_KEY_NAME COIN...", Short: "Add a genesis account to genesis.json", Long: `Add a genesis account to genesis.json. The provided account must specify the account address or key name and a list of initial coins. If a key name is given, diff --git a/x/evm/client/cli/query.go b/x/evm/client/cli/query.go index a6753272dd..a6a99b6bad 100644 --- a/x/evm/client/cli/query.go +++ b/x/evm/client/cli/query.go @@ -31,7 +31,7 @@ func GetQueryCmd() *cobra.Command { // GetStorageCmd queries a key in an accounts storage func GetStorageCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "storage [address] [key]", + Use: "storage ADDRESS KEY", Short: "Gets storage for an account with a given key and height", Long: "Gets storage for an account with a given key and height. If the height is not provided, it will use the latest height from context.", //nolint:lll Args: cobra.ExactArgs(2), @@ -71,7 +71,7 @@ func GetStorageCmd() *cobra.Command { // GetCodeCmd queries the code field of a given address func GetCodeCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "code [address]", + Use: "code ADDRESS", Short: "Gets code from an account", Long: "Gets code from an account. If the height is not provided, it will use the latest height from context.", Args: cobra.ExactArgs(1), diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go index 13e9051b91..3ba174b2e1 100644 --- a/x/evm/client/cli/tx.go +++ b/x/evm/client/cli/tx.go @@ -32,7 +32,7 @@ func GetTxCmd() *cobra.Command { // NewRawTxCmd command build cosmos transaction from raw ethereum transaction func NewRawTxCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "raw [tx-hex]", + Use: "raw TX_HEX", Short: "Build cosmos transaction from raw ethereum transaction", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/evm/spec/09_client.md b/x/evm/spec/09_client.md index c589f5812f..369e19be4f 100644 --- a/x/evm/spec/09_client.md +++ b/x/evm/spec/09_client.md @@ -19,7 +19,7 @@ The `query` commands allow users to query `evm` state. Allows users to query the smart contract code at a given address. ```go -ethermintd query evm code [address] [flags] +ethermintd query evm code ADDRESS [flags] ``` ```bash @@ -35,7 +35,7 @@ code: "0xef616c92f3cfc9e92dc270d6acff9cea213cecc7020a76ee4395af09bdceb4837a1ebdb Allows users to query storage for an account with a given key and height. ```bash -ethermintd query evm storage [address] [key] [flags] +ethermintd query evm storage ADDRESS KEY [flags] ``` ```bash @@ -55,7 +55,7 @@ The `tx` commands allow users to interact with the `evm` module. Allows users to build cosmos transactions from raw ethereum transaction. ```bash -ethermintd tx evm raw [tx-hex] [flags] +ethermintd tx evm raw TX_HEX [flags] ``` ```bash diff --git a/x/feemarket/spec/08_client.md b/x/feemarket/spec/08_client.md index 3c8c9d2575..8dfe73b313 100644 --- a/x/feemarket/spec/08_client.md +++ b/x/feemarket/spec/08_client.md @@ -20,13 +20,13 @@ ethermintd query feemarket --help The `base-fee` command allows users to query the block base fee by height. ``` -ethermintd query feemarket base-fee [height] [flags] +ethermintd query feemarket base-fee [flags] ``` Example: ``` -ethermintd query feemarket base-fee 5... +ethermintd query feemarket base-fee ... ``` Example Output: @@ -40,13 +40,13 @@ base_fee: "512908936" The `block-gas` command allows users to query the block gas by height. ``` -ethermintd query feemarket block-gas [height] [flags] +ethermintd query feemarket block-gas [flags] ``` Example: ``` -ethermintd query feemarket block-gas 5... +ethermintd query feemarket block-gas ... ``` Example Output: From 9181079110fa2fd122f7e00ee834ae8eb44fe162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Kunze=20K=C3=BCllmer?= <31522760+fedekunze@users.noreply.github.com> Date: Mon, 31 Oct 2022 19:02:59 +0100 Subject: [PATCH 3/4] chore(ci): update linters (#1418) * chore(ci): update linters * skip md link --- .github/CODEOWNERS | 3 +- .github/workflows/codeql-analysis.yml | 15 ++++++++- .github/workflows/lint.yml | 17 ++++++++-- .github/workflows/markdown-links.yml | 29 +++++++++++++++++ .github/workflows/security.yml | 7 +++-- .github/workflows/test.yml | 1 + .gitignore | 13 +++++--- .markdownlintignore | 2 +- .mergify.yml | 12 +++---- .solhint.json | 3 ++ .yamllint | 31 ++++++++++++++++++ CONTRIBUTING.md | 1 - gometalinter.json | 16 ++++++++++ mlc_config.json | 5 +++ starport.yml | 45 --------------------------- 15 files changed, 136 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/markdown-links.yml create mode 100644 .solhint.json create mode 100644 .yamllint create mode 100644 gometalinter.json create mode 100644 mlc_config.json delete mode 100644 starport.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2d5fee78c7..f03d6586dc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,5 @@ # CODEOWNERS: https://help.github.com/articles/about-codeowners/ # Primary (global) repo maintainers -* @evmos/core-engineering + + * @evmos/core-engineering diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 89783cb127..460c7d731e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -40,6 +40,15 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v6.1.1 + with: + PATTERNS: | + **/**.sol + **/**.go + **/**.ts + **/**.js + go.mod + go.sum # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -50,11 +59,14 @@ jobs: # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - + queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality + if: env.GIT_DIFF # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild uses: github/codeql-action/autobuild@v2 + if: env.GIT_DIFF # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -69,3 +81,4 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 + if: env.GIT_DIFF diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5032112a2e..e413b673c9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: + # Required: setup-go, for all versions v3.0.0+ of golangci-lint - uses: actions/setup-go@v3 with: go-version: 1.19 @@ -23,9 +24,10 @@ jobs: **/**.go go.mod go.sum - - uses: golangci/golangci-lint-action@v3 + - uses: golangci/golangci-lint-action@v3.3.0 with: - version: v1.48.0 + # 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 args: --timeout 10m github-token: ${{ secrets.github_token }} # Check only if there are differences in the source code @@ -42,7 +44,11 @@ jobs: docs/**/*.md x/**/*.md README.md - - uses: articulate/actions-markdownlint@v1.1.0 + - uses: nosborn/github-action-markdown-cli@v3.2.0 + with: + files: . + config_file: .markdownlint.yml + ignore_path: .markdownlintignore # Check only if there are differences in the source code if: env.GIT_DIFF python-lint: @@ -70,7 +76,12 @@ jobs: - uses: cachix/cachix-action@v12 with: name: ethermint + - uses: technote-space/get-diff-action@v6.1.1 + with: + PATTERNS: | + **/**.py - name: run gomod2nix run: | nix run -f ./nix gomod2nix git diff --no-ext-diff --exit-code + if: env.GIT_DIFF diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml new file mode 100644 index 0000000000..1d50faaa5d --- /dev/null +++ b/.github/workflows/markdown-links.yml @@ -0,0 +1,29 @@ +name: Check Markdown links +on: + pull_request: + paths: + - '**.md' + push: + branches: + - main + paths: + - '**.md' + +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: technote-space/get-diff-action@v6.1.1 + id: git_diff + with: + PATTERNS: | + **/**.md + - uses: gaurav-nelson/github-action-markdown-link-check@master + with: + folder-path: "docs" + check-modified-files-only: "yes" + use-quiet-mode: "yes" + base-branch: "main" + config-file: "mlc_config.json" + if: env.GIT_DIFF diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index be3ba2f7d6..b32d6ff085 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -7,6 +7,9 @@ on: jobs: Gosec: + permissions: + security-events: write + runs-on: ubuntu-latest env: GO111MODULE: on @@ -21,10 +24,10 @@ jobs: go.mod go.sum - name: Run Gosec Security Scanner - uses: informalsystems/gosec@master + uses: cosmos/gosec@master with: # we let the report trigger content trigger a failure using the GitHub Security features. - args: '-no-fail -fmt sarif -out results.sarif ./...' + args: "-no-fail -fmt sarif -out results.sarif ./..." if: "env.GIT_DIFF_FILTERED != ''" - name: Upload SARIF file uses: github/codeql-action/upload-sarif@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4cac262a9..0ea9b5439c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,7 @@ jobs: - uses: technote-space/get-diff-action@v6.1.1 with: PATTERNS: | + **/**.sol **/**.go go.mod go.sum diff --git a/.gitignore b/.gitignore index fa7bb0ceba..eb745f7e2b 100644 --- a/.gitignore +++ b/.gitignore @@ -35,10 +35,14 @@ keyring_test_cosmos ./**/node_modules ./**/dist secret.yml +artifacts/* +tmp-swagger-gen +github.com/ # vue/ # Local docker volume mappings localnet-setup +.testnets # Testing coverage.txt @@ -56,6 +60,7 @@ vagrant # IDE .idea/ *.iml +*.code-workspace # Graphviz dependency-graph.png @@ -70,8 +75,8 @@ dependency-graph.png *.abi # Node.js -tests/**/node_modules/* -tests-solidity/**/node_modules/* +**/node_modules -# Nix -/result \ No newline at end of file + +# OpenZeppelin contracts +contracts/@openzeppelin/* diff --git a/.markdownlintignore b/.markdownlintignore index 1725ceb118..f3a830d7c1 100644 --- a/.markdownlintignore +++ b/.markdownlintignore @@ -1,3 +1,3 @@ CHANGELOG.md -docs/protocol/proto-docs.md +docs/api/proto-docs.md docs/node_modules diff --git a/.mergify.yml b/.mergify.yml index eb3ceeeef9..a544927762 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -23,19 +23,19 @@ pull_request_rules: backport: branches: - main - - name: backport patches to v0.17.x branch + - name: backport patches to v0.20.x branch conditions: - base=main - - label=backport/0.17.x + - label=backport/0.20.x actions: backport: branches: - - release/v0.17.x - - name: backport patches to v0.16.x branch + - release/v0.20.x + - name: backport patches to v0.19.x branch conditions: - base=main - - label=backport/0.16.x + - label=backport/0.19.x actions: backport: branches: - - release/v0.16.x + - release/v0.19.x diff --git a/.solhint.json b/.solhint.json new file mode 100644 index 0000000000..d7c3de9895 --- /dev/null +++ b/.solhint.json @@ -0,0 +1,3 @@ +{ + "extends": "solhint:default" +} diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000000..e53fd3d147 --- /dev/null +++ b/.yamllint @@ -0,0 +1,31 @@ +--- + +yaml-files: + - '*.yaml' + - '*.yml' + - '.yamllint' + +rules: + braces: enable + brackets: enable + colons: enable + commas: enable + comments: + level: warning + comments-indentation: disable + document-end: disable + document-start: disable + empty-lines: disable + empty-values: disable + float-values: disable + hyphens: enable + indentation: enable + key-duplicates: enable + key-ordering: disable + line-length: disable + new-line-at-end-of-file: enable + new-lines: enable + octal-values: disable + quoted-strings: disable + trailing-spaces: disable + truthy: disable \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 82feeed48b..5be884533d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,6 @@ - [Pull Request Templates](#pull-request-templates) - [Requesting Reviews](#requesting-reviews) - [Reviewing Pull Requests](#reviewing-pull-requests) - - [Updating Documentation](#updating-documentation) - [Forking](#forking) - [Dependencies](#dependencies) - [Protobuf](#protobuf) diff --git a/gometalinter.json b/gometalinter.json new file mode 100644 index 0000000000..78a33ed7b4 --- /dev/null +++ b/gometalinter.json @@ -0,0 +1,16 @@ +{ + "Linters": { + "vet": "go tool vet -composites=false :PATH:LINE:MESSAGE" + }, + "Enable": [ + "golint", + "vet", + "ineffassign", + "unparam", + "unconvert", + "misspell" + ], + "Deadline": "500s", + "Vendor": true, + "Cyclo": 11 +} \ No newline at end of file diff --git a/mlc_config.json b/mlc_config.json new file mode 100644 index 0000000000..7b442ec3de --- /dev/null +++ b/mlc_config.json @@ -0,0 +1,5 @@ +{ + "retryOn429": true, + "retryCount": 3, + "fallbackRetryDelay": "20s" +} \ No newline at end of file diff --git a/starport.yml b/starport.yml deleted file mode 100644 index 4d3cd1b0f5..0000000000 --- a/starport.yml +++ /dev/null @@ -1,45 +0,0 @@ -accounts: - - name: alice - coins: ["100000000uatom", "100000000000000000000aphoton"] - - name: bob - coins: ["5000000000000aphoton"] - - name: faucet - coins: ["1000000000000000000000000000aphoton"] -validator: - name: alice - staked: "100000000000000000000aphoton" -faucet: - port: 4500 - name: "faucet" - coins: ["1000000000000000000000000000aphoton"] - coins_max: ["100000000aphoton"] -build: - binary: "ethermintd" -init: - home: "$HOME/.ethermintd" - app: - api: - enable: true - json-rpc: - address: "0.0.0.0:8545" # change the JSON-RPC address and port - ws-address: "0.0.0.0:8546" # change the JSON-RPC websocket address and port -genesis: - chain_id: "ethermint_9000-1" - app_state: - staking: - params: - bond_denom: "aphoton" - mint: - params: - mint_denom: "aphoton" - crisis: - constant_fee: - denom: "aphoton" - gov: - deposit_params: - min_deposit: - - amount: "10000000" - denom: "aphoton" - evm: - params: - evm_denom: "aphoton" From a8ea4eceb6d9c7bc9b9da36700f94cc1f8186853 Mon Sep 17 00:00:00 2001 From: Daniel Burckhardt Date: Tue, 1 Nov 2022 23:05:34 +0100 Subject: [PATCH 4/4] backport: add v0.19.3 dragonberry changes to `main` and bump iavl to v0.19.4 (#1419) * backport: v0.19.3 dragonberry changes and iavl bump * add v0.19.3 changelog * update gomod2nix * fix linter * use latest for golangci github workflow Co-authored-by: Freddy Caceres --- .github/workflows/lint.yml | 3 ++- .golangci.yml | 2 -- CHANGELOG.md | 4 ++++ go.mod | 4 +++- go.sum | 8 ++++---- gomod2nix.toml | 9 +++++---- x/feemarket/types/keys.go | 2 +- 7 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e413b673c9..9bb6074607 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,6 +17,7 @@ jobs: - uses: actions/setup-go@v3 with: go-version: 1.19 + check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.1 with: @@ -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 diff --git a/.golangci.yml b/.golangci.yml index c83bcb01a5..1d0df1c383 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,7 +6,6 @@ run: linters: enable: - bodyclose - - deadcode - depguard - dogsled - dupl @@ -30,7 +29,6 @@ linters: - unconvert - unparam - unused - - varcheck - nolintlint - asciicheck - exportloopref diff --git a/CHANGELOG.md b/CHANGELOG.md index 532b7265d5..0e58c4bf73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (state) [#1320](https://github.com/evmos/ethermint/pull/1320) Fix codehash check mismatch when the code has been deleted in the evm state. * (rpc) [#1392](https://github.com/evmos/ethermint/pull/1392) Allow fill the proposer address in json-rpc through tendermint api, and pass explicitly to grpc query handler. +## [v0.19.3] - 2022-10-14 + +* (deps) [1381](https://github.com/evmos/ethermint/pull/1381) Bump sdk to `v0.45.9` + ## [v0.19.2] - 2022-08-29 ### Improvements diff --git a/go.mod b/go.mod index 60f209c782..d2eb9c45bd 100644 --- a/go.mod +++ b/go.mod @@ -70,7 +70,7 @@ require ( github.com/cosmos/btcutil v1.0.4 // indirect github.com/cosmos/cosmos-proto v1.0.0-alpha7 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.3 // indirect + github.com/cosmos/iavl v0.19.4 // indirect github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect github.com/cosmos/ledger-go v0.9.2 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect @@ -192,6 +192,8 @@ require ( replace ( // use cosmos keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 + // ics23 patch for dragonberry + github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0 diff --git a/go.sum b/go.sum index 5dd569fc32..5f28c5fc61 100644 --- a/go.sum +++ b/go.sum @@ -235,8 +235,6 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= -github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= @@ -254,13 +252,15 @@ github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hk github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= github.com/cosmos/cosmos-sdk v0.46.3 h1:2jdJYcSwh4AtFJKGoNGvmEy2mKDWtGaVZphGpvedljQ= github.com/cosmos/cosmos-sdk v0.46.3/go.mod h1:AynIAjXwtS3T/ApdhNCz/7/KGMbZSUBbKRTcbukb2ic= +github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= +github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpFP3wWDPgdHPargtyw30= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.3 h1:cESO0OwTTxQm5rmyESKW+zESheDUYI7CcZDWWDwnuxg= -github.com/cosmos/iavl v0.19.3/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= +github.com/cosmos/iavl v0.19.4 h1:t82sN+Y0WeqxDLJRSpNd8YFX5URIrT+p8n6oJbJ2Dok= +github.com/cosmos/iavl v0.19.4/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= github.com/cosmos/ibc-go/v5 v5.0.1 h1:ZI5xCi6RDOL+hyu6Wx/w6JoAYFlOoK5hijsRTVWo+RA= github.com/cosmos/ibc-go/v5 v5.0.1/go.mod h1:LX0DHLW3dfi/1e4BJzi8MGLWmQ4DSraPEgVjyo3VzAo= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= diff --git a/gomod2nix.toml b/gomod2nix.toml index f224af3f8f..72da5d025f 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -84,8 +84,9 @@ schema = 3 version = "v0.7.9" hash = "sha256-ZWIXIXcHGjeCNgMrpXymry8/8esDDauGFfF/+gEoO1Y=" [mod."github.com/confio/ics23/go"] - version = "v0.7.0" - hash = "sha256-FjUQfDKtX+/13+UjJzbYPAkgM4GPZ0vk+dKz7/iRetw=" + version = "v0.8.0" + hash = "sha256-mFKxFHp7RaE1L5NdtH9H9px2Cy6I5uOZVnFOgE8Nrew=" + replaced = "github.com/cosmos/cosmos-sdk/ics23/go" [mod."github.com/cosmos/btcutil"] version = "v1.0.4" hash = "sha256-JvcBXBdjdmnaW/nyf/tw/uaOAGn1b78yxrtl2/Rs3kA=" @@ -102,8 +103,8 @@ schema = 3 version = "v1.2.0" hash = "sha256-209TcVuXc5s/TcOvNlaQ1HEJAUDTEK3nxPhs+d8TEcY=" [mod."github.com/cosmos/iavl"] - version = "v0.19.3" - hash = "sha256-rmW2KoKmm4YXmYIYE1vXMOCaDyP1ym0qsW224PYc9rg=" + version = "v0.19.4" + hash = "sha256-EmpRZ48pjPFq/fIHneut9Vyo5QJATfb3ZO7KzWnqs9g=" [mod."github.com/cosmos/ibc-go/v5"] version = "v5.0.1" hash = "sha256-44Vyj9i4gh6U0BGNsEFqRsHAYdxfuJmLGdtPWxcBfWQ=" diff --git a/x/feemarket/types/keys.go b/x/feemarket/types/keys.go index 9e55260115..055fc5138d 100644 --- a/x/feemarket/types/keys.go +++ b/x/feemarket/types/keys.go @@ -19,7 +19,7 @@ const ( // prefix bytes for the feemarket persistent store const ( prefixBlockGasWanted = iota + 1 - deprecatedPrefixBaseFee //nolint + deprecatedPrefixBaseFee // unused ) const (