-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update bootstrappers #89
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See one comment, not sure if actionable
"/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", | ||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", | ||
"/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", | ||
"/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dirkmc is it intentional that you are looking only for the .82
host here, but above ( line 96 ) there are 2 "old style" hosts?
Approving, as the rest looks good and the above is likely intentional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question - yes, in the migrate forward we move from oldConfig
to expectedMigrateForward
. In the migrate backwards we move from newConfig
to expectedMigrateBackward
for which I wanted a test that includes one peer that is "known" (in the list of peers with acceptably large keys) and one that is not in that list, to make sure both get through.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the var names to make it a little clearer what's going on, and added some more explicit tests
@dirkmc overall seems reasonable a couple comments/thoughts.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment: we should try to respect user choices as much as possible. We need to add our new bootstrappers if the user hasn't explicitly removed our old bootstrappers and we should re-add the old bootstrappers if the user hasn't explicitly removed our new bootstrappers. Otherwise, the user is on their own.
Otherwise, we could cause problems for users on private/separate networks.
@aschmahmann you're right that there's a lot of boilerplate. Much of this code is copied from https://github.com/ipfs/fs-repo-migrations/tree/master/ipfs-5-to-6 (and much of that is copied from earlier version changes) |
@dirkmc as I mentioned in the issue I linked we really need to up our config file game so that we can deal with default values. Currently we just give people a config file on init and the only way to upgrade it is a repo migration or having users manually change the files. We have some experimental features that can be enabled optionally via config (e.g. pubsub) that when we want to enable by default (we already do) we don't have any choices other than modifying the user's config file (e.g. via a repo migration) |
@Stebalien I think I've addressed all your suggestions, let me know if the logic looks right to you now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there. I have one somewhat paranoid nit (my network actually has an ipfs.local
node so I wouldn't be surprised if people use /dns4/ipfs.my-domain.com
as a bootstrapper).
@dirkmc how's your internet? To test this, I think we need to: Build ipfs/kubo#6814 with https://github.com/ipfs/distributions:
(checkout the readme in github.com/ipfs/distributions, it should walk you through this process) This will publish a local release of IPFS with Once you have everything built, you can write the sharness test. Model it after
If everything works, pin |
Merging as there's no reason to leave this sitting in a PR. It won't be used until we bump the repo version and cut a release. |
Thanks 👍 I messed around with trying to get sharness tests working with a temp release but was having trouble with the old, vendored dependencies (eg ipfs-update). It may make sense to wait till we have a RC so as to avoid having to cut a temp release and the versioning issues that raises when trying to write sharness tests. |
Yeah, there's no point in wasting time on this. I'm going to see if I can clean up the deps at all but I won't spend too much time at it.
|
As part of Fixing Bootstrapping we need to add a repo migration that
TODO: