Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libp2p/js-libp2p
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e91a5a49b825806a9520c8bd2de91cbd1d41f55a
Choose a base ref
...
head repository: libp2p/js-libp2p
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0ce69f0f21ce9bec4ae7ee75f389f53d714677b3
Choose a head ref

Commits on Feb 26, 2025

  1. fix: ignore failures to listen on IPv6 addresses when IPv4 succeeds (#…

    …3001)
    
    If listening on all IPv4 addresses succeeds but listening on all IPv6 addresses fails, we may be on a network that doesn't support IPv6 so ignore the failure.
    
    Fixes #2977
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    e2f4943 View commit details
  2. fix: check for new addresses during dialing (#3003)

    Fixes a race condition where two independent dials occur for the same peer id with different addresses (e.g. one IPv4 and one IPv6) - if the IPv6 is the current dial, the IPv4 dial joins the IPv6 one which can then fail if the current network doesn't support IPv6.
    
    Instead check the list of addresses to dial after each dial attempt to see if new addresses have been added.
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    be9b6a0 View commit details
  3. chore: use prefix logger (#3007)

    Where a relay server is started, use a prefix logger to prevent
    DEBUG output clashing with the unit under test
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    e1f868f View commit details
  4. chore: small logging improvement (#3006)

    Be more specific about relay servers
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    96f79bc View commit details
  5. docs: update WebRTC jsdocs (#3005)

    Updates config comments and moves constants into the constants file
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    f3d9f56 View commit details
  6. fix: improve error message when starting server (#3008)

    When transports fail to listen, include specific error messages and
    advice on how to proceed.
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    ab1bb86 View commit details
  7. fix: improve kad distance list performance (#3009)

    Refactors `addWithKadId` to splice the new entry into the list
    rather than adding it and then sorting.
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    4939ef7 View commit details
  8. Copy the full SHA
    f199d1f View commit details
  9. fix: constrain ip6 listener to ip6 addresses (#3010)

    Solves a port conflict if both ip4 and ip6 wildcard ports are
    listened on.
    
    Only seems to affect some Linuxes.
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    22e62d0 View commit details
  10. fix: constrain ip6 ws listener to ip6 stack (#3011)

    Applies fix from #3010 to ws listener
    achingbrain authored Feb 26, 2025
    Copy the full SHA
    0555339 View commit details
  11. Copy the full SHA
    64052ee View commit details

Commits on Feb 27, 2025

  1. fix: add DER decoder and allow passing protobuf digest (#3013)

    Adds enough of a DER decoder/encoder to parse/store public keys from PKIX bytes and private keys in PKCS#1 bytes.
    
    Also allows passing the digest of a public key in to `publicKeyFromProtobuf` so we can avoid having to recalculate it.
    
    This becomes a big bottleneck when loading a routing table's worth of peers from the peer store where many of them are RSA peers.
    achingbrain authored Feb 27, 2025
    Copy the full SHA
    9acccaa View commit details
  2. fix: pass digest to publicKeyFromProtobuf (#3014)

    This with the changes from #3013 roughly doubles the throughput of loading RSA peers from the peer store which is a massive bottleneck when restarting the amino bootstrapper.
    
    Before:
    
    ```
     % node benchmarks/load-peers.js
    read all x 5.94 ops/sec ±1.37% (33 runs sampled)
    ```
    
    After:
    
    ```
    % node benchmarks/load-peers.js
    read all x 12.43 ops/sec ±1.18% (63 runs sampled)
    ```
    achingbrain authored Feb 27, 2025
    Copy the full SHA
    3d9b07c View commit details

Commits on Mar 3, 2025

  1. fix: .d.ts is in ./dist folder (#3018)

    Since the export is badly done when you try to resolve with esplugin import it will lead to
    1:27 error Unable to resolve path to module '@libp2p/bootstrap' import/no-unresolved
    
    Signed-off-by: Sacha Froment <sfroment42@gmail.com>
    sfroment authored Mar 3, 2025
    Copy the full SHA
    52a46ec View commit details
  2. Copy the full SHA
    6074de6 View commit details
  3. feat: expire peerstore data (#3019)

    Expires peer store multiaddrs after an hour and removes peer store
    peers after six hours if their addresses have not been updated.
    
    Fixes #3017
    achingbrain authored Mar 3, 2025
    Copy the full SHA
    80fe31a View commit details
  4. feat: allow early muxer selection by connection encrypters (#3022)

    Some encrypters allow sending application protocols along with the
    initial handshake.
    
    We can use these to select muxers and save the round-trips of mss.
    achingbrain authored Mar 3, 2025
    Copy the full SHA
    dd71d8a View commit details
  5. feat: add metrics to tls encrypter (#3025)

    Adds metrics for events and errors
    achingbrain authored Mar 3, 2025
    Copy the full SHA
    3f127b6 View commit details
  6. fix: abort connection on TLS error (#3027)

    If the TLS socket emits an error message, abort the connection if
    it is abortable.
    
    We should probably ammend the interface so `.abort` is relected in
    the types but this would be a bigger change.
    achingbrain authored Mar 3, 2025
    Copy the full SHA
    2c8ecb4 View commit details
  7. fix: always send key type (#3028)

    Mark the field `optional` so we always send it on the wire,
    otherwise proto2 decoders that have it marked `required` will fail
    to decode the incoming message.
    achingbrain authored Mar 3, 2025
    Copy the full SHA
    2fbcdb6 View commit details
  8. feat: select muxer early (#3026)

    Uses ALPN protocols to select an early muxer and skip the
    multistream-select dance.
    
    Restores compatibility with jvm-libp2p.
    achingbrain authored Mar 3, 2025
    Copy the full SHA
    c4b6a37 View commit details
  9. fix: decrease default routing table size (#3023)

    Reduces the default routing table size to 1280.
    
    This improves CPU/memory/network usage as we don't need to sort as
    many peers when finding the closest ones to a given key, nor do we
    need to contact as many to ensure only live peers are still in the
    table.
    achingbrain authored Mar 3, 2025
    Copy the full SHA
    48cd9b6 View commit details

Commits on Mar 4, 2025

  1. Copy the full SHA
    0ce69f0 View commit details
Loading