Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

fix restore_bootstrappers doesn't enable content discovery #406

Merged
merged 16 commits into from
Oct 7, 2020

Conversation

koivunej
Copy link
Collaborator

@koivunej koivunej commented Oct 6, 2020

Fixes #405 and also:

  • makes sure ipfs.restore_bootstrappers is used in the dht_popular_content_discovery test
  • adds a test case making sure we can parse all config::BOOTSTRAP_NODES
  • adds some FIXMEs we couldn't decide yet on the other /bootstrap impl handled
  • expose ipfs::config to allow http to access ipfs::config::BOOTSTRAP_NODES to enable the http api semantics
  • keep exposing the delta semantics in ipfs.restore_bootstrappers
  • use ipfs.restore_bootstrappers in examples/fetch_and_cat.rs via new --default-bootstrappers option/mode
  • add tracing to *_bootstrapper methods

@koivunej koivunej requested a review from ljedrz October 6, 2020 10:48
@koivunej
Copy link
Collaborator Author

koivunej commented Oct 6, 2020

I'll update this when the #400 is merged so that I can add this to changelog but unless the build fails I dont have anything to add.

Copy link
Member

@ljedrz ljedrz left a comment

Choose a reason for hiding this comment

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

LGTM 👌

Joonas Koivunen added 13 commits October 7, 2020 13:45
using the ipfs.restore_bootstrappers() should probably be the default
way in order to set the default bootstrappers.
fixes rs-ipfs#405 while also changing the return value to be the restored
values (at the moment 0 or 1 multiaddrs).
return all instead of returning only the delta, as required by the
interface-http-core tests.
this might not be a complete solution to removing bootstrap peers, as we
might need to disconnect from them as well but they shouldn't at least
be considered for dht queries anymore.
@koivunej koivunej changed the title fix restore_bootstrappers not enabling content discovery fix restore_bootstrappers doesn't enable content discovery Oct 7, 2020
@koivunej koivunej marked this pull request as ready for review October 7, 2020 13:23
@aphelionz
Copy link
Contributor

Tested locally, this is great. What do we need to get it out of draft status? :)

Also should we release 0.2.1 after this is merged?

@koivunej
Copy link
Collaborator Author

koivunej commented Oct 7, 2020

Tested manually that these still work ok:

  • cargo test -- --ignored dht_popular_content_discovery -- finds the logo
  • cargo run --example fetch_and_cat -- prints help
  • cargo run --example fetch_and_cat -- PATH -- prompts to connect another node
  • cargo run --example fetch_and_cat -- PATH ADDR -- connects to ADDR, downloads
  • cargo run --example fetch_and_cat -- --default-bootstrappers PATH -- finds content

@koivunej
Copy link
Collaborator Author

koivunej commented Oct 7, 2020

Yeah it's probably best to cut a release soon but maybe wait for #409.

examples/fetch_and_cat.rs Outdated Show resolved Hide resolved
examples/fetch_and_cat.rs Outdated Show resolved Hide resolved
http/src/v0/bootstrap.rs Outdated Show resolved Hide resolved
http/src/v0/bootstrap.rs Outdated Show resolved Hide resolved
http/src/v0/bootstrap.rs Outdated Show resolved Hide resolved
http/src/v0/bootstrap.rs Outdated Show resolved Hide resolved
@koivunej
Copy link
Collaborator Author

koivunej commented Oct 7, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 7, 2020

Build succeeded:

@bors bors bot merged commit bac542a into rs-ipfs:master Oct 7, 2020
@koivunej koivunej deleted the issue_405 branch January 12, 2021 10:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

calling Ipfs::restore_bootstrappers doesn't end up connecting to any bootstrapper
3 participants