Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
After Substrate upgrade from c4f3d02 to 5d3e7c4 I have noticed that sc-consensus-slots tries to claim slot before it is fully synced (might be unrelated to upgrade, just haven't seen this before).
In particular this happens when node is ~2000 blocks from the sync target:
2022-05-23 16:39:09 [PrimaryChain] ⚙️ Syncing 2.7 bps, target=#6399 (6 peers), best: #4373 (0x67e2…e5ab), finalized #0 (0xe6ec…2830), ⬇ 6.4MiB/s ⬆ 1.8kiB/s
2022-05-23 16:39:14 [PrimaryChain] ⚙️ Syncing 2.8 bps, target=#6404 (6 peers), best: #4387 (0xbf3d…d0e0), finalized #0 (0xe6ec…2830), ⬇ 6.6MiB/s ⬆ 1.7kiB/s
2022-05-23 16:39:19 [PrimaryChain] 🚜 Claimed block at slot 1653313159
2022-05-23 16:39:19 [PrimaryChain] 🙌 Starting consensus session on top of parent 0x2dbdaa63e4e35943398f26034226215483b5305dac70a6346157652c6fed79c6
2022-05-23 16:39:19 [PrimaryChain] 🎁 Prepared block for proposing at 4402 (0 ms) [hash: 0xa8cfe6a69fb710943b2fe4e43d67d2b7f514e6a6baef7fa5d316beebe5f6e1ef; parent_hash: 0x2dbd…79c6; extrinsics (1): [0xccc7…4f6f]]
2022-05-23 16:39:19 [PrimaryChain] 🔖 Pre-sealed block for proposal at 4402. Hash now 0x52229917d4f78624128b2c664b32430655599814254c6ed68c62aaa8f6c3b740, previously 0xa8cfe6a69fb710943b2fe4e43d67d2b7f514e6a6baef7fa5d316beebe5f6e1ef.
2022-05-23 16:39:19 [PrimaryChain] ✨ Imported #4402 (0x5222…b740)
2022-05-23 16:39:19 [PrimaryChain] ♻️ Reorg on #4402,0x5222…b740 to #4403,0x3a78…a34e, common ancestor #4401,0x2dbd…79c6
2022-05-23 16:39:19 [PrimaryChain] ✨ Imported #4403 (0x3a78…a34e)
2022-05-23 16:39:19 [PrimaryChain] 💤 Idle (6 peers), best: #4403 (0x3a78…a34e), finalized #0 (0xe6ec…2830), ⬇ 5.5MiB/s ⬆ 16.9kiB/s
2022-05-23 16:39:20 [PrimaryChain] 🚜 Claimed block at slot 1653313160
2022-05-23 16:39:20 [PrimaryChain] 🙌 Starting consensus session on top of parent 0x3a784924b83bad99b213ac6d67fa34a7754fce689439a76d7cf347ffd6a5a34e
2022-05-23 16:39:20 [PrimaryChain] 🎁 Prepared block for proposing at 4404 (0 ms) [hash: 0x7be8f6c26c515e5aa73c120ffc7036c4d72b26443d76c39bbd6a9e4c09ea956f; parent_hash: 0x3a78…a34e; extrinsics (1): [0xd569…606d]]
2022-05-23 16:39:20 [PrimaryChain] 🔖 Pre-sealed block for proposal at 4404. Hash now 0x2586106376330740f3369d12ba6588e5bdd47088aa09af676cf3730a5948ceaf, previously 0x7be8f6c26c515e5aa73c120ffc7036c4d72b26443d76c39bbd6a9e4c09ea956f.
2022-05-23 16:39:20 [PrimaryChain] ✨ Imported #4404 (0x2586…ceaf)
2022-05-23 16:39:20 [PrimaryChain] ♻️ Reorg on #4404,0x2586…ceaf to #4404,0xf711…022d, common ancestor #4403,0x3a78…a34e
2022-05-23 16:39:20 [PrimaryChain] ✨ Imported #4404 (0xf711…022d)
Whatever the reason of this is, it seems wrong and I'm not convinced right now that the root cause is in our consensus. I have not yet tried this with just Babe and Substrate's node template, this is our custom consensus protocol, but it is using sc-consensus-slot in a similar way to Babe consensus.
Node was started with --validator --pruning archive, forced authoring wasn't enabled.
Steps to reproduce
- Have a few thousand blocks to sync
- Wait for node to sync to ~2000 blocks from the tip
- Observe node trying to claim slots
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
After Substrate upgrade from c4f3d02 to 5d3e7c4 I have noticed that
sc-consensus-slotstries to claim slot before it is fully synced (might be unrelated to upgrade, just haven't seen this before).In particular this happens when node is ~2000 blocks from the sync target:
Whatever the reason of this is, it seems wrong and I'm not convinced right now that the root cause is in our consensus. I have not yet tried this with just Babe and Substrate's node template, this is our custom consensus protocol, but it is using
sc-consensus-slotin a similar way to Babe consensus.Node was started with
--validator --pruning archive, forced authoring wasn't enabled.Steps to reproduce