Skip to content

Optimize Vote Request Behavior During Bootstrapping#4798

Merged
pwojcikdev merged 1 commit intonanocurrency:developfrom
gr0vity-dev:prs/transition_active_fast
Dec 14, 2024
Merged

Optimize Vote Request Behavior During Bootstrapping#4798
pwojcikdev merged 1 commit intonanocurrency:developfrom
gr0vity-dev:prs/transition_active_fast

Conversation

@gr0vity-dev
Copy link
Copy Markdown
Contributor

With bounded backlog there's a need to minimize the gap between checked and cemented blocks especially during bootstrapping phase. Currently, elections stay passive for 5 seconds by default, during which we don't request votes. However, during bootstrapping, we need to request votes to confirm blocks.

This PR implements a heuristic to identify if a block is actively being voted on. If there are no recent votes in the vote cache for a block, it likely indicates we're in bootstrapping phase, and we should request votes immediately rather than waiting for the default 5-second passive period.

The election will transition to active state immediately if the block's hash is not found in the vote cache.

@gr0vity-dev-bot
Copy link
Copy Markdown

gr0vity-dev-bot commented Nov 30, 2024

Test Results for Commit 6c81e6b

Pull Request 4798: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 113s)
  • 5n4pr_conf_10k_change: PASS (Duration: 144s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 142s)
  • 5n4pr_conf_change_independant: PASS (Duration: 137s)
  • 5n4pr_conf_send_dependant: PASS (Duration: 124s)
  • 5n4pr_conf_send_independant: PASS (Duration: 124s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 112s)
  • 5n4pr_rocks_10k_change: PASS (Duration: 179s)

Last updated: 2024-12-13 20:13:16 UTC

@gr0vity-dev gr0vity-dev force-pushed the prs/transition_active_fast branch from 6d28a3e to 543db79 Compare December 12, 2024 13:57
@gr0vity-dev gr0vity-dev force-pushed the prs/transition_active_fast branch from 543db79 to 6c81e6b Compare December 13, 2024 18:40
@pwojcikdev pwojcikdev merged commit adbb40c into nanocurrency:develop Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged / V28.0

Development

Successfully merging this pull request may close these issues.

4 participants