mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
5208bed7d2
Extract `WarpSync` (and `StateSync` as part of warp sync) from `ChainSync` as independent syncing strategy called by `SyncingEngine`. Introduce `SyncingStrategy` enum as a proxy between `SyncingEngine` and specific syncing strategies. ## Limitations Gap sync is kept in `ChainSync` for now because it shares the same set of peers as block syncing implementation in `ChainSync`. Extraction of a common context responsible for peer management in syncing strategies able to run in parallel is planned for a follow-up PR. ## Further improvements A possibility of conversion of `SyncingStartegy` into a trait should be evaluated. The main stopper for this is that different strategies need to communicate different actions to `SyncingEngine` and respond to different events / provide different APIs (e.g., requesting justifications is only possible via `ChainSync` and not through `WarpSync`; `SendWarpProofRequest` action is only relevant to `WarpSync`, etc.) --------- Co-authored-by: Aaro Altonen <48052676+altonen@users.noreply.github.com>
31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
Description: Warp sync
|
|
Network: ./test-warp-sync.toml
|
|
Creds: config
|
|
|
|
alice: reports node_roles is 1
|
|
bob: reports node_roles is 1
|
|
charlie: reports node_roles is 1
|
|
dave: reports node_roles is 1
|
|
|
|
alice: reports peers count is at least 3 within 60 seconds
|
|
bob: reports peers count is at least 3 within 60 seconds
|
|
charlie: reports peers count is at least 3 within 60 seconds
|
|
dave: reports peers count is at least 3 within 60 seconds
|
|
|
|
|
|
# db snapshot has {{DB_BLOCK_HEIGHT}} blocks
|
|
alice: reports block height is at least {{DB_BLOCK_HEIGHT}} within 60 seconds
|
|
bob: reports block height is at least {{DB_BLOCK_HEIGHT}} within 60 seconds
|
|
charlie: reports block height is at least {{DB_BLOCK_HEIGHT}} within 60 seconds
|
|
|
|
dave: reports block height is at least 1 within 60 seconds
|
|
dave: reports block height is at least {{DB_BLOCK_HEIGHT}} within 60 seconds
|
|
|
|
dave: log line matches "Warp sync is complete" within 60 seconds
|
|
# State sync is logically part of warp sync
|
|
dave: log line matches "State sync is complete" within 60 seconds
|
|
dave: log line matches "Block history download is complete" within 10 seconds
|
|
|
|
dave: count of log lines containing "error" is 0 within 10 seconds
|
|
dave: count of log lines containing "verification failed" is 0 within 10 seconds
|