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: set tipset sample size to 1 #4328

Merged
merged 2 commits into from
May 15, 2024
Merged

Conversation

lemmih
Copy link
Contributor

@lemmih lemmih commented May 15, 2024

Summary of changes

Changes introduced in this pull request:

  • Forest would sample tipset HEADs from 5 peers before fully joining a network. This obviously doesn't work if there are fewer than 5 peers available. This PR temporarily sets the sample size to 1. The chain muxer is scheduled to be completely re-written soon.

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@lemmih lemmih marked this pull request as ready for review May 15, 2024 12:53
@lemmih lemmih requested a review from a team as a code owner May 15, 2024 12:53
@lemmih lemmih requested review from ruseinov and hanabi1224 and removed request for a team May 15, 2024 12:53
Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

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

Does it make the node more likely to follow a bad fork or what are the downsides? Perhaps we could hide parameterize it with environmental variable to unblock miner integration but keep the 5 peers requirement?

@lemmih
Copy link
Contributor Author

lemmih commented May 15, 2024

Does it make the node more likely to follow a bad fork or what are the downsides? Perhaps we could hide parameterize it with environmental variable to unblock miner integration but keep the 5 peers requirement?

It makes it more likely that we will follow a fork rather than a more common branch, but we should still eventually end up following the heaviest tipset.

IMO, it isn't worth making it configurable. This entire chain_muxer code is incredibly fragile, and it's being replaced as soon as possible. The new state machine will not have anything similar to the tipset sample parameter.

Copy link
Member

@LesnyRumcajs LesnyRumcajs left a comment

Choose a reason for hiding this comment

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

🙏

@lemmih lemmih added this pull request to the merge queue May 15, 2024
@ruseinov
Copy link
Contributor

IMO, it isn't worth making it configurable. This entire chain_muxer code is incredibly fragile, and it's being replaced as soon as possible. The new state machine will not have anything similar to the tipset sample parameter.

Is there a WIP branch with the state machine? :) Looking forward to this new bit of code, chain_muxer is quite hard to follow.

@ruseinov ruseinov mentioned this pull request May 15, 2024
Merged via the queue into main with commit 5443b2e May 15, 2024
47 checks passed
@lemmih lemmih deleted the lemmih/lower-default-tipset-sample-size branch May 15, 2024 13:56
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.

None yet

4 participants