You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on my understanding and from the helpful comments above, we don't need all of this because we - in Cumulus template node - will already know when the relay chain is synced from the relay_chain_interface function is_major_syncing
we could create a ParachainWarpProvider that takes in relay_chain_interface and waits for the relaychain to sync up then once it's done get the parachain header and then feed it to StateSync
My question is should we be implementing it via WarpSyncProvider to keep it consistent with the polkadot implementation? Do we need a WarpProof and generating/verifying implementations
Or have I gone down the wrong rabbit hole and we should instead be building our own ChainSync that doesn't require warp proof or a provider
Hey guys I have been looking at this in depth over the past week and I have a few questions
I decided to split the work into 2 sections
The plan is to get 1 done first
Looking into grandpa, The sync works by defining a Network Provider
https://github.com/paritytech/substrate/blob/master/client/finality-grandpa/src/warp_proof.rs#L254-L266
While the default implementation for this is a Warp Sync Provider
https://github.com/paritytech/substrate/blob/master/client/finality-grandpa/src/warp_proof.rs#L270-L286
The
WarpSyncProvider
then has 2 functions to generate and verify a proof, This uses WarpSyncProofhttps://github.com/paritytech/substrate/blob/master/client/finality-grandpa/src/warp_proof.rs#L77-L100
Based on my understanding and from the helpful comments above, we don't need all of this because we - in Cumulus template node - will already know when the relay chain is synced from the
relay_chain_interface
functionis_major_syncing
https://github.com/paritytech/cumulus/blob/26e17fea7ef95d91b94db92079034d4355ad3658/client/relay-chain-interface/src/lib.rs#L172
So here is what I was thinking of implementing
we could create a
ParachainWarpProvider
that takes inrelay_chain_interface
and waits for the relaychain to sync up then once it's done get the parachain header and then feed it toStateSync
My question is should we be implementing it via
WarpSyncProvider
to keep it consistent with the polkadot implementation? Do we need aWarpProof
and generating/verifying implementationsOr have I gone down the wrong rabbit hole and we should instead be building our own
ChainSync
that doesn't require warp proof or a providerhttps://github.com/paritytech/substrate/blob/a7ba55d3c54b9957c242f659e02f5b5a0f47b3ff/client/network/sync/src/lib.rs#L396-L406
https://github.com/paritytech/cumulus/blob/981b5d01eb5d0aab0926793e00a7fb933680cf34/client/consensus/common/src/parachain_consensus.rs#L425-L433
The text was updated successfully, but these errors were encountered: