Skip to content
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

feat: introduce new type of error #157

Open
vgonkivs opened this issue Feb 13, 2024 · 2 comments
Open

feat: introduce new type of error #157

vgonkivs opened this issue Feb 13, 2024 · 2 comments

Comments

@vgonkivs
Copy link
Member

After pruning is finished + backward sync is introduced, our ErrNoFound will have 2 meanings:

  1. The Node is still syncing and hasn't synced to the requested height yet;
  2. The node does not have this height and will not sync on it in the future;

As it will confuse us and users, we should agree and differentiate these two cases by introducing one more error for the first case -> ErrNotSynced.

cc @renaynay

@renaynay
Copy link
Member

Need to think about this more but sounds good from first thought.

@Wondertan
Copy link
Member

This will also need a new error type on the protocol that peers can lie about. One can always say ErrNotSynced to make other peers always retry it, even when it won't have it.

If we keep retrying other peers and backoff everyone independently of ErrNotSynced this problem disappears, but then the benefits of this separation disappear as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants