Commit Graph

23 Commits

Author SHA1 Message Date
yihuang
d6a64a275a
evm: fix import/export genesis for contract storage (#590)
* Problem: import/export roundtrip test fail contract storage

Closes: #589

- don't hash the key again in InitGenesis

* changelog

* try to fix estimate-gas undeterministics Closes #536
2021-09-27 12:26:45 +02:00
yihuang
116de54617
evm: remove tx logs and block bloom from chain state (#556)
Closes #452

fix unit tests

changelog and fix lint

fix unit test

Update ethereum/rpc/backend/backend.go

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

Update ethereum/rpc/backend/utils.go

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

changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-09-15 09:45:03 +00:00
Federico Kunze Küllmer
c73ce0f812
all: cleanup imports (#524) 2021-09-03 18:06:36 +00:00
Federico Kunze Küllmer
b5288399d3
ci: liveness test (#498)
* ci: liveness test

* rm key

* makefile

* chmod

* update docs
2021-08-26 15:21:43 +00:00
Federico Kunze Küllmer
1ad9b4c1a5
evm: EIP1559 & go-ethereum related updates (#469)
* updates

* more changes

* proto updates

* tidy

* v1beta1

* update buf

* lint

* comments

* typo
2021-08-25 14:45:51 +00:00
Federico Kunze Küllmer
098da6d0cc
evm: code comments and cleanup (#404)
* evm: code comments and cleanup

* context comment

* abci, tx type event and metrics

* statedb comments
2021-08-05 16:24:06 +00:00
yihuang
54581269b8
evm: change log tx index to index in block (#354)
Closes #334
2021-07-26 04:40:59 -04:00
yihuang
0113b4d2c0
fix: return ethereum-formatted tx hash to client (#202)
* return eth tx hash to client

Closes #67

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>

change GetTxByEthHash to method

add entry to changelog

* use eth tx hash internally
2021-06-30 05:35:11 -04:00
Federico Kunze
e639cb4a82
evm: use TransientStore for AccessList (#75)
* evm: use transient store for access list

* evm: remove address and slot access list mappings

* update tests

* update

* changelog

* update types
2021-06-07 06:05:49 -04:00
Federico Kunze
abcfc9a6ba
evm: error and block hash map updates (#60)
* evm: error and block hash map updates

* evm: update tests
2021-05-31 10:54:59 -04:00
Federico Kunze
6c1e7fec01
app, ante, evm: Keeper StateDB refactor (#30)
* evm: keeper statedb refactor

* keeper: implement stateDB account, balance, nonce and suicide functions

* keeper: implement stateDB code and iterator functions

* keeper: implement stateDB log and preimage functions

* update code to use CommitStateDB

* tests updates

* journal changes (wip)

* cache fields

* journal and logs

* minor cleanup

* evm: remove journal related changes

* evm: delete empty account code and storage state

* app, evm: transient store

* ante, evm: refund gas transient

* evm: remove transient keeper state fields

* address comments from review

* evm: undo revision change
2021-05-25 08:56:36 -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
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
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
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
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
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
09a71a2a3a
eth_getBlockByHash and block hash mapping functionality (#114)
* Set up block hash to height mapping storage and fixed linting issues

* fix typos

* Set up module query for block height

* fix bug with block mappings and implemented get block by hash

* Fix other consensus hash references
2019-09-27 10:08:45 -04:00
David Ansermino
92dc7d9a59
Basic RPC and CLI Queries (#77)
- Adds ethermint query command (`emintcli query ethermint <query>`)
    - Supports block number, storage, code, balance lookups
- Implements RPC API methods `eth_blockNumber`, `eth_getStorageAt`, `eth_getBalance`, and `eth_getCode`
- Adds tester utility for RPC calls
    - Adheres to go test format, but should not be run with regular suite
    - Requires daemon and RPC server to be running
    - Excluded from `make test`, available with `make test-rpc`
- Implemented AppModule interface and added EVM module to app
    - Required for routing
- Implements `InitGenesis` (`x/evm/genesis.go`) and stubs `ExportGenesis`
- Modifies GenesisAccount to match expected format
2019-07-25 16:38:55 -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
David Ansermino
1d490ba4d9 Adds AppModuleBasic and Genesis Functions (#62)
* Adds AppModuleBasic implementation and genesis functions

* Fixes  broken links

* Adds .idea/

* Adds starter for missing genesis funcs

* Completes AppModuleBasic interface

* Removes comment
2019-07-08 12:02:20 -04:00