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.
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>
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.
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>
* added a way to get latest executed block post POS
* added erigon_ExecutedBlockNumber into readme
* optional rpc.BlockNumber
* better message
* updated readme
* 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>
* Better compatibility for trace_call
* Also for trace_callMany
* non canonical hash error
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* 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