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 timing issue in active_elections.fork_replacement_tally #4802

Conversation

gr0vity-dev
Copy link
Contributor

This testcase fails in ~10% of cases on my machine with

Expected equality of these values:
  max_blocks
    Which is: 10
  election->blocks ().size ()
    Which is: 1

By waiting for election insertion for the first block, before processing forks, this timing issue is eliminated.

Wait for election insertion before processing forks
@gr0vity-dev-bot
Copy link

gr0vity-dev-bot commented Dec 4, 2024

Test Results for Commit 9a92ec2

Pull Request 4802: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 111s)
  • 5n4pr_conf_10k_change: PASS (Duration: 186s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 135s)
  • 5n4pr_conf_change_independant: PASS (Duration: 130s)
  • 5n4pr_conf_send_dependant: PASS (Duration: 134s)
  • 5n4pr_conf_send_independant: PASS (Duration: 125s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 113s)
  • 5n4pr_rocks_10k_change: PASS (Duration: 195s)

Last updated: 2024-12-05 15:17:41 UTC

// Assert election exists on first iteration
if (i == 0)
{
ASSERT_TIMELY (5s, election = node1.active.election (fork->qualified_root ()));
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be true for every iteration, not just the first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we could make the assert more general for every iteration.

@pwojcikdev pwojcikdev merged commit 73bbdfd into nanocurrency:develop Dec 5, 2024
25 of 28 checks passed
@qwahzi qwahzi added this to the V28 milestone Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress / V28.0
Development

Successfully merging this pull request may close these issues.

4 participants