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

Fix for crosslink processing. #4751

Closed
wants to merge 1 commit into from
Closed

Conversation

Frozen
Copy link
Contributor

@Frozen Frozen commented Sep 5, 2024

Fix for crosslink processing.

@Frozen Frozen self-assigned this Sep 5, 2024
return
}
if len(pendingCLs) >= maxPendingCrossLinkSize {
if err == nil && len(pendingCLs) >= maxPendingCrossLinkSize {
Copy link
Contributor

Choose a reason for hiding this comment

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

if err!=nil ?

Copy link
Contributor

Choose a reason for hiding this comment

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

In the original code (see here), we also didn't handle the case where err != nil. @Frozen made an attempt to address this in PR #4673 (see here), which was included in the v2024.2.0 release. However, we hadn't tested this with a fresh network using external validators until now.

@Frozen @GheisMohammadi, the error we're encountering is level DB: not found. Since this error only arises when the key in LevelDB doesn't exist, should we consider updating our code to simply continue execution in this case, and return if any other error is encountered?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Frozen, what are your thoughts on PR #4754? It addresses the same issue but introduces a few additional improvements:

  • Added a mutex to prevent potential concurrency issues.
  • Similar to your approach, it ensures that if err != nil, we don't block; however, in this case, we at least log the error for better visibility.

@sophoah
Copy link
Contributor

sophoah commented Sep 13, 2024

hey @Frozen let's use #4754 since both have the same objective and 4754 is more complete. I will close this one for now.

@sophoah sophoah closed this Sep 13, 2024
@mur-me mur-me mentioned this pull request Sep 18, 2024
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

Successfully merging this pull request may close these issues.

3 participants