Commit Graph

86 Commits

Author SHA1 Message Date
9e483fc9f7 Updates for Cancun fork (#10)
- Bumps Geth to v1.14
- Adds support for pebbledb

Reviewed-on: #10
2024-08-05 13:17:00 +00:00
bb49906860 Fix state/storage counter metrics. (#8)
The counters for state, storage, and code node no longer work after 00141776bf.

The structure is sufficiently different I did not see a simple way to restore the code counters, but I did restore the state and storage counters.

Reviewed-on: #8
2023-10-09 21:17:20 +00:00
0c323433af Missing ENV bindings. (#9)
In passing, I noticed that these options were no longer being bound to their defined ENV variables.

Reviewed-on: #9
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-10-09 20:23:53 +00:00
b4367dff3b 6: Restore previous scheme for estimating progress. (#7)
```
ipld_eth_state_snapshot_stats_tracked_iterator_1 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_10 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_11 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_12 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_13 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_14 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_15 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_16 0
ipld_eth_state_snapshot_stats_tracked_iterator_2 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_3 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_4 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_5 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_6 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_7 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_8 37.5
ipld_eth_state_snapshot_stats_tracked_iterator_9 37.5
```

Reviewed-on: #7
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2023-10-06 23:20:05 +00:00
00141776bf Refactor to use statediff plugin (#1)
* Refactors to replace most of the code with the statediff plugin.
* Adds basic CI test workflows for Gitea
* Refactors fixtures to use https://git.vdb.to/cerc-io/eth-testing
* Renames env vars for consistency with flags and other services:
  - LOGRUS_{LEVEL,FILE} => LOG_LEVEL, etc.
  - LVL_DB_PATH => LEVELDB_PATH
  - ANCIENT_DB_PATH => LEVELDB_ANCIENT
  - These will need to be updated wherever they are used

Reviewed-on: #1
2023-09-29 18:43:26 +00:00
4e0b481ea5
Update to geth v1.11.6-statediff-5.0.8 (#79)
* Update to geth v1.11.6-statediff-5.0.8
2023-07-21 19:05:01 -05:00
i-norden
fe88e90181 avoid overshadowing err in defers 2023-05-31 18:08:02 -05:00
768357293c
Add progress counter to prometheus output (#76)
* Add a progress counter by checking the distance already traversed from the startPath to endPath in a bounded iterator vs the estimated number of iterations.
2023-05-23 11:23:58 -05:00
i-norden
891fca89bd fix overshadowing of snap.Tx 2023-05-17 08:16:50 -05:00
Ian Norden
7e426b2ca5
Merge pull request #71 from cerc-io/ian/v5_dev
v5 upgrade
2023-05-12 11:29:14 -05:00
i-norden
98015c4c87 fix NUMERIC formattign error 2023-05-12 11:11:00 -05:00
i-norden
ea4c1042c4 update service_test with new fixtures 2023-05-12 10:07:28 -05:00
i-norden
4081787b03 fix service.go: prevent panics on subtrie iterators with odd-length prefix-paths 2023-05-12 10:06:54 -05:00
i-norden
4ee75a3371 update publisher interface 2023-05-10 13:11:12 -05:00
82176ea41c
Add Docker files (#73) 2023-05-09 10:33:32 -05:00
i-norden
22ecd4065a update service 2023-04-12 13:13:04 -05:00
i-norden
382ad92701 removei in-place snapshot stuff 2023-04-12 13:13:04 -05:00
i-norden
ead007f159 update csv file publisher 2023-04-12 13:13:04 -05:00
i-norden
f1a980f37c update direct pg publisher 2023-04-12 13:13:04 -05:00
i-norden
f83ab82424 use types/models exported from vdb geth 2023-04-12 13:13:04 -05:00
97ee99a449 Update schema (#61)
Updates table to add header_cids.uncles_hash
2023-04-12 13:09:58 -05:00
i-norden
5c13d59515 refactor to work with v4 vdb geth v1.11.5 2023-03-31 10:39:27 -05:00
Michael
989bd1c0f1
Cerc refactor (#64)
* cerc refactor waiting on unpublished dependencies

* more cerc_refactor with published ipld-eth-db unstable

* TearDownDB refactor

* missed second publisher_test TearDownDB
2022-09-20 13:47:34 -04:00
Michael Shaw
321e37584d updates for geth rebase on 1.10.23 2022-09-02 15:21:29 -04:00
Ian Norden
05aeeab581
Account selective snapshot (#46)
* snapshotter ignores nodes not along a path along those derived from a list of account addresses if one is provided

* config and env updates

* cmd update

* Encode watched address path bytes to hex for comparison

* actually ignore the subtries that are not along the paths of interest

* Fixes for account selective snapshot

* Use non-concurrent iterator when having a single worker

* Only index root node when starting path of an iterator is nil

* Upgrade deps

* Avoid tracking iterators and skip recovery test

* Fix recovery mechanism, use sync Map instead of buffered channels

* Add test for account selective snapshot

* Continue traversal with concurrent iterators with starting path nil

* Use errgroup to simplify error handling with concurrent iterators

* Check if all the nodes are indexed in the recovery test

* Use concurrency safe sync Map in account selective snapshot test

* Only track concurrent iterators and refactor code

* Fix node and recovered path comparison

* Revert back to using buffered channels for tracking iterators

* Add a metric to monitor number of active iterators

* Update docs

* Update seeked path after node is processed

* Return error on context cancellation from subtrie iteration

* Add tests for account selective snapshot recovery

* Explicity enforce concurrent iterator bounds to avoid duplicate nodes

* Update full snapshot test to check nodes being indexed

* Refactor code to simplify snapshot logic

* Remove unnecessary function argument

* Use ctx cancellation for handling signals

* Add descriptive comments

Co-authored-by: prathamesh0 <prathamesh.musale0@gmail.com>
2022-08-03 17:05:04 +05:30
prathamesh0
ac00ee280f
Upgrade geth (#51)
* Fix Makefile for installing mockgen tool

* Upgrade geth

* Add sleep in the failing recovery test

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2022-07-13 11:39:36 +05:30
prathamesh0
b241bf05eb
Add command to take an in-place snapshot (#42)
* Add command to take an in-place snapshot

* Add test data for in place snapshot unit test

* Implement unit test for inplace snapshot

* Add check for storage IPLD

* Run unit tests sequentially

* Add github workflow for unit test

* Add missing checks for state and storage cid fields

* Add more storage nodes to test

* Update ipld-eth-db version for tests

* Add comments for inplace snapshot test data

* Add in-place snapshot cmd in readme

* Implement defer pattern for db transaction

* Log transaction commit or rollback error

Co-authored-by: nabarun <nabarun@deepstacksoft.com>
2022-06-15 12:51:26 +05:30
baef795834 Merge changes to fix iterator and update 2022-06-10 14:12:34 +05:30
8371344756 clean up logging 2022-06-08 20:12:22 +08:00
ef391d8d31 simplify tracker, prevent send to closed chan 2022-06-08 20:12:22 +08:00
8572c36ee7 decrement path from restored iterator
to cover node gaps
2022-06-08 20:12:22 +08:00
3e24972a89 try to fix hanging iterator 2022-06-08 20:05:38 +08:00
Ashwin Phatak
7129044eae Log progress info 2022-06-08 18:32:10 +08:00
dc27487b66 Merge changes to add env bindings and prometheus metrics 2022-05-23 17:11:51 +05:30
prathamesh0
cce45bda57
Add prometheus metrics collection (#33)
* Upgrade geth

* Add prometheus metrics collection

* Update README
2022-05-23 16:56:48 +05:30
i-norden
004f3e6665 constants for CLI binding strings 2022-05-17 22:33:20 -05:00
prathamesh0
0a1ea3ae4a
Fix insert statements and upgrade dependencies (#31) 2022-05-17 19:19:52 +05:30
fc9e82f717 Index block number using string in file mode 2022-05-13 14:00:40 +05:30
44d48b8644 Change ON CONFLICT clauses to do nothing and upgrade geth 2022-05-13 09:28:36 +05:30
26ae3ab008 Updates to use v4 schema 2022-04-19 18:14:25 +05:30
i-norden
31105a009c add env bindings 2022-04-04 14:35:18 -05:00
i-norden
060eb5cf67 add some logs and guards, update module name, update readme 2022-03-30 18:57:30 -05:00
i-norden
de39842049 fix minor bug 2022-03-30 14:09:32 -05:00
8d1e79d22e handle sigterm 2022-03-16 18:48:51 +08:00
b732ffc5f2 fix race condition 2022-03-14 23:34:26 +08:00
2481d0a28d recovery - handle signals 2022-03-14 23:34:26 +08:00
02488e2b79 logging tweaks 2022-03-14 23:32:00 +08:00
7a2ef4f542 fix fixtures 2022-03-14 23:32:00 +08:00
b5d0010581 implement job recovery; fix traversal & iterator 2022-03-03 17:12:29 +08:00
e0df3399e1 clanup 2022-02-17 14:35:20 +08:00