* fix json-rpc failures for pruned nodes
Closes: #1123
Solution:
- try to parse base fee from events if grpc query failed
- use a `nil` base fee if failed to parse base fee from events
- use zero address if query validator address failed
- optimize some json-rpc apis by the way.
* changelog
* fix lint
* use GetTendermintBlockResultByNumber
* refactor
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* bug(feemarket): set lower bound of base fee to min gas price param)
* fix
* bug(feemarket): flag necessary improvement to integration tests, as the baseFee changes for every test
* bug(feemarket): add unit tests for CalculateBaseFee
* bug(feemarket): move integration test setup out of Describe block
* wip fix tests
* bug(feemarket): fix integration tests
* bug(feemarket): wip improve specs
* bug(feemarket): add spec concepts
* bug(feemarket): remove todo
* bug(feemarket): remove changes used for debugging in params
* bug(feemarket): remove todo in integration test
* add changelog
* address PR comments
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* min-gas-multiplier parameter should accept zero value
update min-gas-multiplier validation logic
* fix unit test
* changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Add min_gas_price to feemarket params
* Add MinGasPriceDecorators
* feemarket integration tests for MinGasPrice
* Restructure integration tests
* Simplify integration tests context
We use DeliverTx context to set up the app, otherwise not all settings are initialized.
We test CheckTx with `s.app.BaseApp.CheckTx(req)`, which uses the `CheckTx` mode and context.
* Update MinGasPrice spec in feemarket module
* reorder ethermint module order for initializing genesis
* feemarket migrations for adding MinGasPrice param
* update changelog
* Additional unit tests for MinGasPrice = 0, tx gas price > 0 (PR review)
https://github.com/tharsis/ethermint/pull/1104#discussion_r884991661
* Use 0 MinGasPrice for transaction simulations
* Fix duplicate registration of feemarket GenesisState and Params (PR review)
https://github.com/tharsis/ethermint/pull/1104#issuecomment-1141893712
* Emit eth tx hash in ante handler to support query failed transactions
WIP: #1045
Solution:
- emit eth tx hash in ante handler
- modify rpc to use it
fix ante handler
support failed tx in receipt
add unit tests
need to patch cosmos-sdk to work
update cosmos-sdk to v0.45.x release branch
fix failed status
fix unit tests
add unit test cases
cleanup dead code
Apply suggestions from code review
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
fix lint
fix review suggestions
fix build
fix gas used of failed tx
add back the redundant events
* fix get tx by index
* add unit tests for events
* Update rpc/types/events.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* update comments
* refactoring
* Update rpc/namespaces/ethereum/eth/api.go
* fix lint
* Apply suggestions from code review
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* min gas denominator implementation
* update changelog
* modify MinGasDenominator type to sdk.Dec
* fix typo in comments
* add comments
* update comment
* refactor logic
* remove unnecesary test
* fix typo on proto
* rename param
* fix tests
* use truncate and run mod tidy
* comment to default value
* update changelog
* rename temporary gas used
* integration tests
* add migrations
* add default as var
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Check EnableCreate/EnableCall in ante handler
WIP: #1045
Reject tx early in ante handler, avoid deduct user fee for vain.
* add unit tests
* update changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
* Problem: eth_newPendingTransactionFilter don't return correct tx hash
Closes: #1011
Solution:
- use eth tx hash rather than tendermint one
* changelog
* remove copied TODO comment and ignore err result of Notify
* add e2e test
* fix ws client in e2e test
* fix test
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* fix: Update the JSON-RPC to correct the return information.
* Update CHANGELOG.md
* update: move the tests to integration_test.go
* refactor the tests and use table tests instead
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Closes: #987
Solution:
- use local rpc clint if json-rpc is enabled.
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* eth_feeHistory - fix reward calculation from MsgEthereumTx
Problem:
- rewards calculation based on percentiles took into consideration the tendermint tx count instead of `MsgEthereumTx` count.
- `sorter := make(sortGasAndReward, tendermintTxCount)` creates an array of `{0 <nil>}` values.
The `nil` value from the `reward` attribute was never rewritten for tendermint Tx without any `MsgEthereumTx`
Fixes:
- return early if there are 0 `MsgEthereumTx`
- use the `MsgEthereumTx` count to calculate rewards
* Add change log