paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.85k stars 674 forks source link

`prospective-parachains`: potential issue with candidate relay parent check #6162

Closed sandreim closed 3 days ago

sandreim commented 4 days ago

On Paseo we observe that some candidates are reject because the relay parent (0xec3fa2c08635ff24f23a905e66af5b434141f29a629bb52b71db5c266da9022f) is not in scope, but the relay parent is actually in scope (notice the block import)

2024-10-21 18:22:18.378 | 2024-10-21 15:22:18.339  INFO tokio-runtime-worker substrate: 🆕 Imported #3483485 (0xec3f…022f → 0x532b…d520) 

2024-10-21 18:22:18.430 | 2024-10-21 15:22:18.389 DEBUG tokio-runtime-worker parachain::prospective-parachains: Cannot introduce seconded candidate: Relay parent 0x28e8f001c0fdaa81e00ef1174d716f35d5022d5b9d6de4ef227bc799cca9b499 not in scope. Earliest relay parent allowed 0x75470bbae0461de3159104b2bd075b299a144f89bc76410a1b13220cbf76781b para=Id(4009) relay_parent=0xec3fa2c08635ff24f23a905e66af5b434141f29a629bb52b71db5c266da9022f candidate_hash=0x6add410866bb02419789631d1be484089fc0d53b668571d98e36ec9bee4d47d7 is_active_leaf=false traceID=142046984181180367691136876342378005512 |  
2024-10-21 18:22:18.481 | 2024-10-21 15:22:18.436 DEBUG tokio-runtime-worker parachain::prospective-parachains: Cannot introduce seconded candidate: Relay parent 0x28e8f001c0fdaa81e00ef1174d716f35d5022d5b9d6de4ef227bc799cca9b499 not in scope. Earliest relay parent allowed 0x75470bbae0461de3159104b2bd075b299a144f89bc76410a1b13220cbf76781b para=Id(4503) relay_parent=0xec3fa2c08635ff24f23a905e66af5b434141f29a629bb52b71db5c266da9022f candidate_hash=0xa359a9aa051b038d928dad3a6484123c1eb8bc52497b88f7f1c3e51443527087 is_active_leaf=false traceID=217129718930941614324385773487818805820

https://grafana.teleport.parity.io/goto/n7OvB_mHg?orgId=1

sandreim commented 4 days ago

cc @alindima

sandreim commented 4 days ago

Also seen on Kusama: https://grafana.teleport.parity.io/goto/URufflmHR?orgId=1

alindima commented 4 days ago

This happens under normal operation.

Suppose an allowed_ancestry_len of 2, so we allow up to two ancestors from an active leaf. Prospective parachains maintains fragment chains for the inactive leaves also if they're within the implicit view (if the relay parent is within the allowed_ancestry_len of an active leaf). So when you get a new candidate built of the latest active leaf, when you try to introduce it to the fragment chains of the ancestors, you'll get this log. Notice it's only a debug log. No error here.

alindima commented 4 days ago

I should revisit some of these logs and set them as trace level. I was probably too eager with the debug logs and set too many :D

alindima commented 3 days ago

Closing this issue. Opened an issue for tracking the revisiting of the logs: https://github.com/paritytech/polkadot-sdk/issues/6172