Commit Graph

364 Commits

Author SHA1 Message Date
Austin Abell
327abc4edf
Coin balance fix (#151)
* Fix setting account balances from assuming single denom

* Set order for end blocker to not override account balances

* Panic instead of ignoring error (case should never be hit)
2019-11-12 16:07:34 -05:00
Austin Abell
1f51b73d71
Fix block gas limit return for dev tooling (#150)
* cap formatted -1 value of tendermint block gas limit

* return blank miner address for dev tooling checks
2019-11-07 13:02:35 -05:00
Austin Abell
021c9f440a
Migrates gentx command to application (#144)
* Migrates gentx command to application for updated keybase

* Remove cosmos keys commands

* Fix genutil codec for key type

* Remove relevant TODOs
2019-11-05 11:50:55 -05:00
Austin Abell
97f73063a5
Updates SDK and implement application genaccounts (#143)
* Transition to updated sdk with modular ante handler and new genaccounts setup

* Update genesis account type to be an Ethermint account

* Change default keybase and tidy modules

* Fix lint
2019-11-04 15:45:02 -05:00
Austin Abell
42227a1b8c
Fix eth_estimateGas and simulated txs (#142) 2019-11-04 11:59:16 -05:00
Austin Abell
3ad2bb1de1
Cosmos-sdk version fix (#141) 2019-11-02 18:04:13 -04:00
Austin Abell
3cd6a0b136
Sanity check to make sure chain-id is set (#140) 2019-11-02 13:13:31 -04: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
9294fa8423
Fix edge case for accessing accounts through rpc (#134)
* Add mutex and close keybase database correctly after use

* Add options http request to rpc API for remix
2019-10-31 11:09:40 -04:00
Austin Abell
c130105b86
Fix EVM out of gas handling (#133) 2019-10-30 14:39:46 -04:00
Dustin Brickwood
69e0873dd9
eth_estimateGas (#128)
* Draft eth_estimateGas
* implemented eth_estimateGas
* refactored doCall to be used for both eth_call and eth_estiamteGas

* updated to reflect requested changes

* moved GenerateFromArgs func

* removed todo

* revert comment

* fixes dereference issue

* gofmted
2019-10-30 13:30:24 -05:00
Austin Abell
741dfeb461
Revert journal changes from simulated transactions (#132) 2019-10-30 11:16:00 -04:00
Austin Abell
51ff5d48a9
Fixes gas limit for simulated transaction (#130)
* Fixes call gas limit for stdTxs

* reword comment
2019-10-29 11:52:26 -04: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
475919274e
Tx receipt query fix (#126)
* Fixed tx receipt error on failed transaction

* Add returnData to failed transaction for logs bloom

* Change comment to TODO
2019-10-23 01:04:51 +09:00
Austin Abell
160e82b2ad
Implement eth_pendingTransactions, bump sdk version (#124)
* Update sdk version, implement pending txs, fix nonce check

* Bump cached dependencies in circleCI

* bump circleci go version

* updated linter and fixed bugs relating to go version 1.13
2019-10-19 08:23:09 +09:00
Austin Abell
9802cbc98e
Gas usage implementation (#123)
* Set up gas consumption based on gas limit

* Convert evm gas meter to be infinite since being ignored

* Remove unnecessary declaration

* Update fees paid to validators to be function of gas limit and price instead of just gas

* added nonce check for node tx execution

* Increment account nonce after mempool check

* Remove unnecessary nonce increment
2019-10-19 08:14:38 +09:00
Austin Abell
dc25d847c3
Implements eth_getProof (#122)
* Implemented eth_getProof and cleaned logs query types

* Rename ethereum logs query type
2019-10-16 09:46:50 +09:00
Austin Abell
5a19ae5706
Implements net_version for Ethers (#121) 2019-10-15 10:20:35 +09:00
Dustin Brickwood
a61f3b892d
Filtering for eth_getLogs (#120)
* Filtered logs based param criteria
* addded PublicFilterAPI
* added filter logs func to filter based on params
* added Unmarshal func from go-ethereum

* Linted

* made requested changes
2019-10-07 22:32:28 -05:00
Austin Abell
eab81bc578
block and tx logs bloom and tx receipt logs (#119)
* Add bloom filter to tx receipt

* wip tx receipt logs to be tested

* Added Bloom - Height Mapping
* keeper.go sets <height:bloombits>
* keeper.go gets <height> --> bloombits

* updating and querying bloom by block (to be tested with real logs)

* fix bug with contract address return

* added error handling instead of logging
2019-10-04 15:32:56 -04: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
Austin Abell
6ba38d6cee
Changed store type for block storage (#117) 2019-09-30 10:22:29 -04:00
Austin Abell
1119c650c6
Implements gettransactionbyblockhashandindex (#115) 2019-09-29 16:46:10 -04:00
Austin Abell
81fc39a9bc
Implement eth_getBlockTransactionCountByHash (#116) 2019-09-29 16:43:26 -04: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
Austin Abell
f7ad8f53f0
Sets up basic storage test for keeper and moves commit function to end of block in module from handler (#112) 2019-09-26 11:54:23 -04:00
Austin Abell
46e5278355
Add pruning option to application (#113) 2019-09-26 11:50:55 -04:00
Austin Abell
7f1eb4b0cf
Query and bug fixes (#110)
* Fix queries and bugs

* Fix issues from rebasing

* Fix rpc query address
2019-09-26 11:36:23 -04:00
Austin Abell
192ce2cc1c
Implement eth_syncing (#86)
* wip getting Ethereum spec syncing status

* Update sync query
2019-09-26 11:33:25 -04:00
Austin Abell
6cfeb6e754
eth_getTransactionReceipt Impl (#109)
* wip Implement get transaction receipt, waiting on details to finalize

* Fix response format for tx receipt

* Fix duplicate err check

* remove cumulative gas field

* Used byte conversion function
2019-09-25 14:38:33 -04:00
Austin Abell
26e90e729e
Implement eth_getTransactionByBlockNumberAndIndex (#107)
* Implements eth_getTransactionByBlockNumberAndIndex

* reuse convenience function for converting bytes to eth tx
2019-09-25 09:26:42 -04:00
Austin Abell
cfca4d10e6
Implements eth_getTransactionByHash (#108)
* Implement eth_getTransactionByHash and add function for converting bytes to eth tx

* Fix nil return on invalid hash

* Fix error check
2019-09-24 21:58:29 -04:00
Austin Abell
9383c743dd
Implement block tags (#106)
* Implemented tm/ethermint specific block tags

* Fix edge case for block query
2019-09-24 17:38:58 -04:00
Austin Abell
d1900826a0
Fix transaction hash return (#105) 2019-09-24 14:41:59 -04:00
Austin Abell
4a030335e6
eth_getBlockByNumber impl (#87)
* WIP implement eth_getBlockByNumber

* Implemented some missing fields

* Added gasLimit and updated previous fields

* Implement remaining pieces for eth_getBlock including decoding txs

* Add converting transaction objects into function for usability

* Clean up code

* format block in function for usability

* Fixed formatting and cached gasLimit value
2019-09-24 14:39:17 -04:00
David Ansermino
1cac4feb4d
Minor fixes (#94)
- Updates RPC return types
- Removes custom query types in favour of default eth 
    - This is largely to allow for proper hexadecimal formatting (provided by `hexutil`), as the API is very specific about formatting.
2019-09-24 16:49:40 +02:00
Austin Abell
28aaba0695
Implement eth_sendTransaction (#104)
* Set up framework for sending transaction with correct args and nonce mutex locking

* Set up printing ethereum address through emintkeys and getting chainid from flags

* Implemented defaults for eth_sendTransaction

* Fix bug with no data provided

* Updated comments and error, as well as RLP encoded tx bytes for return instead of amino encoded
2019-09-20 09:30:20 -04:00
Austin Abell
2ca42cc155
Implement eth_sendRawTransaction (#101)
* Implement sendRawTransaction (tx not being broadcasted to node from server)

* Add broadcast type flag to rpc API and fixed amount validation

* Add documentation
2019-09-18 16:14:39 -04:00
Austin Abell
69567e29d5
Override auth module codec for all references to Ethermint codec (#103) 2019-09-18 14:50:06 -04:00
Austin Abell
6c72a79035
RPC unlock Ethermint key and eth_sign (#99)
* Set up personal account api for personal sign

* Added unlocking key functionality and attach to eth rpc

* Implemented eth_sign

* Transform V in sig based on yp and fix bug

* Fix lint issue

* Remove escape character from comment

* Switch error handling to panic on invalid unlocked key
2019-09-18 14:45:21 -04:00
Austin Abell
02047bf8bf
Implement eth_accounts (#100) 2019-09-18 09:58:48 -04:00
Austin Abell
1b5c33cf33
EVM Transaction handler and contract creation (#96)
* WIP implementing state transition function

* Error handling and application setup fix

* Fixed error comment

* Allow creation of state objects with a BaseAccount

* Fixed parameters and finalise state after transaction

* updated transaction signing and cli signature

* Set up consistent account encoding and decoding

* Update txbuilder to get sequence before generating eth tx

* Added create functionality to the CLI command

* Remove need to copy over context for statedb interactions

* Updated account retriever

* Cleaned up handler code and updated TODO

* Make recoverEthSig private again

* Add error check for committing to kv store

* Remove commented out code

* Update evm chain config for state transition

* Add time in context for dapps
2019-09-18 09:51:18 -04:00
Austin Abell
72fc3ca3af
Transaction signing and encoding (#95)
* WIP setting up evm tx command and updating emint keys output

* Fix linting issue

* Wip restructuring to allow for ethereum signing and encoding

* WIP setting up keybase and context to use Ethermint keys

* Fixed encoding and decoding of emint keys

* Adds command for generating explicit ethereum tx

* Fixed evm route for handling tx

* Fixed tx and msg encoding which allows transactions to be sent

* Added relevant documentation for changes and cleaned up code

* Added documentation and indicators why code was overriden
2019-09-15 12:12:59 -04:00
Austin Abell
4c29c48905
Add missing nonce query to evm module (#92) 2019-09-07 12:41:15 -04:00
Austin Abell
1e48e2b115
eth_getTransactionCount implementation (#91)
* Implemented eth_getTransactionCount endpoint

* Linting fixes
2019-09-06 10:46:26 -04:00
Austin Abell
0e942527da
Fixed error handling in rpc endpoints (#89) 2019-09-03 08:48:30 -04:00
Austin Abell
9c0015678f
Implements eth_getBlockTransactionCountByNumber (#88)
* Implements eth_getBlockTransactionCountByNumber

* Added error handling for getting block at height
2019-09-02 20:42:58 -04:00
Austin Abell
f5dc62a30f
changed context to get at given block height (#85) 2019-08-28 15:13:34 -02:30
Austin Abell
f0e2c01f57
Update AnteHandler in the Ethermint app (#83) 2019-08-19 11:31:40 -04:00