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

Bootstrap from previous/existing peers #834

Open
carsonfarmer opened this issue Jun 20, 2019 · 3 comments
Open

Bootstrap from previous/existing peers #834

carsonfarmer opened this issue Jun 20, 2019 · 3 comments
Labels
discussion Open discussion Enhancement A new feature request or enhancement to existing feature question Further information is requested

Comments

@carsonfarmer
Copy link
Member

Right now, any peer that is shutdown and then restarted will try to bootstrap off the default bootstrap peerlist. However, given the social network nature of many Textile applications (sharing photos, files, etc), it might make more sense to attempt to connect to, and bootstrap from, peers we have previously interacted with. This has the benefit of potentially more quickly finding peers you regularly share with, which is critical in a mobile environment (fast warmup). It additionally may avoid peers trying to connect to Cafes that are difficult or even impossible to reach in some cases.

Possible way forward?

It is not immediately clear where to intercept the boostrapping step of libp2p, but there appears to be a bootstrap libp2p service that can be used? The other possibility is simply letting the default boostrapping happen, and adding an additional Textile Boostrap service connect to peers on top of/in addition to this?

@carsonfarmer carsonfarmer added question Further information is requested discussion Open discussion Enhancement A new feature request or enhancement to existing feature labels Jun 20, 2019
@carsonfarmer
Copy link
Member Author

A suggestion from postables on IRC:

that functionality should really be trivial to add if you have access to peerstore.Peerstore and the peerstore.Peerstore is stored persisently somewhere, (ie using peerstore/pstoreds
probably would look something like:

function (s *Service) Bootstrap() {
    if len(s.peerstore.GetPeers()) > 0 {
         // pull individual peers, connect to them
         return 
    }
    // no peers stored so trigger default bootstrapping
    return
}

@carsonfarmer
Copy link
Member Author

carsonfarmer commented Jun 20, 2019

@carsonfarmer
Copy link
Member Author

Awesome, looks like RTradeLtd has built something similar (untested): https://github.com/RTradeLtd/bootstrap

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion Open discussion Enhancement A new feature request or enhancement to existing feature question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant