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
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Sync cannot download explicitly requested forks as light client if necessary #3639
#3633 introduced the beginning of an API for downloading important forks (according to the higher-level consensus algorithm). The problem is that some of these forks may be orphaned or too old for a full node to import.
This API should be extended with a parameter where the consensus code can inform sync that it only needs the header-chain. This is the case for GRANDPA. The behavior of the sync code if only the headers are needed should be to:
attempt to download and import the chain as a full client, if the state of the common ancestor hasn't been pruned.
otherwise, download only the header chain of the fork. it could go through the client, but doesn't have to, as long as any callers of the sync_fork API receive the header chain.
Importing the header chain via the client (as a "sort-of-light" mode) would be a bit nicer w.r.t. continuity; otherwise if the caller of sync_fork wants to return those headers later on they'll have to maintain their own storage rather than using the shared client utilities.
That needs some investigation as to whether the client can be configured to sometimes act as a light client in import and sometimes not -- @svyatonik any thoughts on that point?
#3633 introduced the beginning of an API for downloading important forks (according to the higher-level consensus algorithm). The problem is that some of these forks may be orphaned or too old for a full node to import.
#3629 is for GRANDPA to use this API
This API should be extended with a parameter where the consensus code can inform sync that it only needs the header-chain. This is the case for GRANDPA. The behavior of the sync code if only the headers are needed should be to:
sync_forkAPI receive the header chain.Importing the header chain via the client (as a "sort-of-light" mode) would be a bit nicer w.r.t. continuity; otherwise if the caller of
sync_forkwants to return those headers later on they'll have to maintain their own storage rather than using the shared client utilities.That needs some investigation as to whether the client can be configured to sometimes act as a light client in import and sometimes not -- @svyatonik any thoughts on that point?