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

Expose Floodsub target_peer list. #498

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cobward
Copy link

@cobward cobward commented Feb 28, 2022

The IPFS facade does not have access to the functions which add and remove nodes to the floodsub target_peer list. As such, messages are never propagated to connected peers.

This PR adds two methods to the IPFS facade so that these functions can be used, and so that pubsub can be used in a network of more than one IPFS peer.

Checklist (can be deleted from PR description once items are checked)

  • New code is “linted” i.e. code formatting via rustfmt and language idioms via clippy
  • There are no extraneous changes like formatting, line reordering, etc. Keep the patch sizes small!
  • There are functional and/or unit tests written, and they are passing
  • There is suitable documentation. In our case, this means:
    • Each command has a usage example and API specification
    • Rustdoc tests are passing on all code-level comments
    • Differences between Rust’s IPFS implementation and the Go or JS implementations are explained
  • Additions to CHANGELOG.md files

The IPFS facade does not have access to the functions which add and
remove nodes to the floodsub target_peer list. As such, messages are
never propagated to connected peers.
@cobward cobward force-pushed the expose_floodsub_target_peers branch from 8f27c49 to 39c4f16 Compare February 28, 2022 18:03
@koivunej
Copy link
Collaborator

koivunej commented Apr 1, 2022

Hi @cobward! Thanks for the PR. I've missed this, and now that libp2p was upgraded to 0.43 in #499 I think this is handled "automatically". Could you check and see if the automation matches what you are after?

My initial understanding is that this is something which should be handled behind the scenes and not be exposed, and I don't think this is exposed in go-ipfs (http api at least). I have to admit I'm not up to speed on topic discovery for gossipsub/floodsub, and doubt the partial view adding done with the upgrade is enough for that. If you know more of this topic, any help would be welcome!

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.

2 participants