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

Concurrent slashing protection tests #1809

Open
wants to merge 1 commit into
base: stage
Choose a base branch
from

Conversation

olegshmuelov
Copy link
Contributor

@olegshmuelov olegshmuelov commented Oct 21, 2024

close #1672

@olegshmuelov olegshmuelov self-assigned this Oct 21, 2024
@olegshmuelov olegshmuelov linked an issue Oct 21, 2024 that may be closed by this pull request
@olegshmuelov olegshmuelov marked this pull request as ready for review October 21, 2024 14:49
Copy link

@iurii-ssv iurii-ssv left a comment

Choose a reason for hiding this comment

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

Minor suggestions.

Comment on lines +852 to +856
if err != nil && err.Error() == "slashable attestation (HighestAttestationVote), not signing" {
slashableErrors++
} else if err == nil {
successCount++
}
Copy link

@iurii-ssv iurii-ssv Oct 22, 2024

Choose a reason for hiding this comment

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

Shouldn't we check here for the absence of errors other than "slashable attestation (HighestAttestationVote), not signing" (or leave a comment explaining why not) ? Same for another test.

Edit: I guess the require checks below implicitly do this, but it's way easier to understand/debug when "failing fast" (and explicitly).

Comment on lines +890 to +891
// Set up concurrency.
const goroutineCount = 100

Choose a reason for hiding this comment

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

Can probably set to 1000 (or even 10000) to get the most out of this test. Same for another test.

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.

missing parallel slashing protection test
2 participants