Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Warp sync with Aura: Incomplete block import pipeline. #13220

Closed
@dandanlen

Description

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

I had some issues using warp sync with the chainflip public testnet. (See here)

Following @bkchr's advice in the above stackexchange question, I cherry-picked the commits from #13058 and #13074. This allowed the warp sync to progress further but I ran into a new issue:

2023-01-23 13:31:24.175  WARN tokio-runtime-worker sync: 💔 Error importing block 0xd826b720a99165998df41aaf67f9590b53a874611b150aad890a3d52397dc062: consensus error: Import failed: Import failed: Incomplete block import pipeline.

The error originates here.

As far as I can tell this is because, during a warp sync, the Aura verifier returns early, before the fork_choice is set:

async fn verify(
&mut self,
mut block: BlockImportParams<B, ()>,
) -> Result<(BlockImportParams<B, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String> {
// When importing whole state we don't verify the seal as the state is not available.
if block.with_state() {
return Ok((block, Default::default()))
}
// Skip checks that include execution, if being told so.
//
// This is done for example when gap syncing and it is expected that the block after the gap
// was checked/chosen properly, e.g. by warp syncing to this block using a finality proof.
if block.state_action.skip_execution_checks() {
return Ok((block, Default::default()))
}

I tried moving this line to the start of the verify method and this allowed the warp sync to complete:

block.fork_choice = Some(ForkChoiceStrategy::LongestChain);

Not sure whether this is correct approach, but it at least demonstrates the source of the problem...

Steps to reproduce

No response

Metadata

Assignees

No one assigned

    Labels

    J2-unconfirmedIssue might be valid, but it’s not yet known.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions