Commit Graph

36 Commits

Author SHA1 Message Date
Igor Mandrigin
393c9965ae
rpcdaemon: subscriptions, newHeads (#1359)
* fix `make grpc` on new checkouts

* update proto files

* add some stub

* prototype with fake events

* notifying about events

* pass events

* events are being sent

* transfer headers to filters

* create the “filters” struct

* implement new heads

* PoC of New Heads subscription

* fix keep alive

* fixups for the client

* add “type” to the event

* support header event type on client

* better stage refactor

* fixup for the eth backend

* fixups

* fix tests

* fix tests

* fix linters

* address comments

* remove unused log
2020-11-17 19:13:41 +00:00
Thomas Jay Rush
546b91f47e
Updating RPC tests in Postman (#1340) 2020-11-09 09:52:18 +01:00
Igor Mandrigin
ab878ed59a
Ethstats (#1338) 2020-11-06 08:59:50 +01:00
Thomas Jay Rush
1af3e09d75
1209 automate documentation (#1290)
* Automate documentation

* Updating

* Updating

* Fixing lint

* Updating readthedocs documentation

* Updating testing

* Updating testing
2020-10-24 18:03:52 +01:00
Thomas Jay Rush
2aa6fb50ca
Cleans up some custom RPC commands (#1270)
* Moving a few files to be more consistent

* Collecting together custom code under tg_ namespace

* Small cleanups

* Updating test cases

* Uncomment eth_gasPrice but still unimplemented
2020-10-20 22:16:28 +01:00
Evgeny Danilenko
3bec75cdc4
Extract nonstandard APIs and introduce tg namespace (#1248)
* initial

* update rpc deamon readme

* use read-only transactions
2020-10-18 20:44:28 +01:00
Evgeny Danilenko
946d4fac5b
ForkID api (#1244)
* forkID api

* merge fork calls

* optional param
2020-10-16 15:15:10 +03:00
Thomas Jay Rush
c6c82b7569
Finish moving functions to consistent locations to ease testing/documentation of RPC (#1241)
* Cleaning up comments to start

* Renaming get_receipts.go to eth_receipts.go

* Stubbing out RPC mining routines

* Move block-related commands to eth_block.go

* Move transaction-related commands to eth_txs.go

* Move account-related commands to eth_accounts.go

* Move system-related commands to eth_system.go

* Final cleanup

* Updating testing
2020-10-14 16:59:42 +01:00
Thomas Jay Rush
d6587ba250
Simple file renaming to make automated testing easier (#1230)
* Simple file renaming to make automated testing easier

* Fixing comment
2020-10-12 15:17:34 +01:00
Thomas Jay Rush
1bd46089e9
Start of re-working of RPC code to align with testing better (#1225)
* Starting process of rearranging RPC code

* First version of automated testing

* Putting RPC docs in their own folder

* Fixing build

* Making varible names more consistent

* Adding deprecated RPC commands for db_

* Adding deprecated RPC commands for shh_

* Adding deprecated RPC commands for eth_
2020-10-12 09:39:33 +01:00
ledgerwatch
b747ab5324
[WIP] CallTraces index (#1157)
* Initial commit for CallTraces index

* Fix compilation

* fix lint, add comment

* Fix integration

* Add Close function to ethdb.Cursor, fix some compile errors

* Try to stop cursor leak in Get

* Fix compile errors in RPC daemon

* Fix compile errors

* fixing another way

* Some fixes

* More fixes

* More fixes

* More fixes

* Fixes to core/state

* Fix lint

* Fix lint

* Fixes

* Stage caching for call trace stage

* Add mem stats

* Try to stop the leak

* Turn off debug

* Chunks for 10k blocks

* Print

* Revert "Print"

This reverts commit 5ffada4828d61e00e5dad1ca12c98258dfbbad00.

* Revert "Chunks for 10k blocks"

This reverts commit cfb9d498e782e5583d41c30abf0e2137da27383e.

* Trying to fix the leak

* Don't compute receipts in re-tracing

* Not compose block

* Print speed, fix receipts, bigger caches

* Fix lint

* Utilise changeset info

* Counters

* Use NoReceipts and ReadOnly

* ReadOnly is incompatible with caching

* Skip test leaking transactions

* Fix block test

* Change disable message for call-traces stage

* Use block option for call traces integration

* Fix retracing due to incarnation
2020-10-12 09:39:04 +01:00
Alex Sharov
fc3cd4d5c3
Rpcdaemon: private api V2 (#1214)
* save progress

* GracefulShutdown grpc server, send to server close signal before canceling context

* GracefulShutdown json server

* GracefulShutdown json server

* fix lint

* clean

* hack hugeFreelist

* up streams limit

* up streams limit

* up streams limit

* up streams limit

* up streams limit

* up streams limit

* up streams limit

* up streams limit

* up streams limit

* save progress

* fix_race_condition_on_zstd_build

* fix_race_condition_on_zstd_build

* better close cursor

* save progress

* open read tx in all api methods

* clean

* clean
2020-10-10 13:24:56 +01:00
Alex Sharov
85219b651e
Revert "rpcdaemon to cache chainconfig (#1173)" (#1177)
This reverts commit cc4dd3695d.
2020-10-03 15:07:49 +07:00
Alex Sharov
cc4dd3695d
rpcdaemon to cache chainconfig (#1173)
* rpcdaemon to cache chainconfig

* topic normalization

* topic normalization
2020-10-02 13:52:02 +01:00
Alex Sharov
e02d6acc7d
bitmap indices for logs (#1124)
* save progress

* try now

* don't create bloom inside rlpDecode

* don't create bloom inside ApplyTransaction

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* rename method

* print timings

* print timings

* print timings

* sort before flush

* fix err lint

* clean

* move tests to transactions

* compressed version

* up bound

* up bound

* more tests

* more tests

* more tests

* more tests

* better removal

* clean

* better performance of get/put methods

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* optimize rpcdaemon

* fix test

* fix rpcdaemon

* fix test

* simplify

* simplify

* fix nil pointer

* clean

* revert some changes

* add some logs

* clean

* try without optimize

* clean

* clean

* clean

* clean

* try

* move log_index to own stage

* move log_index to own stage

* integration add log_index stage

* integration add log_index stage

* clean

* clean

* print timing

* remove duplicates at unwind

* extract truncateBitmaps func

* try detect

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* add blackList of topics

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* sharding 1

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 3

* sharded 3

* sharded 3

* speedup things by putCurrent and putReserve

* clean

* optimize trim

* clean

* remove blacklist

* add more info to err

* ?

* clean

* clean

* clean

* clean

* clean

* working version

* switch to cgo version of roaring bitmaps

* clean

* clean

* clean

* clean

* more docs

* clean

* clean

* fix logs bloom field

* Fix debug_getModifiedAccountsByNumber

* Try to fix crash

* fix problem with "absent block"

* fix problem with "absent block"

* remove optimize method call

* remove roaring iterator

* fix problem with rebuild indicess

* remove debug prints

* tests for eth_getLogs involving topics

* add tests for new stage, speparate topics into 2 buckets

* version up

* remove debug logs

* remove debug logs

* remove bloom filter implementation

* Optimisation

* Optimisatin not required, make rpctest lenient to geth errors

* Lenient to geth failures

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-09-28 18:18:36 +01:00
Thomas Jay Rush
f596a631af
1075 RPC additions and cleanup of README (#1117)
* Rewrite of README for clarity and expanding implementation table

* Small cleanups for web3_api.go

* Changed GetReceipts function to non-export (getRecipts) and cleaned up comments

* Added a comment for GetLogsByHash

* Add support for eth_protocolVersion and eth_chainId

* Adding comments and re-ordering fields to agree with Parity's ordering

* Added support for eth_listening. Moved net_version to same file as others

* Setup for adding eth_gasPrice
2020-09-15 17:44:28 +01:00
Thomas Jay Rush
e5f8073d75
1084 various rpc fixes (#1111)
* Fixes issue #1110 - eth_getStorageAt returning inconsistent values

* Adds support for various eth_getUncle calls

* Adding a couple of comments

* Adding support for eth_getTransactionCount

* Cleaning up README's

* Cleaning up README for rpcdaemon

Co-authored-by: tjayrush <jrush@greathill.com>
2020-09-14 07:59:07 +01:00
Thomas Jay Rush
065e658f42
Corrects incorrect return from eth_getCode for non-contract accounts (#1109) 2020-09-13 07:06:39 +01:00
Thomas Jay Rush
fdb82d87f1
1070 eth get code (#1100)
* Fixing issue #1070 Add eth_getCode

* Adding eth_getCode to README
2020-09-11 20:20:00 +01:00
Thomas Jay Rush
3f18b9eaa3
1074 web3 client version (#1094)
* Removed old TODOs

* Adding support for web3_clientVersion and web3_sha3

* Fixing formatting

* Adding new endpoints to README

* Responding to comments by removing date from compile-time values
2020-09-11 14:12:38 +01:00
Thomas Jay Rush
7f1e7d5212
1073 eth get transaction by block number and index (#1083)
* Added missing README entry for getTransactionByHash

* Adding support for eth_getTransactioBy* RPC routines

* Added missing README entry for getTransactionByHash

* Adding support for eth_getTransactioBy* RPC routines

* Copying code from ./internal/ethapi/api.go with modifications
2020-09-08 20:39:31 +01:00
Giulio rebuffo
c590fa476e
Eth get storage at (32 => 256) (#1065)
* added eth_getStorageAt

* used uint32

* now its 256

* incarnation
2020-09-06 20:57:58 +01:00
Giulio rebuffo
e48b28bc5c
added eth_getStorageAt (#1048) 2020-09-04 19:00:22 +01:00
Giulio rebuffo
f235bf1d98
add getTxByHash (#1042) 2020-09-03 21:41:06 +01:00
Evgeny Danilenko
e4f495fa44
Get logs (#1028)
* it compiles

* after recent master

* fix linters warnings

* grpcV7

* go mod tidy

* unmarshall adresses or adress

* fix linters

* after cr

* after cr

* after cr

* after cr

* fix tests

* remove dev version

* it compiles

* mod tidy

* fix bin deps

* use stable version of grpc

* switch back to master constructor

* switch back to master constructor

* add a bit docs

* add a bit docs

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2020-09-03 08:51:19 +01:00
ledgerwatch
8a3dad0914
Use Finish stage for eth_syncing (#1017) 2020-08-31 06:27:35 +01:00
Igor Mandrigin
a1a7f6607a
rpcdaemon, stagedsync: make sure we update the current block number after a sync cycle (#1015)
* rpcdaemon, stagedsync: make sure we update the current block number after a sync cycle

fixes #1014

* linters
2020-08-30 17:51:06 +01:00
ledgerwatch
22dc832d92
RPC method fixes (#1007)
* Fix some RPC issues

* Fudge the getBlockByNumber

* Add two more PRC methods

* Fix rpc tests
2020-08-29 22:28:09 +01:00
Alex Sharov
07ca5c643a
eth_syncing (#991)
* eth_syncing

* linters

* fix readme

* cleanup cli params

* go mod tidy

* remove memsize ui dep

* remove bloomfilter

* implement net_peerCount

* remove legacy flags
2020-08-29 08:24:50 +01:00
Giulio rebuffo
c2b3d137f7
implemented eth_getblockbyhash in rpcdaemon (#963) 2020-08-22 21:13:38 +01:00
Alex Sharov
1dcc2b141a
Rpcdaemon as lib (#940)
* share config object

* create default config and logger

* move db connection to common func

* move server start to cli package

* clear

* clear

* rename cli to rpc

* use unified SetupLogger func

* make all root flag persistent

* use common flags in different packages

* use common flags in different packages

* move TraceTx method to eth package

* use native slice flags

* create package "turbo"

* disable geth api

* disable geth api

* move more data types to turbo/adapter package

* add support for customApiList

* run more

* run more

* run more

* dog-food

* move DoCall

* move DoCall

* fix tests

* fix test
2020-08-19 12:46:20 +01:00
Evgeny Danilenko
6976f58f6a
net api service (#933) 2020-08-17 16:27:29 +01:00
Evgeny Danilenko
5d39fe8873
RPCDeamon coinbase, net_version (#911)
* use eth.backend

* net_version

* add coinbase to the console test
2020-08-12 14:47:59 +01:00
Evgeny Danilenko
64e936a526
overrides as an optional argument (#910) 2020-08-12 14:46:35 +01:00
Evgeny Danilenko
3980fa7d45
Grps eth_sendTransaction (#882)
* implementation

* tidy gomod

* linters

* fix cmd test

* fix

* fix lint
2020-08-11 22:09:30 +01:00
Alex Sharov
19583b9084
Docker compose (#841)
* add docker-compose

* test.http

* make different dockerfile for each component

* make different dockerfile for each component

* fix versions

* remove dedicated docker files

* cleanup

* cleanup

* cleanup
2020-08-01 09:39:04 +02:00