Commit Graph

27 Commits

Author SHA1 Message Date
Federico Kunze
44876ac72f
types: account balance fix (#507)
* fix hardcoded photon on account balance getter/setter

* types: testing suite

* balance test

* update zero diff

* add case for other coin

* changelog

* fix journal test
2020-09-09 10:53:14 -03:00
Federico Kunze
792c1ff756
evm: params (#458)
* evm: params

* setup

* bump commit

* fixes

* increase gas usage

* tests

* evm denom param

* more config updates

* update genesis

* update ante handler

* csdb param test

* more tests and fixes

* update statedb.Copy

* lint

* additional test

* fix importer tests

* fix AnteHandler test

* minor update

* revert

* undo gas update

* stringer test

* changelog

* fix csdb index error (#493)

* attempt to fix

* cleanup

* add idx check

* update csdb.Copy

* update default hash

* update querier

* update rpc tests

* fix estimate gas test

Co-authored-by: noot <36753753+noot@users.noreply.github.com>
Co-authored-by: noot <elizabethjbinks@gmail.com>
2020-09-02 15:41:05 -04:00
Federico Kunze
26816e2648
evm: debug non-determinism (#496)
* evm: debug non-determinism

* add tests

* changelog
2020-09-02 14:33:03 -04:00
noot
a6e152bbb6
fix csdb.Copy (#488) 2020-08-31 10:59:47 -04: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
de8d8acf77
x/evm: StateBD tests (#407)
* draft state_transition

* working test

* keeper test

* statedb rewrite

* fix tests

* add keeper statedb test

* minor changes

* x/evm: StateBD tests

* try fix

* fix stateObject.setState

* Update x/evm/types/state_object.go

* update stateObject.setState

* uncomment test

* increase coverage

* fix test-import

* update rpc tests

Co-authored-by: Justin Thompson <justin.thompson12@hotmail.com>
Co-authored-by: noot <elizabethjbinks@gmail.com>
2020-07-27 15:33:16 -04:00
Justin Thompson
d69aad2016
x/evm: stateDB and keeper tests (#396)
* draft state_transition

* working test

* keeper test

* statedb rewrite

* fix tests

* add keeper statedb test

* minor changes

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-07-23 14:30:31 -04:00
Federico Kunze
90f39390bc
evm: fix non-determinism (#352)
* evm: fix non-determinism

* fixes

* typo

* fix tests

* use Storage slice

* more fixes

* lint

* merge development

* additional tests
2020-07-13 16:01:45 -04:00
noot
8ba6400e88
fix value transfer (#341)
* debugging balance and gas

* add prints

* remove gas consumption in ante handler

* cleanup

* fix test
2020-06-24 05:38:53 -04:00
noot
9f573690a6
implement eth_exportAccount (#331) 2020-06-17 14:23:36 -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
noot
4fd9ec3a26
genesis functions cleanup, testing (#318) 2020-05-29 11:50:22 -04:00
Federico Kunze
16df7725c5
evm: add missing genesis fields and export genesis state logic (#255)
* evm: export genesis state

* x/evm: split keeper.go

* x/evm: retrieve storage from address

* changelog

* fixes

* add check for nil logs

* update validation func

* fixes

* fix non-determinism

* stop storage iteration

* remove error return value

* update changelog

* fix test

* lint
2020-05-18 15:21:12 -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
Federico Kunze
c30205cae9
error migration (#254)
* migrate errors

* ante handler errors

* return err instead of panic
2020-04-16 11:47:39 -04:00
noot
199484fc2e
eth_getFilterLogs, eth_getLogs implementation (#248) 2020-04-13 15:18:50 -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
Austin Abell
6eef37b0c6
Finish and clean up module queries and txs (#152)
* Basic transactions set up (to be separated)

* Change transaction command to not include create operation (to include other command in next commit)

* set up create command and made minor changes

* wip implements module queries

* Added tests for query address decoding

* Added ambiguous encoding of to address in transaction and added tests

* Fix linting issue

* Move registering key types to application level to allow module usage to ignore

* Move genaccounts code to be reused

* Switches nonce increase to always happen in ante handler

* change SetNonce from keeper to point to actual nonce operation

* Remove no op nonce switch (not needed with clearing cache)

* Changes to update all accounts pre state transition and clear cache at end of block

* Update accounts before end of block commit (edge case where necessary)

* Fix nonce of sender going into evm in case it's checked, and let evm set contract starting nonce
2019-11-15 12:02:13 -05:00
Austin Abell
42227a1b8c
Fix eth_estimateGas and simulated txs (#142) 2019-11-04 11:59:16 -05:00
Austin Abell
8bb8b40b32
Emint tx type for eth_call and logs setup (#118)
* Implement new tx message type for eth_call and module txs and abstracted state transition, prepared db for logs

* Added transaction indexing to evm keeper

* Alternative count type
2019-10-03 12:46:02 -04:00
David Ansermino
d9d45b48b9
CSDB Keeper (#76)
- Implements Keeper. This is a wrapper around the "real" keeper (CSDB). Since we need to pass the context into the keeper we need to abstract the CSDB from the 
- Adds WithContext() to CSDB to support the above requirement
- Adds Keeper to app
2019-07-24 18:14:12 -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
Aleksandr Bezobchuk
ccc6ae6984 Fix linting errors 2018-10-24 10:53:23 -04:00
Aleksandr Bezobchuk
5b2496553c Update to reflect latest SDK changes 2018-10-24 10:49:37 -04:00
Aleksandr Bezobchuk
ad97634c24 Move old state code to x/evm/types 2018-10-24 09:46:14 -04:00