* 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>
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>
* x/evm/keeper: save 24B with Go in-condition variable idiom
The prior code doubly invoked (*ethereum/go-ethereum/core/types.Transaction).To()
which is quite expensive, and firstly copies 20 bytes each time, then
that gets rounded up to the proper size class/pointer alignment so on
64-bit machines 20B -> 24B.
Isolating a benchmark for this code per issue #826 shows this saves
quite a bit of bytes and some nano seconds which all count up towards
the transactions per seconds being processed:
```shell
$ benchstat before.txt after.txt
name old time/op new time/op delta
CopyAddr-8 38.4ns ± 3% 19.3ns ± 3% -49.66% (p=0.000 n=10+10)
name old alloc/op new alloc/op delta
CopyAddr-8 48.0B ± 0% 24.0B ± 0% -50.00% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
CopyAddr-8 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.000 n=10+10)
```
Fixes#826
* changelog
* lint
* Revert stray changes that were used in testing
* rm log
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.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: 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>
It's better to always close the db before exit, so we will be noticed
when any error happens. Otherwise, serious errors can silently happen,
e.g, corrupted db, pending write missing ...
Fixes#538
* Problem: verbose logs display with FATAL option (fix#320)
add my script
increase amount for metamask
add run
amount ok
hide log
show info
my logger
hook log
revive eth log
tidy up
use suplog
log replace ok
removed suplog
tidy up
tidy up
fix compile
remove sh
tidy up
tidy up
* logger handler
* fix
* fix eth log override (#371)
remove redundant log
tidy up
* log test
* c++
Co-authored-by: jongwhan lee <jonghwan@crypto.com>
Co-authored-by: Jongwhan Lee <51560997+leejw51crypto@users.noreply.github.com>
* sync start command with cosmos-sdk 0.43
Closes#340
- add grpc web and rosetta server
- add tx/tm services
- add standalone mode
- update cosmos-sdk to 0.43.0-rc2, which fixed a bug in service startup
- add EnableUnsafeCORS option to evm rpc server
* set keyring options in root cmd and use viper prefix
* fix linter and pr suggestions
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* API Hello World
* Added all the debug functions + more data to try implementing the GC functions
* Getting transactions information
* Added cpu profile first approach functions
* new struct for cpuprofile and read filename from params
* cpuprofile, gcstats and memstats
* added comment
* All endpoints returns error instead of string
* Code cleanup
* Changed errors messages to match go-eth returns
* Removed activated flag and just using the file to check if it's running
* Added new endpoints to the json_rpc.md file
* GoTrace debug endpoints added
* Block profile endpoint added
* missing goeth calls
* added debug logs
* divide debug and internal api
* Using ExpandHome on server configuration
* Added rpc changes to changelog
* Logging go trace status
* Removed logger functions and moved logger errors to debug
* Added more logs to go trace
* Added more datailed changelog
* Removed trace debug api interface
* added comments
* cleanup
* Updated changelog
* disable lint on cpuprofile rename
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* return error in StopCpuProfile
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* return error in StopGoTrace
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* implement suggested changes
Co-authored-by: ramacarlucho <ramirocarlucho@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* do binary search to estimate gas
Closes#268
- Also refactor ApplyMessage to be more reuseable
move binary search to rpc api side to have a clean context each try
remove EstimateGas grpc api
* extract BinSearch function and add unit test
* do estimateGas in grpc query
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
- Introduces rpc command to cli (rest-server)
- Moves server/rpc to rpc/
- Enables module selection (eg. "web3" or "eth" or "web3,eth"), however there is no CLI flag to configure these (See #74)
- Adds CLI context to eth API