Commit Graph

104 Commits

Author SHA1 Message Date
Federico Kunze Küllmer
bcdb982886
rpc: geth v1.10.9 changes (#624)
* rpc: geth v1.10.9 changes

* updates

* suggestGasTipCap

* update gRPC

* resend

* fixes

* rm unused func

* address TODO
2021-10-06 11:22:32 +00:00
Federico Kunze Küllmer
a8722655bb
all: bump go-ethereum to v1.10.9 (#231)
* all: bump go-ethereum to v1.10.4

* build

* state transition and rpc

* wip rpc changes

* fix refund

* fixes

* no base fee param

* ante handler

* undo change

* fix test

* bump deps

* calculate base fee

* gRPC base fee query

* update RPC

* fix

* update'

* go.mod

* fix build

* fix panic

* rm changes in third_party

* json rpc changes

* reserved fields

* fixes fixes fixes

* rm no stringer

* fixes 2

* tests wip

* bump geth version

* update

* grpc traceTx

* rm fee market from ante

* fix TransactionArgs

* lint

* update proto

* update tx args

* changelog
2021-10-05 15:38:20 +00:00
yihuang
cda968bddd
evm, rpc: fix tx log attribute value is not parsable by some client (#615)
* Problem: tx log attribute value not parsable by some client

Closes: #614

Solution:
- encode the value to json string rather than bytes

Apply suggestions from code review

* rm cdc and changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2021-10-05 10:26:31 +00:00
Daniel Burckhardt
34c2593e43
rpc: restructure JSON-RPC directory and rename server config (#612)
* Restructure ethermint/rpc repo structure and change import statements

* Add #400 to changelog

* fix filepath in util and json_rpc

* Move #400  to unreleased section
2021-10-01 14:49:22 +00:00
Federico Kunze
cb2ab3d95d
more fixes 2021-04-18 18:39:15 +02:00
Federico Kunze
5a3d514ba0
conflicts 2021-04-17 12:00:07 +02:00
Daniel Choi
2df3abd6a2
Rpcapi fix - requires Eth namespace (#845)
* update join_network docs

* add eth as default in apis

* update changelog
2021-03-16 13:37:32 -07:00
Daniel Choi
d1e22e1544
add cmd flag for rpc api modules (#821)
* add cmd flag for rpc api modules
* fix test-contract race condition by sleeping
2021-02-26 13:52:33 -08:00
KamiD
fae8147352
Fix failed to call EstimateGas (#761)
* fix failed to call function EstimateGas

* add ut to test estimateGas after contract deployed
2021-02-16 13:04:29 -08:00
KamiD
177574aafa
fix error of timeout when using Truffle to deploy contract (#768)
* fix error of timeout when using Truffle to deploy contract

* fix CHANGELOG.MD

Co-authored-by: Daniel Choi <13338103+araskachoi@users.noreply.github.com>
2021-02-08 15:54:18 -08:00
Louis Liu
6d11e23326
rpc: fix method to calculate block hash and fix mismatch block hash in eth.getBlock response (#755) 2021-01-31 23:20:22 -03:00
KamiD
cfe629c14f
rpc: fix metamask pending while sending an error transaction (#711)
* fix pending state in metamaks wallet when sending an error tx and rejected by antehandle

* using abci.CodeTypeOK instead 0
2021-01-18 10:28:52 -03:00
Pierre
9ecd264ae0
Add API for compatible query of two types of transactions (#683)
* Add API for compatible query of two types of transactions

* format code

* optimize code

* optimize code

* format code

* optimize code

* add error handling

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2021-01-11 10:31:30 -03:00
Daniel Choi
d7bdbd7488
Fix nonce issue for replay attack (#692)
* fix nonce issue for replay attack

* fix lint

* add to changelog
2021-01-08 22:44:50 -03:00
Federico Kunze
9cbb4dcf6d
stargate: migrate types (#670)
* changelog v0.4.0

* stargate: types changes

* msg and handler changes

* validation

* fixes

* more fixes

* more test fixes

* changelog

* changelog

* lint

* rm comment

* lint

* redundant if condition
2021-01-06 17:56:40 -03:00
Pierre
1d084423a8
fix bug in function GetBlockCumulativeGas (#663) 2020-12-16 07:58:25 -03:00
Daniel Choi
cb96bc4ea3
Pending (#571)
* add PendingBlockNumber -1

* increase block times

* update bn

* get pending balance

* additional logic to check for pending state

* add multiple balance query

* pending state for getTransactionCount

* fix lint

* add getBlockTransactionCountByNumber code - commented

* cleanup test

* GetBlockTransactionCountByNumber

* cleanup

* getBlockByNumber

* GetTransactionByBlockNumberAndIndex

* conform to namespace changes

* exportable FormatBlock method

* eth_getTransactionByHash

* eth_getTransactionByBlockNumberAndIndex

* pending nonce

* set nonce for pending and check for invalid

* WIP: doCall

* add pending tx test

* cleanup + refactor

* push first tests and init pending

* pending changes (#600)

* cleanup

* updates

* more fixes

* lint

* update call and send

* comments and minor changes

* add pending tests into sep package

* fix latest case for eth_GetBlockTransactionCountByNumber

* fix repeating null transactions in queue

* remove repeated structs

* latestblock case

* revert init script back

* fix to exportable method

* automate pending tests; add make cmd

* move and comment out pending call test

* fix some golint

* fix unlock issue

* wip: linter stringer fix?

* stringer lint

* set arr instead of append

* instantiate with length

* sep if statement

* edit pendingblocknumber note

* switch statement

* fix and update tests

* move tests-pending into tests dir

* remove commented test

* revert to appending pendingtx

* Update tests/utils.go

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

* Update tests/utils.go

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

* Update tests/utils.go

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

* require no err

* rename var

* check result for eth_sendTransaction

* update changelog

* update

* Update tests/utils.go

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

* Update tests/tests-pending/rpc_pending_test.go

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

* changelog

* remove redundant check

Co-authored-by: noot <elizabethjbinks@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-12-15 19:52:09 +00:00
Federico Kunze
602e61adea
rpc: fix cumulative gas (#662)
* rpc: fix cumulative gas

* changelog
2020-12-15 20:42:58 +01:00
Federico Kunze
ef1bef16e5
rpc: protocol version (#575)
* evm: protocol version

* changelog

* version

* fix

* support latest version only
2020-12-08 20:51:26 +01:00
Federico Kunze
3072376371
rpc: fix deadlock (#614) 2020-11-24 16:15:42 +01:00
Federico Kunze
4501bbccdc
rpc, evm: refactor (#588)
* stargate: refactor

* remove evm CLI

* rpc: refactor

* more fixes

* fixes fixes fixes

* changelog

* refactor according to namespaces

* fix

* lint

* remove export logic

* fix rpc test

* godoc
2020-10-22 17:39:51 -03:00
Federico Kunze
d0456e546e
ChainSafe/ethermint -> cosmos/ethermint renaming (#569)
* ChainSafe/ethermint -> cosmos/ethermint renaming

* more renaming

* chainsafe
2020-10-09 17:52:32 +02: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
811ca7f045
rpc: implement personal_importRawKey (#552) 2020-09-29 20:34:01 -04:00
Federico Kunze
a924b20091
update chain-id format (#542)
* chain_id.go

* rpc changes

* update scripts

* additional test

* changelog

* fix tests

* update script

* rpc updates

* validate testnet command chain-id

* validate rest server chain-id

* fix lint

* rpc updates

* changelog

* comment simulations
2020-09-24 14:50:47 -03:00
noot
1339c174d7
update block format to match geth (#532) 2020-09-23 12:22:01 -04:00
noot
0d545939d8
fix doCall if args.From is nil (#518) 2020-09-21 11:59:07 -04:00
noot
517de55720
fix account sending from new accounts (#517)
* fix account sending from new accounts

* cleanup

* more cleanup

* fix rpc tests

Co-authored-by: araskachoi <choidanielw@gmail.com>
2020-09-17 15:04:36 -07:00
noot
244d836669
add rpc logs, ignore block bloom errors (#492) 2020-09-15 14:42:06 -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
noot
1cb712fb16
personal API (#420) 2020-08-13 13:14:48 -04:00
Federico Kunze
a243f43fe2
crypto: add keyring supported algorithms (#439)
* add keyring supported algorithms

* lint

* minor updates

* use eth_secp256k1 as the default signing algo

* add flag

* derivation func

* refactor

* rename keys amino registration

* fix keys

* address comments from review
2020-08-11 11:01:15 -04:00
noot
1d8c997585
rpc: implement eth_chainId (#379)
* add eth_chainId

* add nolint

* use clientCtx chainID

* rpc: eth_chainId test

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-07-08 03:57:19 -04:00
noot
c4cf33a9bb
implement ethereum-compatible websockets server (#357) 2020-07-06 13:23:35 -04:00
Daniel Choi
b76c36fcdb
allow multikey unlock (#356)
* allow multikey unlock

* fix lint

* Update rpc/apis.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-06 10:03:34 -07:00
Federico Kunze
20e9b2ede3
rpc: event websocket subscription (#308)
* rpc: event websocket subscription

* rpc: use tendermint event subscriptions

* new log events

* filter evm transactions

* filter logs

* wip: refactor filters

* remove custom BlockNumber

* wip: refactor rpc

* HeaderByNumber and HeaderByHash

* update Tendermint event system

* update Filter

* update EventSystem

* fix lint issues

* update rpc filters

* upgrade to tendermint v0.33.4

* update filters

* fix unsubscription

* updates wip

* initialize channels

* cleanup go routines

* pass ResultEvent channel on subscription

* error channel

* add block filter changes test

* add eventCh loop

* pass funcs in select go func, block filter working

* cleanup

* lint

* NewFilter and GetFilterChanges working

* eth_getLogs working

* lint

* lint

* cleanup

* remove logs and minor fixes

* changelog

* address @noot comments

* revert BlockNumber removal

Co-authored-by: noot <elizabethjbinks@gmail.com>
2020-07-03 11:40:00 -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
edf4357176
build: github actions (#346)
* add workflows

* fix

* fix lint

* rpc tests

* build and format

* fix build errors

* remove dontcover

* update importer test

* more fixes

* lint

* split importer test

* fix

* remove tmp dir

* revert

* comment test import
2020-06-26 18:26:55 -04:00
noot
e9c494cf71
rpc: return 0 nonce if account doesn't exist (#345)
* add EnsureExists check to GetTransactionCount

* cleanup, return 0 as nonce if account doesn't exist

* update changelog

* update changelog
2020-06-26 14:15:54 -04:00
noot
0921c863e7
update uncles return (#337) 2020-06-18 16:35:06 -04:00
noot
9f573690a6
implement eth_exportAccount (#331) 2020-06-17 14:23:36 -04:00
noot
94f6acc651
rpc: return 0x0 as extra data in block instead of nil (#333)
* return 0x0 extra data instead of nil

* add fix for getBlock

* add tests
2020-06-17 12:14:21 -04:00
Federico Kunze
7b164a5aa4
Revert "bump SDK commit (#324)" (#328)
This reverts commit 5614adc933.
2020-06-08 20:33:48 +02:00
Federico Kunze
988ee53a59
rpc: implement eth_coinbase (#325)
* rpc: implement eth_coinbase

* changelog

* address comments from review

* changelog
2020-06-08 12:43:37 -04:00
Federico Kunze
5614adc933
bump SDK commit (#324)
* bump SDK commit

* crypto: Secp256k1 algorithm

* crypto: fix codec and derivation issues

* lint
2020-06-08 12:19:26 -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
446eb0a3b7
change eth_estimateGas to return hexutil.Uint64 (#322)
* change eth_estimateGas to return hexutil.Uint64

* update test

* Update rpc/eth_api.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-01 14:12:34 -04:00
noot
846f48a572
get account sequence in GetTransactionCount (#303)
* get account sequence if querying latest in GetTransactionCount

* use ctx WithHeight in GetTransactionCount; remove nonce query from querier
2020-05-17 11:15:32 -04:00
noot
1f63ddfe96
evm: update msgs to accept zero gas price (#299)
* update keeper to accept gas price=0; default pending to latest

* cleanup

* more cleanup

* more cleanup

* more cleanup

* more cleanup

* ante: copy IncrementSequenceDecorator from SDK's AnteHandler

* improve bloom test

* lint

* update msg error

Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-14 22:08:13 -04:00
noot
51b68d7512
rpc: fix receipt logs (#285)
* update GetTransactionReceipt and test

* change DecodeResultData err check back

* change doCall back

* change doCall back

* add logs

* remove prints
2020-05-14 16:55:33 -04:00