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

Double the usefulness interval for peers in the Routing Table #651

Merged
merged 5 commits into from May 22, 2020

Conversation

aarshkshah1992
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 commented May 20, 2020

@Stebalien
Copy link
Member

The BootstrapPeers option takes a list of multiaddrs. One can pass DefaultBootstrapPeers... in directly, right?

@aarshkshah1992
Copy link
Contributor Author

aarshkshah1992 commented May 21, 2020

@Stebalien We now pass peer.AddrInfo to the BootstrapPeers option.

@aarshkshah1992 aarshkshah1992 changed the title Method for getting bootstrap peers and double the usefulness interval Double the usefulness interval for peers in the Routing Table May 21, 2020
Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

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

This PR is fine and should only make things better/stay the same. However, I would've liked for us to run some tests to demonstrate that increasing the usefulness threshold actually helps us.

If we're going to be running testground tests on this in the near future to examine this parameter then we should probably make the usefulness threshold be configurable (see comment)

Comment on lines +283 to +284
// use twice the theoritical usefulness threhold to keep older peers around longer
rt, err := makeRoutingTable(dht, cfg, 2*maxLastSuccessfulOutboundThreshold)
Copy link
Contributor

Choose a reason for hiding this comment

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

@aarshkshah1992 what do you think about having the usefulness here be an option so that we can play around with it in testground?

Perhaps something like an option that takes func(refreshThreshold time.Duration) time.Duration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

3 participants