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 missing Gossip subnet subscription on startup #8730

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

Nashatyrev
Copy link
Contributor

PR Description

GossipForkManager has two different sources of isHeadOptimisticflag:

  • RecentChainData.isChainHeadOptimistic() when starting up
  • onOptimisticHeadChanged() to update the flag

There are possible cases (e.g. Nashatyrev#166) when the value differs in those two sources. Thus subnet subscriptions (which are to be activated when isHeadOptimistic becomes false) may not be activated.

This PR initializes the flag with RecentChainData.isChainHeadOptimistic() value and then relies on onOptimisticHeadChanged() notifications only

Fixed Issue(s)

Fix Nashatyrev#166

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Copy link
Contributor

@tbenr tbenr left a comment

Choose a reason for hiding this comment

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

LGTM

@tbenr tbenr enabled auto-merge (squash) October 16, 2024 08:59
@tbenr tbenr merged commit f5790a5 into master Oct 16, 2024
19 checks passed
@tbenr tbenr deleted the fix/gossip-start-subscriptions branch October 16, 2024 09:22
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.

Not subscribing to Gossip subnets occasionally
2 participants