Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

V2 #13

Merged
merged 35 commits into from
Apr 29, 2024
Merged

V2 #13

merged 35 commits into from
Apr 29, 2024

Conversation

Nuhvi
Copy link
Collaborator

@Nuhvi Nuhvi commented Apr 15, 2024

A breaking change that disrupts the API significantly.

The main purpose of this version is to support Pkarr V2. It does so returning an RpcTickReport struct from Rpc::tick, enabling receiving MutableItem in a loop, without blocking the client.

Similarly, a Relay might listen to incoming requests, respond with a cached SignedPacket, and/or query the Dht if it doesn't have it cached. This means a Relay can be queried through the UDP socket as an alternative to HTTP in a native environment. To help with that the Rpc now exposes request, response and error from the KrpcSocket.

Additionally, the following changes make the Mainline Dht and AsyncDht itself nicer to use.

  1. Reuse the closest nodes between subsequent queries, making Get queries much faster.
  2. Use fresh latest nodes from a Get query in the Put query, making it faster.
  3. Because of (2.) Put methods only need one flume channel instead of two.
  4. Get methods return Iterator and Stream from the Dht and AsyncDht respectively.

@Nuhvi Nuhvi changed the title wip: V2 V2 Apr 19, 2024
@Nuhvi Nuhvi merged commit 732b931 into main Apr 29, 2024
1 check passed
@Nuhvi Nuhvi deleted the v2 branch January 24, 2025 09:35
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant