Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warp sync doesn't work if the target block is the genesis #1930

Open
2 tasks done
tmpolaczyk opened this issue Oct 18, 2023 · 0 comments
Open
2 tasks done

Warp sync doesn't work if the target block is the genesis #1930

tmpolaczyk opened this issue Oct 18, 2023 · 0 comments
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@tmpolaczyk
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

It is not possible to bootstrap a chain when all the collators are using --sync warp. This seems to be because warp sync doesn't work when the target block is the genesis. I found this bug when trying to sync to a parachain, but it also affects the relaychain.

I see these logs in a loop: "Waiting for 3 peers to be connected" but there are 5 peers already.

2023-10-18 15:31:00 🙌 Starting consensus session on top of parent 0xe6f9d4c36cc368ae78763b852fa074810ef19a603b18009432cf711813a5167d    
2023-10-18 15:31:02 ParentBlockRandomness did not provide entropy    
2023-10-18 15:31:02 ParentBlockRandomness did not provide entropy    
2023-10-18 15:31:02 🎁 Prepared block for proposing at 1 (0 ms) [hash: 0x0acb8da043e4079ba1cadb2813f6ed0c2676375576a3e01e82cd7384c7a56fd9; parent_hash: 0xe6f9…167d; extrinsics (2): [0xe708…6936, 0x770f…0e89]    
2023-10-18 15:31:02 🔖 Pre-sealed block for proposal at 1. Hash now 0x8d263a9ebea83e8420c9060ed91cf9083d761c66f94e8eb8fa1111a5293a48c1, previously 0x0acb8da043e4079ba1cadb2813f6ed0c2676375576a3e01e82cd7384c7a56fd9.    
2023-10-18 15:31:02 👶 New epoch 0 launching at block 0x8d26…48c1 (block slot 282939310 >= start slot 282939310).    
2023-10-18 15:31:02 👶 Next epoch starts at slot 282939320    
2023-10-18 15:31:03 ⏩ Warping, Waiting for 3 peers to be connected, 0.00 Mib (5 peers), best: #0 (0xe6f9…167d), finalized #0 (0xe6f9…167d), ⬇ 0.4kiB/s ⬆ 1.2kiB/s    
2023-10-18 15:31:08 ⏩ Warping, Waiting for 3 peers to be connected, 0.00 Mib (5 peers), best: #0 (0xe6f9…167d), finalized #0 (0xe6f9…167d), ⬇ 1.4kiB/s ⬆ 0.9kiB/s    
2023-10-18 15:31:12 🙌 Starting consensus session on top of parent 0xe6f9d4c36cc368ae78763b852fa074810ef19a603b18009432cf711813a5167d    

Steps to reproduce

./polkadot build-spec --chain rococo-local --disable-default-bootnode --raw > rococo-local-cfde.json
./polkadot --chain rococo-local-cfde.json --tmp --sync warp --no-beefy --alice --port 30331
./polkadot --chain rococo-local-cfde.json --tmp --sync warp --no-beefy --bob --port 30332

You can add more nodes (I had 6), but it doesn't seem to fix it. But if alice and bob are set to --sync full, the other nodes will eventually sync using warp sync, when the target block is greater than 0.

@tmpolaczyk tmpolaczyk added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Oct 18, 2023
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 26, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 27, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* improve some relay errors readability

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* improve some relay errors readability

* clippy
bkchr pushed a commit that referenced this issue Apr 10, 2024
* improve some relay errors readability

* clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

1 participant