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

All Communities are using a single bootstrapper #6250

Closed
qstokkink opened this issue Aug 12, 2021 · 1 comment · Fixed by #6252
Closed

All Communities are using a single bootstrapper #6250

qstokkink opened this issue Aug 12, 2021 · 1 comment · Fixed by #6252

Comments

@qstokkink
Copy link
Contributor

qstokkink commented Aug 12, 2021

The IPv8 component has a single bootstrapper:

self.bootstrapper = DispersyBootstrapper(**args)

This instance is being inserted into multiple communities, for example:

community.bootstrappers.append(ipv8_component.bootstrapper)

community.bootstrappers.append(ipv8_component.bootstrapper)

A Bootstrapper instance cannot deal with being used in multiple Community instances. Effectively, this causes the Community instances to overwrite eachother. Instead, each Community instance should have its own bootstrapper. This is how it looked before #6206:

def get_bootstrappers(self, session):
from ipv8.bootstrapping.dispersy.bootstrapper import DispersyBootstrapper
from ipv8.configuration import DISPERSY_BOOTSTRAPPER
bootstrap_override = session.config.ipv8.bootstrap_override
if bootstrap_override:
address, port = bootstrap_override.split(':')
return [(DispersyBootstrapper, {"ip_addresses": [(address, int(port))],
"dns_addresses": []})]
return [(DispersyBootstrapper, DISPERSY_BOOTSTRAPPER['init'])]

If you're using the same bootstrapper configuration everywhere, I'd recomment replacing ipv8.bootstrapper with a factory method ipv8.get_bootstrapper() that makes new DispersyBootstrapper instances.

@kozlovsky
Copy link
Contributor

@qstokkink thank you for the explanation! I think the PR should fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants