Skip to content

v0.8.0

Latest
Compare
Choose a tag to compare
@lexnv lexnv released this 04 Nov 16:57
· 5 commits to master since this release
v0.8.0
af0535c

[0.8.0] - 2024-11-04

This release adds support for content provider advertisement and discovery to Kademlia protocol implementation (see libp2p spec).
Additionally, the release includes several improvements and memory leak fixes to enhance the stability and performance of the litep2p library.

Content Provider Advertisement and Discovery

Litep2p now supports content provider advertisement and discovery through the Kademlia protocol.
Content providers can publish their records to the network, and other nodes can discover and retrieve these records using the GET_PROVIDERS query.

    // Start providing a record to the network.
    // This stores the record in the local provider store and starts advertising it to the network.
    kad_handle.start_providing(key.clone());

    // Wait for some condition to stop providing...

    // Stop providing a record to the network.
    // The record is removed from the local provider store and stops advertising it to the network.
    // Please note that the record will be removed from the network after the TTL expires.
    kad_provider.stop_providing(key.clone());

    // Retrieve providers for a record from the network.
    // This returns a query ID that is later producing the result when polling the `Kademlia` instance.
    let query_id = kad_provider.get_providers(key.clone());

Added

  • kad: Providers part 8: unit, e2e, and libp2p conformance tests (#258)
  • kad: Providers part 7: better types and public API, public addresses & known providers (#246)
  • kad: Providers part 6: stop providing (#245)
  • kad: Providers part 5: GET_PROVIDERS query (#236)
  • kad: Providers part 4: refresh local providers (#235)
  • kad: Providers part 3: publish provider records (start providing) (#234)

Changed

  • transport_service: Improve connection stability by downgrading connections on substream inactivity (#260)
  • transport: Abort canceled dial attempts for TCP, WebSocket and Quic (#255)
  • kad/executor: Add timeout for writting frames (#277)
  • kad: Avoid cloning the KademliaMessage and use reference for RoutingTable::closest (#233)
  • peer_state: Robust state machine transitions (#251)
  • address_store: Improve address tracking and add eviction algorithm (#250)
  • kad: Remove unused serde cfg (#262)
  • req-resp: Refactor to move functionality to dedicated methods (#244)
  • transport_service: Improve logs and move code from tokio::select macro (#254)

Fixed

  • tcp/websocket/quic: Fix cancel memory leak (#272)
  • transport: Fix pending dials memory leak (#271)
  • ping: Fix memory leak of unremoved pending_opens (#274)
  • identify: Fix memory leak of unused pending_opens (#273)
  • kad: Fix not retrieving local records (#221)