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

Improve stability of getNodeCreationBlock for L3s #2682

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

PlasmaPower
Copy link
Collaborator

Previously, a spurious failure of getNodeCreationBlockForLogLookup due to NO_NODE (e.g. because it was routed to a node that's slightly behind others) would cause the node to permanently stop using the method, breaking it for L3s. Instead, this PR both recognizes that NO_NODE is an ephemeral error and permanently saves the fact that the method previously succeeded.

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Sep 18, 2024
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tsahee tsahee left a comment

Choose a reason for hiding this comment

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

A small comment

if r.supportedL3Method.Load() {
return nil, fmt.Errorf("getNodeCreationBlockForLogLookup failed despite previously succeeding: %w", err)
}
log.Trace("failed to call getNodeCreationBlockForLogLookup, falling back on node CreatedAtBlock field", "err", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be at least Info - since this will be printed exactly once, and could help debugging some weird cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. I'm a bit hesitant in general to make stuff like this "info" because 3rd party teams will complain about the "issue" in their logs, or think it's the cause of some other issue, but it indeed might be useful for debugging. I'll upgrade it to info, and maybe think about rewording it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Upgraded to info and reworded a bit to help clarify it for 3rd party teams

@tsahee tsahee merged commit ef80b56 into master Oct 1, 2024
15 checks passed
@tsahee tsahee deleted the lookup-node-stability branch October 1, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants