* 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>
* 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
Closes: #853
Solution:
- only set baseFeePerGas when base fee is not nil.
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Closes: #760
Solution:
- emit tx index to cosmos events
- rpc side try to use the events, but fallback to heavier approach when fails.
Update rpc/ethereum/namespaces/eth/api.go
changelog
fix lint
fix TxIndexFromEvents
fix
Update rpc/ethereum/backend/backend.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Use effectiveGasPrice in ante handler for dynamic fee tx
Closes: #814
Solution:
- use effectiveGasPrice when check minimal-gas-prices, and deduct fee in ante handler
- implement an EthMempoolFeeDecorator
* add effectiveGasPrice to tx receipt
* changelog
* fix unit test
* fix comments
* add comments
* Apply suggestions from code review
Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>
* review suggestions
Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* nobasefee param value should be consistent with block height
* update changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* remove gosec warnigs with medium severity
* Improvement(Ethermint): Fix gosec vulnerabilities
* Improvement(Evmos): address pr comments
* Improvement(Ethermint): Fix flags test by using PersistentFlags() instead of Flags()
* Improvement(Ethermint): Fix return of defer function
* Improvement(Ethermint): Replace PersistentFlags with Flags
* Apply suggestions from code review
* Improvement(Ethermint): Use persisentFlags again and remove required attribute for chain id
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Problem: web3 rpc api returns wrong block gas limit
Closes: #777
Solution:
- pass in specific block height to the query
* Apply suggestions from code review
* changelog
* Problem: need to add JSON-RPC endpoint personal_listWallets
Closes#745
* wallet level that manages accounts is not supported by keyring interface, will return nil
* changelog entry
* fix lint failure by exposing RawWallet as public
* fix notes typo
* Problem: need to add JSON-RPC endpoint personal_initializeWallet
Closes#738
* this is aimed at smartcard wallet which is not supported yet.
* changelog and not skip for expecting error
* fix personal_test error message assertion
* Apply suggestions from code review
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Problem: need to add rpc endpoint personal_unpair
Closes#730
* this is aimed at smartcard wallet which is not supported yet.
* will return unsupported error now.
* Update rpc/ethereum/namespaces/personal/api.go
* add changelog entry and use errors.Is
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
Closes#709
fix index
Apply suggestions from code review
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
fix lint
transaction decoding unit test
test BuildTx
fix lint
changelog
* Problem: state transition code is duplicated
Closes: #672
Solution:
- move gas refund out from ApplyMessage
- move check into ApplyMessage
- move evm construction into ApplyMessage
- ensure context stack is clean after ApplyMessage return
fix unit tests
undo rename
add underflow check
* improve performance
- don't duplicate params loading
- passing EVMConfig around as pointer
* Problem: No way to limit total number of filters that can be created
Solution: Add a config parameter to set the total number of filters that can be created
* Add defer statement for releasing locks
* Change default value for filter cap to 200
* Changed data type of filter cap to int32
* Add changelog entry
* Update CHANGELOG.md
* Fix struct alignment
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* evm: fixed commented out simulations, pubsub, and handler tests
fixes#640
simulations are very basic: they can be built and executed,
but they don't generate any EVM-related transactions yet.
(It should be a matter of adding simulation-related code to the
modules + potentially extra helpers to the simulation.)
handler tests miss some extra assertions due to changes
in the return values snapshotting logic (ADR-001 and ADR-002).
Besides the test suites identified in the audit,
there's also "importer_test.go" which wasn't yet fixed.
(it'd require major rewriting + extra test resources)
* gofumpt
* fix rpc tests with net namespace
* skip personal test
* skip rpc pending test
* fix endpoint
* fix rpc pending test
* fix missing gas param in some rpc tests
* fix eth_getproof when the block number is equal to pending or latest
* fix rpc tests filter subscribe failed
* lint
* remove unused linter
* fix PendingTransactionFilter and TestEth_GetFilterChanges_BlockFilter
* fix eth_estimateGas
* fix TestEth_EstimateGas_ContractDeployment
* skip TestEth_ExportAccount_WithStorage
* remove sleep in rpc test
* Update changelog
* add test-rpc in github action
* bump golangci-lint version to v1.42.1