Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Saving previously seen nodes for later bootstrapping #1505

Closed
lidel opened this issue Aug 12, 2018 · 5 comments
Closed

Saving previously seen nodes for later bootstrapping #1505

lidel opened this issue Aug 12, 2018 · 5 comments
Assignees
Labels
exp/expert Having worked on the specific codebase is important kind/resolved-in-helia P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@lidel
Copy link
Member

lidel commented Aug 12, 2018

Version: N/A

Type: Enhancement

Severity: Medium

Description:

IPFS Node should persist a list of currently connected peers periodically, so the next time it starts it can use previously working peers in addition to centralized bootstrap nodes.

This is especially important in web browser context, where discovery often relies on centralized signaling servers. Having a ready-to-use cache of known-to-work peers would improve startup performance in those contexts and act as an additional tool for achieving connectivity magic (#1459).

References:

  • This is js-ipfs version for original issue from Saving previously seen nodes for later bootstrapping kubo#3926:

    Bootstrap nodes built into ipfs client don't seem to work for me at all. Had to find and add some manually. Generally having so centralized bootstrap system for otherwise decentralized network is its weakness: Censorship resistant bootstrapping (e.g. for wikipedia) kubo#3908
    Should ipfs automatically save all the nodes it seen and the time of last seen, to clean out the list later? That should make the bootstrapping more reliable and truly decentralized.

  • Prior art: Torrent clients persist things like DHT routing tables between restarts to improve performance, eg. aria CLI https://linux.die.net/man/1/aria2c:

    By default, the routing table of IPv4 DHT is saved to the path $HOME/.aria2/dht.dat and the routing table of IPv6 DHT is saved to the path $HOME/.aria2/dht6.dat.

@alanshaw alanshaw added exp/expert Having worked on the specific codebase is important status/deferred Conscious decision to pause or backlog exploration labels Aug 14, 2018
@daviddias daviddias added status/ready Ready to be worked exp/wizard Extensive knowledge (implications, ramifications) required P2 Medium: Good to have, but can wait until someone steps up exp/expert Having worked on the specific codebase is important and removed status/deferred Conscious decision to pause or backlog exploration exp/expert Having worked on the specific codebase is important exp/wizard Extensive knowledge (implications, ramifications) required labels Dec 9, 2018
@lidel
Copy link
Member Author

lidel commented Feb 15, 2019

Ideas being discussed in libp2p/go-libp2p-kad-dht#254

@lidel
Copy link
Member Author

lidel commented Mar 14, 2022

I think ipfs/kubo#3926 (comment) applies to js-ipfs as well.

@achingbrain
Copy link
Member

This sounds a lot like the libp2p persistent peer store, right? It's enabled by default in node and the browser.

libp2p emits all known peers at startup which should trigger auto-dial means we'd connect to them, up to the max connections threshold.

Is it not working as intended?

@SgtPooki SgtPooki self-assigned this May 17, 2023
@SgtPooki
Copy link
Member

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterwards (see #4336).

Handing this off to @achingbrain to see how to handle moving forward.

@achingbrain
Copy link
Member

libp2p has a persistent peer store, and peers are selected from the store to be dialled on start up so I think this can be closed.

The other issue is reloading the KAD buckets which is tracked here: libp2p/js-libp2p-kad-dht#109

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important kind/resolved-in-helia P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants