A generic / futures based implementation of the Kademlia DHT, heavily inspired by dtantsur/rust-dht with...

A generic / futures based implementation of the Kademlia DHT, heavily inspired by Open Issues

rust-kad

A generic / futures based implementation of the Kademlia DHT, heavily inspired by dtantsur/rust-dht with the goal of providing a simple to use, well-tested, low-dependency, futures-based API for using DHTs with arbitrary communication mechanisms and encodings

Usage

Configuration

  • k - system wide replication parameter, defines bucket sizes and search breadth
  • concurrency - system wide concurrency parameter, number of parallel operations to run at once

Status

Open Issues

Work In Progress

Components

  • Receive message

    • Update appropriate k-bucket
      • Add node if bucket not full
      • Store pending if bucket full and ping oldest (if > seen time)
    • Respond to Ping with NoResult
    • Respond to FindNodes with NodesFound
    • Respond to FindValues with NodesFound or ValuesFound
    • For new node, Send STORE RPC if own ID is closer to key than known nearby nodes
  • Search - common to most operations

    • Select alpha closest nodes
    • Send RPCs to selected subset of nodes
    • If no suitable responses, expand to k closest nodes
    • Recurse until responses received from k closest nodes
  • Find Node

    • Search using FIND_NODE RPC
    • Return node
  • Find Value

    • Search using FIND_VALUE RPC
    • Collect values
    • Once values returned, store (k, v) pair at the closest node observed that did not return the value
  • Store Value

    • Search using FIND_NODE RPC
    • Send STORE RPC to k closest nodes
  • Connect

    • Insert known node into appropriate k-bucket
    • Perform Find Node lookup on own ID
    • Refresh all k-buckets further than the closest neighbor
  • Maintanence

    • Remove non-responsive / old contacts
    • Expire values
      • Basic expiry after defined time
      • Cache expiry exponentially inversely proportional to number of nodes between current node and closest to key ID node
    • Refresh k-buckets
      • FIND_NODES to random ID in any bucket not queried in a configurable period
    • Re-publish values
      • STORE RPC to K nodes at defined period (hourly)
      • Unless a STORE RPC has been received in the same period
  • Buckets

    • Implement bucket splitting (if it can be done more efficiently than existing?)
      • Useful for maintenance / don't need to message unused buckets
    • Reverse / generate random IDs in bucket for maintenance purposes

Questions

  • How is FindValues usually handled where there can be more than one value per ID?
  • Is there a case when STORE is valid when the origin ID is closer to the requester ID than the local ID?
    • This seems like it could be ignored
Issues

Collection of the latest Issues

groffta

groffta

1

With the generic nature of the crate, and limited documentation, I'm having quite a bit of trouble finding my bearings.

librelois

librelois

0

Your project does not have a license. This prevents me from using it or forking it according to my needs. Please choose a license for your project, preferably a free license if you want :)

ryankurte

ryankurte

0

This should support connecting to peers with unknown IDs, however, the underlying connector expects an Entity<Id, Info> object. Currently the entire connect process must be re-implemented by consumers, this should be improved.

Information - Updated May 13, 2022

Stars: 15
Forks: 4
Issues: 3
CLI

272

Find Files (ff) utility recursively searches the files whose names match the

specified RegExp pattern in the provided directory (defaults to the current

Find Files (ff) utility recursively searches the files whose names match the

Find files with SQL-like queries

While it doesn't tend to fully replace traditional find and ls, fselect has these nice features:

Find files with SQL-like queries

tinysearch is a lightweight, fast, full-text search engine

tinysearch is a Rust/WASM port of the Python code from the article lunr

tinysearch is a lightweight, fast, full-text search engine

Find the DW_AT_producer for all compilation units within a shared library or

The DW_AT_producer is an attribute within DWARF debug info that says what

Find the DW_AT_producer for all compilation units within a shared library or

rust-qr-reader - Find and read QR-Codes

This crates exports functions and types that can be used to search for QR-Codes in images and

rust-qr-reader - Find and read QR-Codes

Find unused dependencies in Cargo

While compilation of this tool also works on Rust stable,

Find unused dependencies in Cargo

Find libs and crates in a Vcpkg installation

Vcpkg installation from cargo build scripts

Find libs and crates in a Vcpkg installation

Find all hosts in your local network using this fast ARP scanner

The CLI is written in Rust and provides a minimal scanner that finds all hosts using the ARP protocol

Find all hosts in your local network using this fast ARP scanner

Find all your notes with one command!

Todo_r is a simple rust command line utility that keeps track of your todo items in code

Find all your notes with one command!

You can find more information about rs_pbrt at

Some images of the test scenes are shown below, but you can find more

You can find more information about rs_pbrt at
CLI

2.5K

sd - s[earch] &amp; d[isplace]

sd is an intuitive find &amp; replace CLI

sd - s[earch] &amp; d[isplace]
Facebook Instagram Twitter GitHub Dribbble
Privacy