litep2p icon indicating copy to clipboard operation
litep2p copied to clipboard

Peer-to-peer networking library

Results 30 litep2p issues
Sort by recently updated
recently updated
newest added

The `FindManyNodesContext` was introduced in https://github.com/paritytech/litep2p/pull/77. It currently generates a PUT_VALUE for the static list of provided peers. Extend this functionality to drive multiple `FindNodeContext` queries. When the user provides...

enhancement

Currently, we encode and send all protocols at once during `multistream-select` phase when opening WebRTC stream: https://github.com/paritytech/litep2p/blob/337538f8b68d755056fa3f8a8bcf624ae1937c12/src/multistream_select/dialer_select.rs#L273-L278 This is against libp2p [`multistream-select` spec](https://github.com/libp2p/specs/blob/master/connections/README.md#multistream-select), which states that protocols should be negotiated...

bug

While working on https://github.com/paritytech/polkadot-sdk/pull/1631 I tried upgrading litep2p to use `multiaddr-0.18.1` also used by `libp2p-0.52.3`. The thing with `multiaddr-0.18.1` is that it uses `libp2p_identity::PeerId` as a payload of `Protocol::P2p` instead...

Make the transport layer a bit more module and allow the TCP transport code to be reused for WebSocket purposes. cc https://github.com/paritytech/litep2p/pull/69 @paritytech/networking

enhancement

The lazy negotiated protocol is constructed when `V1Lazy` is specified (notes: https://github.com/libp2p/rust-libp2p/pull/1212). https://github.com/paritytech/litep2p/blob/cc043b66f9c2c20349359150f522b83f260ec587/src/multistream_select/dialer_select.rs#L157-L165 The lazy negotiated protocol then expects the header (/multistream/1.0.0) and a single protocol name from the socket,...

bug
easy

The implementation of [`RoutingTable::closest`](https://github.com/altonen/litep2p/blob/365330d0b1ff96796b7ac0a78cec197f6e79ca7e/src/protocol/libp2p/kademlia/routing_table.rs#L180) calls [`KBucket::closest_iter`](https://github.com/altonen/litep2p/blob/365330d0b1ff96796b7ac0a78cec197f6e79ca7e/src/protocol/libp2p/kademlia/bucket.rs#L104), where all peers of a bucket are cloned: https://github.com/altonen/litep2p/blob/365330d0b1ff96796b7ac0a78cec197f6e79ca7e/src/protocol/libp2p/kademlia/bucket.rs#L105 This can be optimized by sorting entries in place, yielding references, and cloning only `KademliaPeer`s...

enhancement
easy

Both original [Kademlia paper](https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf) and [libp2p implementation](https://github.com/libp2p/rust-libp2p/blob/master/protocols/kad/src/kbucket/bucket.rs#L115-L118) use pending (discovered, but not connected) nodes in k-buckets, so that they can replace unreachable nodes. Add pending nodes to litep2p Kademlia implementation.

enhancement
easy

Currently the routing table doesn't evict any peers if a bucket is full. Meaning if Kademlia tries to add a peer with an active connection to the routing table and...

enhancement
easy

There is virtually no backpressure in either direction. Data channel counts are seemingly not restricted in any way. Substream on the protocol-side should block if remote is not willing to...

enhancement
involved