Git Product home page Git Product logo

go-libp2p-kbucket's Introduction

go-libp2p-kbucket

Discourse posts

A kbucket implementation for use as a routing table in go-libp2p-kad-dht

Documenation

See https://godoc.org/github.com/libp2p/go-libp2p-kbucket.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the libp2p Code of Conduct.

Want to hack on libp2p?

License

MIT


The last gx published version of this module was: 2.2.23: QmSNE1XryoCMnZCbRaj1D23k6YKCaTQ386eJciu1pAfu8M

go-libp2p-kbucket's People

Contributors

aarshkshah1992 avatar anacrolix avatar aschmahmann avatar cce avatar cleichner avatar dependabot-preview[bot] avatar dependabot[bot] avatar galargh avatar geoah avatar guillaumemichel avatar guseggert avatar hannahhoward avatar hosh avatar hsanjuan avatar jameshertz avatar jbenet avatar jorropo avatar justindrake avatar kevina avatar kubuxu avatar libp2p-mgmt-read-write[bot] avatar marten-seemann avatar monotone avatar nisainan avatar raulk avatar stebalien avatar web-flow avatar web3-bot avatar whyrusleeping avatar yusefnapora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-libp2p-kbucket's Issues

Replace dead(not missing) peers & candidates

Based on some good ideas by @aschmahmann , here's a couple of things we can do to improve how we manage the replacement cache & "dead" peers:

  1. Since the replacement cache is bounded, we could lose potential candidates if it's full. So, when we eject a candidate from the replacement cache either because it goes into the RT or it's not reachable, we should replace it with a connected peer that is neither in the RT nor in the replacement cache.
    See libp2p/go-libp2p-kad-dht#482 (comment) for the motivating discussion.

  2. When DHT calls HandleDeadPeer on the RT for a peer, we immediately eject it from the RT without replacing it. Currently, the DHT does this for a connected peer that stops being a DHT server. We should replace such peers.

Error during go get: no Go files in...

Hi, when I try to run go get github.com/libp2p/go-libp2p-kbucket I get the following message:

../../libp2p/go-libp2p-kbucket/peerdiversity/filter.go:13:2: no Go files in ~/go/src/github.com/libp2p/go-libp2p-asn-util`

Any idea what is causing this and how to fix it?

Perform insertion, removal etc of peers in a single event loop in the RT

We need to move the code that listens for various events (PeerProtocolUpdated, PeerDisconnected/Connected etc etc) into a single event loop inside the Routing Table.

There's no reason to keep it in the DHT since we eventually want the RT to be a self sustaining data structure. This will also help prevent race conditions that arise in managing the RT/replacement-cache & make the code easy to reason about.

Once libp2p/go-libp2p#801 goes in, we only need to depend on the event bus for all the relevant events & so will not have to depend on the host.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.