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

Do not run forced_canonicalization for archive nodes #13051

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Jan 3, 2023

We don't canonicalize on archive nodes and thus best_canonical always returned None. So, the moment such a node tried to force canonicalize, it was trapped in some endless loop.

This pr solves this by renaming best_canonical to last_canonicalized and also making the return value more clear by introducing a custom enum LastCanonicalized.

Closes: #13028

We don't canonicalize on archive nodes and thus `best_canonical` always returned `None`. So, the
moment such a node tried to force canonicalize, it was trapped in some endless loop.

This pr solves this by renaming `best_canonical` to `last_canonicalized` and also making the return
value more clear by introducing a custom enum `LastCanonicalized`.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jan 3, 2023
@bkchr bkchr requested review from cheme and arkpar January 3, 2023 14:09
@bkchr bkchr merged commit 653eb0d into master Jan 3, 2023
@bkchr bkchr deleted the bkchr-fix-archive-all-canonicalization branch January 3, 2023 22:00
@Lederstrumpf Lederstrumpf mentioned this pull request Jan 4, 2023
ltfschoen pushed a commit to ltfschoen/substrate that referenced this pull request Feb 22, 2023
)

We don't canonicalize on archive nodes and thus `best_canonical` always returned `None`. So, the
moment such a node tried to force canonicalize, it was trapped in some endless loop.

This pr solves this by renaming `best_canonical` to `last_canonicalized` and also making the return
value more clear by introducing a custom enum `LastCanonicalized`.
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
)

We don't canonicalize on archive nodes and thus `best_canonical` always returned `None`. So, the
moment such a node tried to force canonicalize, it was trapped in some endless loop.

This pr solves this by renaming `best_canonical` to `last_canonicalized` and also making the return
value more clear by introducing a custom enum `LastCanonicalized`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Archive node stops syncing
3 participants