Commit Graph

32 Commits

Author SHA1 Message Date
Federico Kunze Küllmer
26c5eabb18
all: linter (#532)
* add additional linters

* fixes

* rm action
2021-09-05 11:03:06 +00:00
Federico Kunze Küllmer
d068f5b331
server: logger handler (#343)
* 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>
2021-08-19 16:55:13 +00:00
yihuang
14b38af8bc
rpc, evm: use binary search to estimate gas (#272)
* 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>
2021-07-19 15:19:23 +00:00
yihuang
1a48e09e78
rpc: implement eth_getPendingTransactions (#259)
* Implement `eth_getPendingTransactions`

Closes #244

* refactor repeatitive code

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* test UnwrapEthereumMsg

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-12 17:42:53 +00:00
Federico Kunze
8a2a8d377f
evm: fix types unit tests (#154)
* tests: fix evm unit tests

* lint
2021-06-21 09:09:23 -04:00
Federico Kunze
0c6e44d3d3
evm: remove CommitStateDB, journal and stateObject (#84)
* evm: remove CommitStateDB and stateObject

* imported build fixes

* lint

* rm set nonce

* update account response

* changelog
2021-06-08 13:10:29 -04:00
Federico Kunze
2c722d03ce
rpc, evm: gRPC tests (#28)
* rpc, evm: grpc tests

* address validation

* update rpc

* test cleanup

* additional tests
2021-05-17 06:13:08 -04:00
Federico Kunze
65453e4aa0
rpc, evm: secure tx signing (#20)
* rpc, evm: secure signing

* evm, ante: test signer

* tests
2021-05-12 09:08:31 -04:00
Federico Kunze
117342b1b3
all, deps: bump go-ethereum version (#5)
* evm, rpc: access lists, JSON-RPC and transaction updates (wip)

* ante, evm, rpc: update signature verification

* evm: msg server and tests updates

* evm: tests (wip)

* evm: fix cdc and params

* evm: cleanup state transition

* fix nil cases

* lint
2021-05-10 12:34:00 -04:00
Federico Kunze
614e62fb7e
additions 2021-04-18 17:54:18 +02:00
Federico Kunze
5a3d514ba0
conflicts 2021-04-17 12:00:07 +02:00
Ray Pierre
75fb3ccb89
fix incorrect blockHash in evm (#780)
* Fix wrong blockHash value in evm

* fix ut

* store current block hash in BeginBlock

* update ut

* update comment

* add changelog
2021-03-18 20:04:29 -07:00
MichaelWang
dce0b0cffb
evm: fix pointer in ResultData.String() (#733) 2021-01-20 14:33:05 -03:00
Federico Kunze
c4a3c0a96e
evm: implement vm.GetHashFn (#620)
* evm: implement vm.GetHashFn

* check nil case

* test

* handle 3 cases

* use switch statement

* stateDB tests

* abci changes

* fix LGTM issue

* final tests

* changelog

* remove epoch

* update test

* clean test

* rm epoch
2020-12-07 21:09:09 +01:00
Federico Kunze
4e01da905a
crypto: refactor for stargate (#559)
* changelog

* update changelog

* crypto: refactor for stargate

* fixes

* fix keys

* changelog
2020-10-06 20:57:55 +02:00
Federico Kunze
261f86fdf2
bump SDK to v0.39.1 (#386)
* bump sdk version to v0.39.0 candidate

* updates

* update evm

* bump commit

* more changes

* build

* genesis

* fix tests

* fix tests

* bump commit

* bump commit

* bump commit

* add keygen func

* bump version to 0.39.0-rc0

* update AnteHandler

* fix TxDecoder

* lint

* fix test

* update statedb

* changelog

* fixes

* remove extra files

* update make test-import

* rename test

* bump SDK version to final release

* update to 0.39.1-rc1

* fix evm tests

* update RPC

* minor fixes

* update to rc2

* bump to v0.39.1

* fix personal API

* fix string type cast ambiguity (#449)

* init

* fix estimate gas test

* minor genesis change

* remove comments from unstable commit (stargate release)

Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
2020-08-23 17:41:54 -04:00
Federico Kunze
c8b8f49675
run make format (#351)
* run make format

* fix yaml

* fixes
2020-07-02 11:19:48 -04:00
Federico Kunze
427e96c1de
evm: various fixes (#319)
* evm: use prefix stores, move SetBlockBloom to EndBlock, bug fixes

* add logs to genesis state

* log tests

* commit and finalize on InitGenesis

* validate TransactionLogs

* changelog

* fix test-import

* fix lint

* add more tests
2020-06-04 06:40:21 -04:00
Federico Kunze
26d4e968e0
remove duplicate query in receipts (#273)
* logs tests

* updates

* String()

* remove extra query, add comments

* test fixes

* lint

* lint
2020-05-02 21:56:18 -04:00
Federico Kunze
d3c802f99e
x/evm: logger (#272)
* x/evm: logger

* changelog

* go mod verify and tidy

* typo
2020-04-29 23:36:30 -04:00
Federico Kunze
8ec7edf5bd
x/evm: unit tests and fixes (#223)
* evm: move Keeper and Querier to /keeper package

* keeper: update keeper_test.go

* fix format

* evm: use aliased types

* bump SDK version to v0.38.1

* app: updates from new version

* errors: switch sdk.Error -> error

* errors: switch sdk.Error -> error. Continuation

* more fixes

* update app/

* update keys and client pkgs

* build

* fix tests

* lint

* minor changes

* changelog

* address @austinbell comments

* Fix keyring usage in rpc API and CLI

* fix keyring

* break line

* Misc cleanup (#188)

* evm: move Begin and EndBlock to abci.go

* evm: use expected keeper interfaces

* app: use EthermintApp for integration and unit test setup

* evm: remove count type; update codec

* go mod verify

* evm: rename msgs for consistency

* evm: events

* minor cleanup

* lint

* ante: update tests

* changelog

* nolint

* evm: update statedb to create ethermint Account instead of BaseAccount

* fix importer test

* address @austinabell comments

* update README

* changelog

* evm: update codec

* rename GasLimit->Gas and Price ->GasPrice

* msg cleanup and tests

* cleanup TxData

* fix marshaling

* revert rename

* move types

* evm/keeper: querier tests

* switch MarshalLengthPrefixed -> BinaryBare; remove panics

* fix event sender

* fix panic

* try fix txDecoder error

* evm: handler tests

* evm: handler MsgEthermint test

* fix tests

* store logs in keeper after transition (#210)

* add some comments

* begin log handler test

* update TransitionCSDB to return ReturnData

* use rlp for result data encode/decode

* update tests

* implement SetBlockLogs

* implement GetBlockLogs

* test log set/get

* update keeper get/set logs to use hash as key

* fix test

* move logsKey to csdb

* attempt to fix test

* attempt to fix test

* attempt to fix test

* lint

* lint

* lint

* save logs after handling msg

* update k.Logs

* cleanup

* remove unused

* fix issues

* comment out handler test

* address comments

* lint

* fix handler test

* address comments

* use amino

* lint

* address comments

* merge

* fix encoding bug

* minor fix

* rpc: error handling

* rpc: simulate only returns gasConsumed

* rpc: error ineffassign

* evm: handler test

* go: bump version to 1.14 and SDK version to latest master

* rpc: fix simulation return value

* breaking changes from SDK

* sdk: breaking changes; build

* tests: fixes

* minor fix

* proto: ethermint types attempt

* proto: define EthAccount proto type and extend sdk std.Codec

* evm: fix panic on handler test

* evm: minor state object changes

* cleanup

* tests: update test-importer

* fix evm test

* fix pubkey registration

* lint

* cleanup

* more test checks for importer

* minor change

* codec fixes

* rm init func

* fix importer test build

* fixes

* test fixes

* fix bloom key

* rm unnecesary func

* remove comment

Co-authored-by: austinabell <austinabell8@gmail.com>
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2020-04-23 11:49:25 -04:00
Federico Kunze
4d609b2a22
bump Cosmos SDK version to v0.38.2 (#183)
* evm: move Keeper and Querier to /keeper package

* keeper: update keeper_test.go

* fix format

* evm: use aliased types

* bump SDK version to v0.38.1

* app: updates from new version

* errors: switch sdk.Error -> error

* errors: switch sdk.Error -> error. Continuation

* more fixes

* update app/

* update keys and client pkgs

* build

* fix tests

* lint

* minor changes

* changelog

* address @austinbell comments

* Fix keyring usage in rpc API and CLI

* fix keyring

* break line

* Misc cleanup (#188)

* evm: move Begin and EndBlock to abci.go

* evm: use expected keeper interfaces

* app: use EthermintApp for integration and unit test setup

* evm: remove count type; update codec

* go mod verify

* evm: rename msgs for consistency

* evm: events

* minor cleanup

* lint

* ante: update tests

* changelog

* nolint

* evm: update statedb to create ethermint Account instead of BaseAccount

* fix importer test

* address @austinabell comments

* update README

* changelog

* evm: update codec

* fix event sender

* store logs in keeper after transition (#210)

* add some comments

* begin log handler test

* update TransitionCSDB to return ReturnData

* use rlp for result data encode/decode

* update tests

* implement SetBlockLogs

* implement GetBlockLogs

* test log set/get

* update keeper get/set logs to use hash as key

* fix test

* move logsKey to csdb

* attempt to fix test

* attempt to fix test

* attempt to fix test

* lint

* lint

* lint

* save logs after handling msg

* update k.Logs

* cleanup

* remove unused

* fix issues

* comment out handler test

* address comments

* lint

* fix handler test

* address comments

* use amino

* lint

* address comments

* merge

* fix encoding bug

* minor fix

* rpc: error handling

* rpc: simulate only returns gasConsumed

* rpc: error ineffassign

* go: bump version to 1.14 and SDK version to latest master

* rpc: fix simulation return value

* breaking changes from SDK

* sdk: breaking changes; build

* tests: fixes

* minor fix

* proto: ethermint types attempt

* proto: define EthAccount proto type and extend sdk std.Codec

* evm: fix panic on handler test

* evm: minor state object changes

* cleanup

* tests: update test-importer

* fix pubkey registration

* lint

* cleanup

* more test checks for importer

* minor change

* codec fixes

* rm init func

* fix importer test build

* fix marshaling for TxDecoder

* use amino codec for evm

* fix marshaling for SimulationResponse

* use jsonpb for unmarshaling

* fix method handler crashed

* return err on VerifySig

* switch stateObject balance to sdk.Int

* fixes to codec and encoding

* cleanup

* set tmhash -> ethhash in state transition

* add tmhash->ethereumhash to csdb.GetLogs

* attempt to  fix tests

* update GetLogs to switch with Has

* ante panic

* diff changes

* update SetLogs

* evm/cli: use ethermint codec

* use LengthPrefixed for encoding

* add check for nil *big.Int

* add balance to UpdateAccounts

* fix previous balance

* fix balance bug

* prevent panic on make test-import

Co-authored-by: austinabell <austinabell8@gmail.com>
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
Co-authored-by: noot <elizabethjbinks@gmail.com>
2020-04-22 15:26:01 -04:00
noot
35e7a98ab2
filters: begin implementation (#230)
* adds Filter type and related methods
* updates PublicFilterAPI to include backend, filter mapping
* stub out filter related eth_ functions
2020-04-01 20:43:59 -04:00
Federico Kunze
da9157e406
upgrade changes cleanup (#236)
* changes from update version

* app changes

* cmd changes

* build and send tx

* fix tests

* eth_rpc fixes

* lint

* add WithEventManager to handler ctx

* changelog

* go mod verify and tidy
2020-04-01 15:49:21 -03:00
Federico Kunze
87b625ed50
Tools configuration and linters (#215)
* tools config

* lint

* lint

* codecov
2020-03-16 19:53:24 -03:00
Dustin Brickwood
fc57cabcab
Linted Repo (#136)
* Linted
* Updated lint to include config file
* Linted repo
* Updated make command

* made requested changes

* added no lint
2019-11-01 10:26:53 -05:00
Austin Abell
2b4d2bea82 Implements eth_call (#127)
* Fixed tx receipt error on failed transaction

* Add returnData to failed transaction for logs bloom

* Added simulate call option, without returning evm data

* Added encoding and decoding of data from EVM execution for usability

* Remove unused context parameter

* Fix function comment and remove unnecessary logging on eth_call
2019-10-22 11:40:34 -05:00
Austin Abell
cfac906f92
Ethermint key generation (#78)
* WIP setting up Ethereum key CLI commands

* Functional key gen and showing Ethereum address

* Cleaned up changes

* WIP setting up Ethereum key CLI commands

* Functional key gen and showing Ethereum address

* Cleaned up changes

* Changed address to cosmos specific address

* Remove default bech32 prefixes and add basic add command test

* Changed Private key type to slice of bytes for compatibility and storability

* switch back to using cosmos crypto Keybase interfaces

* Changed key output to ethereum addressing instead of bitcoin and key generation to allow seeding from mnemonic and bip39 password

* Updated show command and added test

* Remove prefix requirement for showing keys and added existing keys commands to CLI temporarily

* Removed unnecessary duplicate code

* Readd prefixes for accounts temporarily

* Fix linting issue

* Remove TODO for setting PK to specific length of bytes (all functions use slice)

* Cleaned up descriptions to remove multi-sigs
2019-08-11 10:42:46 -04:00
Austin Abell
9803c1b80e
Updating ethereum version from fork (#68)
* syncing with updated ethereum version with local versions

* Revert updates back to go-ethereum v1.8.27

* Fixed chain-test change from undoing recent go-ethereum changes

* Fixes linting issues

* Remove unused interface implementations

* Updates cosmos-sdk version from relative dependency and updates auxiliary changes

* Upgrading ethereum version back to most recent since 1.9 release <:)

* syncing with updated ethereum version with local versions

* Revert updates back to go-ethereum v1.8.27

* Fixed chain-test change from undoing recent go-ethereum changes

* Fixes linting issues

* Remove unused interface implementations

* Updates cosmos-sdk version from relative dependency and updates auxiliary changes

* Upgrading ethereum version back to most recent since 1.9 release <:)

* Added documentation for cloned functions
2019-07-11 14:05:34 -04:00
Austin Abell
69333ec1b3
circleCI config and linting fixes (#3)
* Fixed circleci config and fixed linting warnings

* Updated circleCI for go version 1.12 and split jobs for build/testing

* updated go version to 1.12.5 for circleCI

* Go mod tidy dependencies

* Updated linting tools and cleared up code lint smells

* Added workflow to run build and test jobs

* Moved linting command to build workflow

* Get dependencies before linting by default

* Added go module flag to linter and increased deadline to pull packages
2019-07-02 15:36:22 -04:00
Alexander Bezobchuk
b821a85a64
R4R: CheckTx AnteHandler for Ethereum Tx Messages (#505)
* Rename Ethereum tx message
* Use new tx decoder in the ethermint app
* Update ante handler to prevent spam/dos
* Update ethereum msg signing/verification logic
* Implement secp256k1 key types
* Remove pointer from To method
* Move sig check to after inartistic gas check
* Add comment on chainID parsing
* Updated validateIntrinsicGas godoc
* Implement Fee method on eth tx msg
* Add reference to spec for recoverEthSig
* Upgrade TM to v0.27.0
2018-12-18 11:10:04 -05:00
Alexander Bezobchuk
a3619584f8 TX Routing Refactor (#496) 2018-11-28 14:19:22 -08:00