Skip to content

Commit

Permalink
Merge pull request #13 from tharsis/main
Browse files Browse the repository at this point in the history
evm: benchmark evm keeper  (evmos#586)
  • Loading branch information
bwhour committed Oct 8, 2021
2 parents 1c7360b + f69c887 commit 3142fad
Show file tree
Hide file tree
Showing 186 changed files with 3,310 additions and 43,365 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Primary repo maintainers
* @fedekunze @khoslaventures @nzoghb
* @fedekunze @khoslaventures @jolube
29 changes: 0 additions & 29 deletions .github/workflows/build-docs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/deploy-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js
uses: actions/setup-node@v2.4.0
uses: actions/setup-node@v2.4.1
with:
node-version: '12.x'
- name: Install dependencies
Expand Down
41 changes: 26 additions & 15 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
name: goreleaser

# This workflow helps with creating releases.
# This job will only be triggered when a tag (vX.X.x) is pushed
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*.*.*"
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
goreleaser:
release:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v2
fetch-depth: 0
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- name: release dry run
run: make release-dry-run
- name: setup release environment
- name: Set Env
run: echo "TM_VERSION=$(go list -m github.com/tendermint/tendermint | sed 's:.* ::')" >> $GITHUB_ENV
- name: Build
uses: goreleaser/goreleaser-action@v2.7.0
if: ${{ github.event_name == 'pull_request' }}
with:
version: latest
args: build --rm-dist --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
env:
TM_VERSION: ${{ env.TM_VERSION }}
- name: Release
uses: goreleaser/goreleaser-action@v2.7.0
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist --release-notes ./RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release
TM_VERSION: ${{ env.TM_VERSION }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: golangci/golangci-lint-action@v2.5.2
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.29
version: v1.42.1
args: --timeout 10m
github-token: ${{ secrets.github_token }}
# Check only if there are differences in the source code
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,23 @@ jobs:
sleep 2m
./contrib/scripts/test_localnet_liveness.sh 100 5 50 localhost
if: env.GIT_DIFF


test-rpc:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v5
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
- name: Test rpc endpoint
run: |
make test-rpc
if: env.GIT_DIFF
133 changes: 40 additions & 93 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,109 +1,56 @@
---
project_name: ethermint

env:
- GO111MODULE=on

before:
hooks:
- go mod download
- go mod tidy

builds:
- id: "ethermintd-darwin"
main: ./cmd/ethermintd
binary: bin/ethermintd
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
goos:
- darwin
goarch:
- amd64
- main: ./cmd/ethermintd
id: "ethermintd"
binary: ethermintd
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -tags=cgo
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=ethermint -X github.com/cosmos/cosmos-sdk/version.AppName=ethermintd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "ethermintd-darwin-arm64"
main: ./cmd/ethermintd
binary: bin/ethermintd
- -tags=netgo ledger
- -trimpath
env:
- CGO_ENABLED=1
- CC=oa64-clang
- CXX=oa64-clang++
goos:
- darwin
goarch:
- arm64
flags:
- -tags=cgo
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=ethermint -X github.com/cosmos/cosmos-sdk/version.AppName=ethermintd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "ethermintd-linux"
main: ./cmd/ethermintd
binary: bin/ethermintd
env:
- CGO_ENABLED=1
- CC=gcc
- CXX=g++
- -s -w -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X github.com/cosmos/cosmos-sdk/version.Name=ethermint -X github.com/cosmos/cosmos-sdk/version.AppName=ethermintd -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }} -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }} -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Env.TM_VERSION }}
goos:
- darwin
- linux
goarch:
- amd64
flags:
- -tags=cgo
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=ethermint -X github.com/cosmos/cosmos-sdk/version.AppName=ethermintd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "ethermintd-linux-arm64"
main: ./cmd/ethermintd
binary: bin/ethermintd
env:
- CGO_ENABLED=1
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
goos:
- linux
goarch:
- arm
- arm64
flags:
- -tags=cgo
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=ethermint -X github.com/cosmos/cosmos-sdk/version.AppName=ethermintd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}
- id: "ethermintd-windows"
main: ./cmd/ethermintd
binary: bin/ethermintd
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
goos:
- windows
goarch:
- amd64
flags:
- -tags=cgo
- -buildmode=exe
ldflags:
- -s -w -X github.com/cosmos/cosmos-sdk/version.Name=ethermint -X github.com/cosmos/cosmos-sdk/version.AppName=ethermintd -X github.com/cosmos/cosmos-sdk/version.Version={{.Version}} -X github.com/cosmos/cosmos-sdk/version.Commit={{.Commit}}

archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
format_overrides:
- goos: windows
format: zip
builds:
- ethermintd-darwin
- ethermintd-darwin-arm64
- ethermintd-windows
- ethermintd-linux
- ethermintd-linux-arm64
- format: tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
name_template: "{{ .Binary }}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- LICENSE
- README.md

release:
github:
owner: tharsis
name: ethermint
name_template: "v{{.Version}}"

checksum:
name_template: 'checksums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
name_template: SHA256SUMS-v{{.Version}}.txt
algorithm: sha256

snapshot:
name_template: "{{ .Tag }}-next"
name_template: SNAPSHOT-{{ .Commit }}

changelog:
skip: true
45 changes: 41 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,39 @@ Ref: https://keepachangelog.com/en/1.0.0/

### State Machine Breaking

* (evm, ante) [tharsis#620](https://github.com/tharsis/ethermint/pull/620) Add fee market field to EVM `Keeper` and `AnteHandler`.
* (all) [tharsis#231](https://github.com/tharsis/ethermint/pull/231) Bump go-ethereum version to [`v1.10.9`](https://github.com/ethereum/go-ethereum/releases/tag/v1.10.9)

### API Breaking

* (rpc) [tharsis#400](https://github.com/tharsis/ethermint/issues/400) Restructure JSON-RPC directory and rename server config

### Improvements

* (deps) [tharsis#621](https://github.com/tharsis/ethermint/pull/621) Bump IBC-go to [`v1.2.1`](https://github.com/cosmos/ibc-go/releases/tag/v1.2.1)
* (evm) [tharsis#613](https://github.com/tharsis/ethermint/pull/613) Refactor `traceTx`
* (deps) [tharsis#610](https://github.com/tharsis/ethermint/pull/610) Bump Cosmos SDK to [v0.44.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.1).

### Features

* (rpc) [tharsis#624](https://github.com/tharsis/ethermint/pull/624) Implement new JSON-RPC endpoints from latest geth version

### Bug Fixes

* (rpc) [tharsis#642](https://github.com/tharsis/ethermint/issues/642) Fix `eth_getLogs` when string is specified in filter's from or to fields
* (evm) [tharsis#616](https://github.com/tharsis/ethermint/issues/616) Fix halt on deeply nested stack of cache context. Stack is now flattened before iterating over the tx logs.
* (rpc, evm) [tharsis#614](https://github.com/tharsis/ethermint/issues/614) Use JSON for (un)marshaling tx `Log`s from events.
* (rpc) [tharsis#611](https://github.com/tharsis/ethermint/pull/611) Fix panic on JSON-RPC when querying for an invalid block height.
* (cmd) [tharsis#483](https://github.com/tharsis/ethermint/pull/483) Use config values on genesis accounts.
* (rpc, test) [tharsis#608](https://github.com/tharsis/ethermint/pull/608) Fix rpc test.

## [v0.6.0] - 2021-09-29

### State Machine Breaking

* (app) [tharsis#476](https://github.com/tharsis/ethermint/pull/476) Update Bech32 HRP to `ethm`.
* (evm) [tharsis#556](https://github.com/tharsis/ethermint/pull/556) Remove tx logs and block bloom from chain state
* (evm) [tharsis#590](https://github.com/tharsis/ethermint/pull/590) Contract storage key is not hashed anymore

### API Breaking

Expand All @@ -55,6 +86,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Bug Fixes

* (rpc, server) [tharsis#600](https://github.com/tharsis/ethermint/pull/600) Add TLS configuration for websocket API
* (rpc) [tharsis#598](https://github.com/tharsis/ethermint/pull/598) Check truncation when creating a `BlockNumber` from `big.Int`
* (evm) [tharsis#597](https://github.com/tharsis/ethermint/pull/597) Check for `uint64` -> `int64` block height overflow on `GetHashFn`
* (evm) [tharsis#579](https://github.com/tharsis/ethermint/pull/579) Update `DeriveChainID` function to handle `v` signature values `< 35`.
* (encoding) [tharsis#478](https://github.com/tharsis/ethermint/pull/478) Register `Evidence` to amino codec.
* (rpc) [tharsis#478](https://github.com/tharsis/ethermint/pull/481) Getting the node configuration when calling the `miner` rpc methods.
Expand All @@ -64,6 +98,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (evm) [tharsis#461](https://github.com/tharsis/ethermint/pull/461) Increase performance of `StateDB` transaction log storage (r/w).
* (evm) [tharsis#566](https://github.com/tharsis/ethermint/pull/566) Introduce `stateErr` store in `StateDB` to avoid meaningless operations if any error happened before
* (rpc, evm) [tharsis#587](https://github.com/tharsis/ethermint/pull/587) Apply bloom filter when query ethlogs with range of blocks
* (evm) [tharsis#586](https://github.com/tharsis/ethermint/pull/586) Benchmark evm keeper


## [v0.5.0] - 2021-08-20

Expand Down Expand Up @@ -141,12 +178,12 @@ the Tracer type used to collect execution traces from the EVM transaction execut
* (evm) [\#767](https://github.com/cosmos/ethermint/issues/767) Fix error of timeout when using Truffle to deploy contract.
* (evm) [\#751](https://github.com/cosmos/ethermint/issues/751) Fix misused method to calculate block hash in evm related function.
* (evm) [\#721](https://github.com/cosmos/ethermint/issues/721) Fix mismatch block hash in rpc response when use eht.getBlock.
* (evm) [\#730](https://github.com/cosmos/ethermint/issues/730) Fix 'EIP2028' not open when Istanbul version has been enabled.
* (evm) [\#730](https://github.com/cosmos/ethermint/issues/730) Fix 'EIP2028' not open when Istanbul version has been enabled.
* (evm) [\#749](https://github.com/cosmos/ethermint/issues/749) Fix panic in `AnteHandler` when gas price larger than 100000
* (evm) [\#747](https://github.com/cosmos/ethermint/issues/747) Fix format errors in String() of QueryETHLogs
* (evm) [\#742](https://github.com/cosmos/ethermint/issues/742) Add parameter check for evm query func.
* (evm) [\#687](https://github.com/cosmos/ethermint/issues/687) Fix nonce check to explicitly check for the correct nonce, rather than a simple 'greater than' comparison.
* (api) [\#687](https://github.com/cosmos/ethermint/issues/687) Returns error for a transaction with an incorrect nonce.
* (evm) [\#742](https://github.com/cosmos/ethermint/issues/742) Add parameter check for evm query func.
* (evm) [\#687](https://github.com/cosmos/ethermint/issues/687) Fix nonce check to explicitly check for the correct nonce, rather than a simple 'greater than' comparison.
* (api) [\#687](https://github.com/cosmos/ethermint/issues/687) Returns error for a transaction with an incorrect nonce.
* (evm) [\#674](https://github.com/cosmos/ethermint/issues/674) Reset all cache after account data has been committed in `EndBlock` to make sure every node state consistent.
* (evm) [\#672](https://github.com/cosmos/ethermint/issues/672) Fix panic of `wrong Block.Header.AppHash` when restart a node with snapshot.
* (evm) [\#775](https://github.com/cosmos/ethermint/issues/775) MisUse of headHash as blockHash when create EVM context.
Expand Down
10 changes: 0 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,6 @@ items. In addition, use the following review explanations:
- If you sat down with the PR submitter and did a pairing review, add this information in the `Approval` or your PR comments.
- If you are only making "surface level" reviews, submit any notes as `Comments` without adding a review.

### Updating Documentation

If you open a PR on Ethermint, it is mandatory to update the relevant documentation in `/docs`.

- If your change relates to the core SDK (baseapp, store, ...), be sure to update the content in `docs/basics/`, `docs/core/` and/or `docs/building-modules/` folders.
- If your changes relate to the core of the CLI (not specifically to module's CLI/Rest), then modify the content in the `docs/run-node/` folder.
- If your changes relate to a module, then be sure to update the module's spec in `x/moduleName/docs/spec/`.

When writing documentation, follow the [Documentation Writing Guidelines](./docs/DOC_WRITING_GUIDELINES.md).

## Forking

Go requires code to live under absolute paths, and this requirement complicates forking.
Expand Down
Loading

0 comments on commit 3142fad

Please sign in to comment.