* 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
* Update test scripts and CI
* Update timeout
* Update test-helper
* fix issue for staking test
* fix bug in test helper
* reduce block time
* Update test cases
* use truffle 5.4.14 as global
* remove two checks
* reduce block time to 150ms
* fix patches paths
* Update test scripts
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Problem: No test on the transaction receipt api
Closes: #582
- add receipt rpc test for erc20 transfer logs
* lower gas fee
* build with go 1.17 in CI
* use go 1.17 in test-solidity
* fix merge
* test DynamicFeeTx against state_transition_benchmark_test
* add feemarketGenesis in the app setup param
* add dynamicTxFee flag to KeeperTestSuite
* add feemarketGenesis.BaseFee setup
* update TestAddLog
* fix gasFeeCap assignment in newMsgEthereumTx
* modify keeperTestSuite helper functions to support dynamicTxFee
* update test cases in grpc_query_test w/ dynamicTxFee
* update the evm keeper utils tests
* add dynamic tx fee in the ante tests
* remove duplicate type define
* fix error return type
* update changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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
Add bencher config with global +-10% threshold for improvements and regressions
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* evm: unit tests
* Add unit tests for DynamicFeeTx.Validate()
* Start get and set signature values tests
* get set values
* Add tests for GetTo()
* Add GetNonce test
* Add GetValue test
* Start copy test
* Add WIP newDynamicFeeTx test
* Add WIP legacy_tx_test
* pair programming session
* Add TestLegacyTxValidate
* Add TestLegacyTxSetSignatureValues & GetSignatureValues
* Add legacyTx tests
* Merge main, forgot to save one file
* Add AccessList tests
* Add chain Config (fork order)
* Add invalid genesis account test
* Add params tests
* Add WIP tracer test
* tracer tests
* Add FormatLogs tests
* Add NewNoOpTracer test
* Refactor to test suite
* Refactor Tx Test suits to only use TxDataTestSuite
* Update link to geth interpreter
* Update x/evm/types/params.go
* Refactor accessListTx Test suits to use TxDataTestSuite
Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
* 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
* Problem: deep context stack efficienty is not benchmarked
Closes: #626
Solution:
- add a benchmark to demonstrate an extremely inefficiency in deep
context stack
* Update x/evm/keeper/benchmark_test.go
* prefix storage is irrelevant
* add comment to state_transition.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Problem: tx log attribute value not parsable by some client
Closes: #614
Solution:
- encode the value to json string rather than bytes
Apply suggestions from code review
* rm cdc and changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>