Skip to content

Allow for sync state where batch is unknown #7391

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

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from

Conversation

AgeManning
Copy link
Member

#7360 shows a bug where we attempt to process a batch that is not existent.

It can be non-existent for two reasons:

  1. We couldn't download it because there were no idle peers
  2. We are in an optimistic start and had no good peers on sampling subnets

Under these conditions, the chain will be removed because there process_id pointer doesn't point to a batch.

This PR permits this state, by simply removing the error catch.

} else {
return Err(RemoveChain::WrongChainState(format!(
"Batch not found for current processing target {}",
self.processing_target
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be a rare event, should we add a debug log? If we ever wonder why the SyncingChain is not processing anything

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good call.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it will ever stop processing, something will progress it, but agree a log would be handy

Copy link

mergify bot commented May 7, 2025

This pull request has merge conflicts. Could you please resolve them @AgeManning? 🙏

Copy link

mergify bot commented May 15, 2025

Some required checks have failed. Could you please take a look @AgeManning? 🙏

@mergify mergify bot added the waiting-on-author The reviewer has suggested changes and awaits thier implementation. label May 15, 2025
Copy link
Collaborator

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-author The reviewer has suggested changes and awaits thier implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants