Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

release: v0.10.1 changelog #971

Merged
merged 41 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
cad7545
deps: IBC v3 alpha2 (#892)
fedekunze Jan 7, 2022
aeb6aeb
Problem: newPendingTransactions filter don't return ethereum tx hash …
yihuang Jan 13, 2022
7d86640
impr: support batch eth txs (#901)
yihuang Jan 14, 2022
0b92af4
build(deps): bump follow-redirects in /tests/solidity (#909)
dependabot[bot] Jan 16, 2022
351e6d6
rpc: make trace transaction api work with batch tx (#907)
yihuang Jan 16, 2022
317f5b4
fix insufficient fee error message (#911)
yihuang Jan 17, 2022
0a01cea
server: add `api.enable` flag for Cosmos SDK API server (#908)
crypto-facs Jan 17, 2022
43c4d7c
deps: bump Cosmos SDK version to `v0.45.0` (#912)
fedekunze Jan 18, 2022
04f595d
Integration tests (#913)
crypto-facs Jan 20, 2022
fd3c803
ci: semgrep config (#917)
fedekunze Jan 24, 2022
e39a749
fix: default base fee state in genesis (#919)
yihuang Jan 26, 2022
724a066
fix: minimal-gas-prices and baseFeePerGas conflicts (#916)
yihuang Jan 26, 2022
628a7fa
build(deps): bump github.com/cosmos/ibc-go/v3 (#925)
dependabot[bot] Feb 4, 2022
4ccc173
build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (…
dependabot[bot] Feb 4, 2022
03a03b2
build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 …
dependabot[bot] Feb 7, 2022
f32288b
ci: separate out rpc and integration tests (#931)
prajjwol Feb 9, 2022
7b22a53
fix: wrong comment in EthGasConsumeDecorator (#929)
hea9549 Feb 9, 2022
e16b7f8
fix newPendingTransactions subscription deadlock issue (#933)
crypto-facs Feb 10, 2022
b51907a
remove unused parameters from evm spec (#934)
yihuang Feb 11, 2022
1baccfa
build(deps): bump follow-redirects in /tests/solidity (#939)
dependabot[bot] Feb 14, 2022
aeedef9
deps: upgrade geth to v1.10.15 (#935)
crypto-facs Feb 14, 2022
f7009b0
fix: base fee check logic in state transition (#932)
yihuang Feb 15, 2022
d02cc63
danburck/release changelog (#942)
danburck Feb 15, 2022
bd0f073
build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#…
dependabot[bot] Feb 16, 2022
0f5b1aa
deps: bump IBC v3-rc0 (#947)
fedekunze Feb 17, 2022
dcd2891
imp: redirect go-ethereum's logs to cosmos logger (#948)
yihuang Feb 19, 2022
f21592e
build(deps): bump github.com/ethereum/go-ethereum from 1.10.15 to 1.1…
dependabot[bot] Feb 19, 2022
bf54193
feemarket: change basefee to be a module param (#943)
thomas-nguy Feb 23, 2022
6095794
build(deps): bump github.com/tendermint/tm-db from 0.6.4 to 0.6.7 (#949)
dependabot[bot] Feb 23, 2022
a2c2620
docs: add spec for feemarket module (#889)
thomas-nguy Feb 25, 2022
e41c713
rpc: add support for `eth_signedTypedData` (#953)
crypto-facs Feb 25, 2022
19a1be6
build(deps): bump actions/setup-node from 2.5.1 to 3 (#957)
dependabot[bot] Feb 25, 2022
0d69a69
fix: websocket client duplicated messages (#955)
yihuang Feb 25, 2022
3bea3fa
ante: EIP712 support (#950)
hanchon Feb 26, 2022
4aa5d0b
evm: add returnValue message on tracing (#962)
crypto-facs Mar 2, 2022
4e2236a
build(deps): bump actions/labeler from 3 to 4 (#966)
dependabot[bot] Mar 3, 2022
eb4631f
build(deps): bump actions/checkout from 2.4.0 to 3 (#965)
dependabot[bot] Mar 3, 2022
40d5eff
fix: Metamask keeps failing sending transactions (#968)
yihuang Mar 3, 2022
caa1c5a
fix: `eth_feeHistory` reward values cannot be nil (#970)
loredanacirstea Mar 3, 2022
fdd6461
release: v0.10.1
fedekunze Mar 4, 2022
e473b6b
changelog
fedekunze Mar 4, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: 1.17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.13
with:
folder-path: "docs"
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
SUFFIX_FILTER: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
Expand All @@ -20,7 +20,7 @@ jobs:
breakage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
- name: Get Diff
uses: technote-space/get-diff-action@v6.0.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get Diff
uses: technote-space/get-diff-action@v6.0.1
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
Expand All @@ -62,7 +62,7 @@ jobs:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
id: git_diff
with:
Expand All @@ -83,7 +83,7 @@ jobs:
matrix:
batch: ['1-3', '2-3', '3-3']
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: 1.17
Expand All @@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
Expand All @@ -158,7 +158,7 @@ jobs:
- uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v0.10.1] - 2022-03-04

### Bug Fixes

* (rpc) [tharsis##970](https://github.com/tharsis/ethermint/pull/970) Fix unexpected nil reward values on `eth_feeHistory` response
* (evm) [tharsis##529](https://github.com/tharsis/ethermint/issues/529) Add support return value on trace tx response.

## Improvements

* (rpc) [tharsis##968](https://github.com/tharsis/ethermint/pull/968) Add some buffer to returned gas price to provide better default UX for client.

## [v0.10.0] - 2022-02-26

### API Breaking
Expand Down
33 changes: 29 additions & 4 deletions rpc/ethereum/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type Backend interface {
RPCTxFeeCap() float64 // RPCTxFeeCap is the global transaction fee(price * gaslimit) cap for send-transaction variants. The unit is ether.

RPCMinGasPrice() int64
SuggestGasTipCap() (*big.Int, error)
SuggestGasTipCap(baseFee *big.Int) (*big.Int, error)

// Blockchain API
BlockNumber() (hexutil.Uint64, error)
Expand Down Expand Up @@ -954,9 +954,34 @@ func (e *EVMBackend) ChainConfig() *params.ChainConfig {
}

// SuggestGasTipCap returns the suggested tip cap
// always return zero since we don't support tx prioritization yet.
func (e *EVMBackend) SuggestGasTipCap() (*big.Int, error) {
return big.NewInt(0), nil
// Although we don't support tx prioritization yet, but we return a positive value to help client to
// mitigate the base fee changes.
func (e *EVMBackend) SuggestGasTipCap(baseFee *big.Int) (*big.Int, error) {
if baseFee == nil {
// london hardfork not enabled or feemarket not enabeld
return big.NewInt(0), nil
}

params, err := e.queryClient.FeeMarket.Params(e.ctx, &feemarkettypes.QueryParamsRequest{})
if err != nil {
return nil, err
}
// calculate the maximum base fee delta in current block, assuming all block gas limit is consumed
// ```
// GasTarget = GasLimit / ElasticityMultiplier
// Delta = BaseFee * (GasUsed - GasTarget) / GasTarget / Denominator
// ```
// The delta is at maximum when `GasUsed` is equal to `GasLimit`, which is:
// ```
// MaxDelta = BaseFee * (GasLimit - GasLimit / ElasticityMultiplier) / (GasLimit / ElasticityMultiplier) / Denominator
// = BaseFee * (ElasticityMultiplier - 1) / Denominator
// ```
maxDelta := baseFee.Int64() * (int64(params.Params.ElasticityMultiplier) - 1) / int64(params.Params.BaseFeeChangeDenominator)
if maxDelta < 0 {
// impossible if the parameter validation passed.
maxDelta = 0
}
return big.NewInt(maxDelta), nil
}

// BaseFee returns the base fee tracked by the Fee Market module. If the base fee is not enabled,
Expand Down
31 changes: 22 additions & 9 deletions rpc/ethereum/backend/feebackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (e *EVMBackend) processBlock(
return nil
}

// FeeHistory returns data relevant for fee estimation based on the specified range of blocks.
func (e *EVMBackend) FeeHistory(
userBlockCount rpc.DecimalOrHex, // number blocks to fetch, maximum is 100
lastBlock rpc.BlockNumber, // the block to start search , to oldest
Expand Down Expand Up @@ -145,13 +146,16 @@ func (e *EVMBackend) FeeHistory(

// prepare space
reward := make([][]*hexutil.Big, blockCount)
rewardcount := len(rewardPercentiles)
rewardCount := len(rewardPercentiles)
for i := 0; i < int(blockCount); i++ {
reward[i] = make([]*hexutil.Big, rewardcount)
reward[i] = make([]*hexutil.Big, rewardCount)
}
thisBaseFee := make([]*hexutil.Big, blockCount)
thisGasUsedRatio := make([]float64, blockCount)

// rewards should only be calculated if reward percentiles were included
calculateRewards := rewardCount != 0

// fetch block
for blockID := blockStart; blockID < blockEnd; blockID++ {
index := int32(blockID - blockStart)
Expand All @@ -174,25 +178,34 @@ func (e *EVMBackend) FeeHistory(
return nil, err
}

onefeehistory := rpctypes.OneFeeHistory{}
err = e.processBlock(tendermintblock, &ethBlock, rewardPercentiles, tendermintBlockResult, &onefeehistory)
oneFeeHistory := rpctypes.OneFeeHistory{}
err = e.processBlock(tendermintblock, &ethBlock, rewardPercentiles, tendermintBlockResult, &oneFeeHistory)
if err != nil {
return nil, err
}

// copy
thisBaseFee[index] = (*hexutil.Big)(onefeehistory.BaseFee)
thisGasUsedRatio[index] = onefeehistory.GasUsedRatio
for j := 0; j < rewardcount; j++ {
reward[index][j] = (*hexutil.Big)(onefeehistory.Reward[j])
thisBaseFee[index] = (*hexutil.Big)(oneFeeHistory.BaseFee)
thisGasUsedRatio[index] = oneFeeHistory.GasUsedRatio
if calculateRewards {
for j := 0; j < rewardCount; j++ {
reward[index][j] = (*hexutil.Big)(oneFeeHistory.Reward[j])
if reward[index][j] == nil {
reward[index][j] = (*hexutil.Big)(big.NewInt(0))
}
}
}
}

feeHistory := rpctypes.FeeHistoryResult{
OldestBlock: oldestBlock,
Reward: reward,
BaseFee: thisBaseFee,
GasUsedRatio: thisGasUsedRatio,
}

if calculateRewards {
feeHistory.Reward = reward
}

return &feeHistory, nil
}
12 changes: 4 additions & 8 deletions rpc/ethereum/backend/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,16 @@ func (e *EVMBackend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Tran
return args, errors.New("latest header is nil")
}

cfg := e.ChainConfig()

// If user specifies both maxPriorityfee and maxFee, then we do not
// need to consult the chain for defaults. It's definitely a London tx.
if args.MaxPriorityFeePerGas == nil || args.MaxFeePerGas == nil {
// In this clause, user left some fields unspecified.
if cfg.IsLondon(head.Number) && args.GasPrice == nil {
if head.BaseFee != nil && args.GasPrice == nil {
if args.MaxPriorityFeePerGas == nil {
tip, err := e.SuggestGasTipCap()
tip, err := e.SuggestGasTipCap(head.BaseFee)
if err != nil {
return args, err
}

args.MaxPriorityFeePerGas = (*hexutil.Big)(tip)
}

Expand All @@ -65,12 +62,11 @@ func (e *EVMBackend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Tran
}

if args.GasPrice == nil {
price, err := e.SuggestGasTipCap()
price, err := e.SuggestGasTipCap(head.BaseFee)
if err != nil {
return args, err
}

if cfg.IsLondon(head.Number) {
if head.BaseFee != nil {
// The legacy tx gas price suggestion should not add 2x base fee
// because all fees are consumed, so it would result in a spiral
// upwards.
Expand Down
6 changes: 3 additions & 3 deletions rpc/ethereum/namespaces/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (e *PublicAPI) GasPrice() (*hexutil.Big, error) {
err error
)
if head := e.backend.CurrentHeader(); head.BaseFee != nil {
result, err = e.backend.SuggestGasTipCap()
result, err = e.backend.SuggestGasTipCap(head.BaseFee)
if err != nil {
return nil, err
}
Expand All @@ -218,11 +218,11 @@ func (e *PublicAPI) GasPrice() (*hexutil.Big, error) {
// MaxPriorityFeePerGas returns a suggestion for a gas tip cap for dynamic fee transactions.
func (e *PublicAPI) MaxPriorityFeePerGas() (*hexutil.Big, error) {
e.logger.Debug("eth_maxPriorityFeePerGas")
tipcap, err := e.backend.SuggestGasTipCap()
head := e.backend.CurrentHeader()
tipcap, err := e.backend.SuggestGasTipCap(head.BaseFee)
if err != nil {
return nil, err
}

return (*hexutil.Big)(tipcap), nil
}

Expand Down
10 changes: 8 additions & 2 deletions x/evm/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,17 @@ func (k *Keeper) traceTx(
// Depending on the tracer type, format and return the trace result data.
switch tracer := tracer.(type) {
case *logger.StructLogger:
// TODO: Return proper returnValue
returnVal := ""
revert := res.Revert()
if len(revert) > 0 {
returnVal = fmt.Sprintf("%x", revert)
} else {
returnVal = fmt.Sprintf("%x", res.Return())
}
result = types.ExecutionResult{
Gas: res.GasUsed,
Failed: res.Failed(),
ReturnValue: "",
ReturnValue: returnVal,
StructLogs: types.FormatLogs(tracer.StructLogs()),
}
case tracers.Tracer:
Expand Down
Loading