Commit 12abdc2
authored
feat: rewrite, fix and improve the sync architecture (#411)
Modular, parallel, manager-based sync architecture. Each sync concern (`BlockHeadersManager`, `FilterHeadersManager`, `FiltersManager`, `BlocksManager`, `MasternodesManager`, `ChainLockManager`, `InstantSendManager`) has its own manager implementing a common `SyncManager` trait while the `SyncCoordinator` orchestrates them and coordinates the communication between them through a `SyncEvent` system.
Progress reporting is streamlined with each manager reporting its own progress through a unified SyncProgress system which updates the subscribers for every change in progress. Event handling follows the same pattern, with a consistent event model across sync, wallet, and network layers. The FFI can now subscribe to all events from sync progress, wallet, and network.
Filter sync got a lot of fixes and now processes filters and blocks in ordered batches. When gap limit maintenance generates new addresses a rescan is triggered automatically to pick up any transactions that match the new addresses.
Post sync is working stable now too, i was constantly running this branch in the last couple weeks monitoring things and didnt run into any more issues by now.1 parent edb18bb commit 12abdc2
File tree
96 files changed
+15284
-3496
lines changed- dash-spv-ffi
- include
- src
- bin
- tests
- c_tests
- integration
- unit
- dash-spv
- src
- client
- network
- storage
- sync
- block_headers
- blocks
- chainlock
- filter_headers
- filters
- instantsend
- masternodes
- test_utils
- validation
- tests
- dash/src/sml/masternode_list_engine
- key-wallet-manager/src
- wallet_manager
- key-wallet/src
- managed_account
- tests
- transaction_checking
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
96 files changed
+15284
-3496
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
0 commit comments