Skip to content

Conversation

@gr0vity-dev
Copy link
Contributor

The votable() method had incorrect logic that allowed voting on recently
voted blocks when it should have prevented them. Fix inverts the logic to:

  • Prevent repeated votes on the same root/hash pairs within spacing window
  • Allow immediate voting on different blocks with same root (competing forks)

Additional changes:

  • Remove vote spacing check from vote_generator reply()
  • Update vote_spacing to track latest fork votes per root
  • Fix tests to reflect correct spacing behavior

…ing immediate votes

for competing forks.

Key changes:
- Remove vote spacing check from reply() in vote_generator.cpp
- Update vote_spacing implementation to track most recent fork votes
- Fix tests to reflect new vote spacing behavior
@gr0vity-dev-bot
Copy link

gr0vity-dev-bot commented Feb 5, 2025

Test Results for Commit 0bc0a2c

Pull Request 4840: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 112s)
  • 5n4pr_conf_10k_change: PASS (Duration: 143s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 128s)
  • 5n4pr_conf_change_independant: PASS (Duration: 135s)
  • 5n4pr_conf_send_dependant: PASS (Duration: 122s)
  • 5n4pr_conf_send_independant: PASS (Duration: 121s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 117s)
  • 5n4pr_rocks_10k_change: PASS (Duration: 148s)

Last updated: 2025-02-16 16:17:14 UTC

@qwahzi qwahzi added this to the V28 milestone Feb 6, 2025
@pwojcikdev
Copy link
Contributor

I modified the vote spacing class to track votes by qualified root, which simplified the code and it eliminated the need to handle ambiguity.

@pwojcikdev pwojcikdev moved this from In Progress / V28.0 to Research for Future in Nano Roadmap Apr 22, 2025
@pwojcikdev pwojcikdev modified the milestones: V28, Backlog Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Research for Future

Development

Successfully merging this pull request may close these issues.

4 participants