-
Notifications
You must be signed in to change notification settings - Fork 450
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small comment
staker/rollup_watcher.go
Outdated
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Previously, a spurious failure of
getNodeCreationBlockForLogLookup
due toNO_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.