Commit Graph

59 Commits

Author SHA1 Message Date
Alex Sharov
539eaf0a51
e3: prepare trace_transaction env without execution (#6675) 2023-01-24 11:18:32 +07:00
Alex Sharov
4fbbdf9186
e3: move txnum to erigon-lib (#6663) 2023-01-22 19:39:33 +07:00
Alex Sharov
0ee8c175d9
e3: simplify history reader (#6659) 2023-01-22 16:42:24 +07:00
Andrew Ashikhmin
9927ca3171
Unify Engine API V1 & V2 methods (#6638)
Reduce code duplication.

Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/841.
2023-01-20 18:43:08 +01:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
a
06de4aeb91
filterlogs deadlock fix (#6429)
Refactors filters.go such that map+locks are now in their own class 

Move logic for safely canceling & draining channel to its own class

changed subscriptions to ask for size of buffer and construct its own
channel

marked as draft b/c need to do live testing.
2023-01-02 11:42:40 +07:00
Alex Sharov
4a9c871628
a bit rename 22 to v3 (#6476) 2022-12-30 21:53:42 +07:00
alex.sharov
9efb8e838b save 2022-12-29 10:09:09 +07:00
Alex Sharov
ade933be6b
kv_remote: server to support thread-safe multi-streams per 1 tx (#6402) 2022-12-24 13:11:15 +07:00
Alex Sharov
130ab85bea
e3: kv/temporal prototype 3 (#6395) 2022-12-22 09:37:32 +07:00
Alex Sharov
65f3af30eb
use one state reader type (#6380) 2022-12-21 11:27:14 +07:00
ledgerwatch
0a31f5ac2a
Workaround for the code history of BSC system contracts (#6274)
Works around a flaw in the upgrade logic of the system contracts. Since
they are updated directly, without first being self-destructed and then
re-created, the usual incarnation logic does not get activated, and all
historical records of the code of these contracts are retrieved as the
most recent version. This problem will not exist in erigon3, but until
then, a workaround will be used to access code of such contracts through
a special structure, `SystemContractCodeLookup`

Fixes https://github.com/ledgerwatch/erigon/issues/5865

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-10 22:41:04 +00:00
Håvard Anda Estensen
1398703bc5
Use hex package to convert bytes to string (#6205) 2022-12-05 09:06:16 +07:00
Andrew Ashikhmin
d82c778ab3
Withdrawals part 1 (#6009)
This PR partially implements
[EIP-4895](https://eips.ethereum.org/EIPS/eip-4895): Beacon chain push
withdrawals as operations. The new Engine API methods
(https://github.com/ethereum/execution-apis/pull/195) are implemented.

_Body downloader and saving withdrawals into DB are not implemented
yet!_
2022-12-01 09:15:01 +01:00
Max Revitt
74308f2500
fix(test): eliminate race conditions (#6019) 2022-11-11 15:22:09 +00:00
hexoscott
12ed9d22cf
eth_estimateGas performance tweaks (#6001)
Will gain more perf improvements when the change for kvcache goes in
from erigon-lib.

Hopefully can be validated with hive? My main concern is the re-use of
the state reader, I couldn't find any manipulation of it so it looks
safe to re-use.
2022-11-08 21:48:11 +00:00
ledgerwatch
004c9005cb
Prevent double closing of the channel (#5962)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-11-05 08:19:48 +00:00
net.wyman
7548755b62
fix potential deadlock in eth_filters logs event (#5912)
Like the newPendingTransaction event, the logs event also has the
potential for deadlock when unsubscribed
2022-11-01 08:59:01 +07:00
Alex Sharov
8783521ba4
lint (#5920) 2022-11-01 08:57:05 +07:00
net.wyman
98420edd30
Update README.md (#5914)
the rpc_daemon README.md is out of date and miss the eth_subscribe logs
event
2022-11-01 08:56:22 +07:00
Alex Sharov
381bea5b92
e3: eth_traceTransaction implementation (#5909) 2022-10-31 12:31:38 +07:00
net.wyman
8981f22943
fix deadlock in filters.go (#5734)
When the filter is in the onNewTxs function, the subscription function
exits and no longer receives information from the msg channel. In this
case, the unsubscribe_xxx function is triggered, which will cause
filter.mu read and write locks to enter a deadlock state

Co-authored-by: dc <dctrlbox@gmail.com>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-13 22:14:09 +01:00
Alex Sharov
cb60382e6d
erigon3: rename "history.v2" to "history.v3" to avoid naming miss-match with "erigon3" (#5519) 2022-09-26 10:54:42 +07:00
Alex Sharov
9fb8a190bc
erigon22: folder snapshots/history (#5351) 2022-09-18 17:41:01 +07:00
hexoscott
cd8cad6a89
allow multiple log subscriptions at the same time (#5358) 2022-09-16 14:36:25 +01:00
Enrique Jose Avila Asapche
0c64c3f2c7
added a way to get latest executed block post POS (#5343)
* added a way to get latest executed block post POS

* added erigon_ExecutedBlockNumber into readme

* optional rpc.BlockNumber

* better message

* updated readme
2022-09-14 13:56:31 +03:00
Alex Sharov
25e615a878
erigon22: historyReader22 and more tests (#5281)
* save

* save
2022-09-05 21:31:00 +07:00
dmitriyselivanov
4499e04a05
rpcdaemon: wire the most recent of EthBackend.builders.block as a pending block into eth_getBlockByNumber (#5061) 2022-08-15 15:19:45 +07:00
hexoscott
a573f8356f
rpc: concurrent map issue with log subscription fix (#4971)
* rpc: concurrent map issue with log subscription fix

* rpc: subscription changes around locking
2022-08-10 16:01:53 +07:00
Enrique Jose Avila Asapche
c12d298f1c
new rpc block number (#4953)
* new rpc block number

* log

* ops
2022-08-08 19:07:24 +07:00
hexoscott
98c639784b
rpc: fix for map concurrency issue in logs subscription (#4903)
moving a couple of mutex locks and introducing another to prevent a deferred call to unsubscribe clashing with a new call to subscribe
2022-08-03 00:37:34 +07:00
primal_concrete_sledge
fff6e4ffa5
fix/issue-4593_fix_closed_chan (#4603) 2022-07-01 20:59:52 +01:00
primal_concrete_sledge
5e2f6bb2db
Fix/new eth filters (#4504)
* Add fixes to eth_newPendingTxFilter and others

* Fix tests

* Add test

* Add goroutines return on closed chans
2022-06-24 09:11:38 +01:00
Andrew Ashikhmin
8de7c5e41c
JSON parsing of safe & finalized (#4524) 2022-06-23 19:37:39 +02:00
Enrique Jose Avila Asapche
a5cb53d690
safe and finalized blocks from eth_getBlockByNumber (#4436)
* added getFinalzed and getSafe block num

* added rpc finalized and safe block num

* getting nums

* returning nil

* returning nil

* added to helper.go

* removed repeated code

* added functions into rpchelper

* returning err

* simplified

* using previous latest getter

* getting pending block with filter/

* Fix plain state block number

* Fix test

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-06-14 11:07:46 +03:00
ledgerwatch
8e3ac8a21c
Erigon2 upgrade 2 prototype (#4341)
* Erigon2 upgrade 2 prototype

* Latest erigon-lib

* Fixes

* Fix print

* Fix maxSpan

* Reduce maxSpan

* Remove duplicate joins

* TxNum

* Fix resuming

* first draft of history22

* Introduce historical reads

* Update to erigon-lib

* Update erigon-lib

* Update erigon-lib

* Fixes and tracing for checkChangeSets

* More trace

* Print account details

* fix getHeader

* Update to erigon-lib main

* Add tracer indices and event log indices

* Fix calltracer

* Fix calltracer

* Duplicate rpcdaemon into rpcdaemon22

* Fix tests

* Fix tests

* Fix tests

* Update to latest erigon-lib

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-06-10 16:18:43 +01:00
Alex Sharov
fc1a37e6dc
create turbo/services pkg (#4269) 2022-05-26 10:31:06 +07:00
ledgerwatch
4f7f1554c5
Update helper.go (#3737) 2022-03-19 09:36:35 +07:00
ledgerwatch
ee488020dd
Auto detect latest block for optimal use of plain state and state cache (#3598)
* Auto detect latest block for optimal use of plain state and state cache

* Fix lint

* Fix test

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 23:42:14 +00:00
ledgerwatch
7397af57d4
Optimise eth_getStorageAt for current state (#3580)
* Optimise eth_getStorageAt for current state

* Fix

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-02-23 09:44:55 +00:00
Nickolay Savchenko
d027d712eb
Json rpc eip1898 correctness (#2736) 2021-09-28 09:25:56 +07:00
Alex Sharov
6bd44eb26c
move kv to erigon-lib (#2467) 2021-07-29 18:53:13 +07:00
Alex Sharov
838e5f9ef2
Move bucket constants into kv package, move kv interface to kv package (#2455) 2021-07-28 09:47:38 +07:00
ledgerwatch
d1e4edb180
Better compatibility with OE for trace_call and trace_callMany (#2137)
* Better compatibility for trace_call

* Also for trace_callMany

* non canonical hash error

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-06-11 13:19:10 +01:00
Alex Sharov
0be3044b7e
rename (#1978)
* rename

* rename "make grpc"

* rename "abi bindings templates"

* rename "abi bindings templates"
2021-05-20 19:25:53 +01:00
Alex Sharov
0c91bfbf3e
RPCDaemon: support Pending block (#1942)
* clean

* save

* pubsub

* pubsub

* pubsub

* pubsub

* pubsub

* pubsub

* save

* tx pub-sub

* tx pub-sub

* clean

* clean

* save

* save

* save

* save

* save

* Squashed 'interfaces/' content from commit c469f3ae0

git-subtree-dir: interfaces
git-subtree-split: c469f3ae073b60c8821b61fed2910191080ef835

* save

* save

* save

* save

* Squashed 'interfaces/' changes from c469f3ae0..958dfc669

958dfc669 save

git-subtree-dir: interfaces
git-subtree-split: 958dfc669f8daeefe686a13aa852fb95f1537886

* save

* save

* up some deps

* up some deps

* clean

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test
2021-05-17 13:15:19 +01:00
Alex Sharov
eee9438625
deprecate PlainDbState in favor of PlainKvState (#1805) 2021-04-26 12:37:48 +07:00
Alex Sharov
4ef5e4b2f6
Continue move to rwtx (#1722) 2021-04-15 12:23:10 +07:00
Artem Vorotnikov
d4c10c9a47
Port rpcdaemon to KV interface (#1627) 2021-03-30 12:53:54 +03:00
Alex Sharov
86ccfd0338
RPC: Pending transactions/blocks/logs (#1625) 2021-03-30 14:09:00 +07:00