-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
michalkucharczyk
commented
Nov 21, 2022
- babe: allow skipping epochs in pallet
- babe: detect and skip epochs on client
- babe: cleaner epoch util functions
- babe: add test for runtime handling of skipped epochs
- babe: simpler implementation of client handling of skipped epochs
- babe: test client-side handling of skipped epochs
- babe: add comments on client-side skipped epochs
- babe: remove emptyline
- babe: make it resilient to forks
- babe: typo
- babe: overflow-safe math
- babe: add test for skipping epochs across different forks
- zombienet: warp-sync integration test added
- spelling
- Readme corrected
- dir name updated
- Check second phase of warp sync
- zombienet pipeline enable + naive test network
- zombienet stage added
- paritypr/substrate-debug image added for zombienet testing
- debugs added
- debugs added
- buildah problem fixed
- rollback
- runner tag
- test name corrected
- dir renamed (regex problem)
- common code clean up
- common code clean up
- fix
- warp sync test improvements
- full sha used
- disable tracing for nodes
- COMMON_USER -> DOCKERIO_USER
- refs reworked
- paritypr/substrate image used
- DOCKERIO -> DOCKER
- generate-ws-db toml cleanup
- improvements
- fix
- zombienet: warp sync test enabled
This reverts commit 7c75b69.
Checking if log does not container error or verification failed messages
…ku-warp-sync-ci-test
bot rebase |
Rebased |
So, I investigated a bit why we are receiving the following error after a warp sync.
I'm going to recap the scenario of the test:
After warp sync the node starts recovering the old blocks and, when are found, epoch changes entries are stored in the GAP. substrate/client/consensus/epochs/src/lib.rs Lines 751 to 767 in 39ef178
So far so good, until we hit the import of block number 12134 (one generated by the authorities "NOW"). The BABE's verification procedure tries to fetch the epoch changes entry for child of substrate/client/consensus/babe/src/lib.rs Lines 1184 to 1190 in 39ef178
These are the values passed to
As a recap, when we lookup an entry for a
Now, because after a warp sync, the epoch entry usable by block Notice that the slot is set to ~"NOW" (and NOT the time of creation of db, which is older). It searches in the epoch changes tree GAP entry first. This is the GAP at the moment of the search:
At this point, the GAP entry to be used for That is, the slot we are passing should be within the start and start+duration of an entry in the gap. The search then proceeds in the FORK-TREE, that fails because the entry is not there. Potential solution(Not tested idea) In the GAP lookup method:
Finally, if the gap match is not exact or None, try to check if there is a better match using the fork tree. Return the best thing found. |
I don't know exact reasons to have the dedicated One solution might also be to try to get rid of |