Skip to content
Permalink
Branch: master
Commits on Apr 21, 2019
  1. Small addendum to #1072. (#1077)

    romanb committed Apr 21, 2019
    * Small addendum to #1072.
    
      * Missed two review comments related to documentation.
      * Avoid creating new `Delay`s when possible, i.e. when the deadline
        did not change, since they're not exactly cheap and returning
        `KeepAlive::Until(t)` with the same instant `t` over a prolonged
        period of time is common.
    
    * Even better.
Commits on Apr 20, 2019
  1. Remove libp2p-ping keep-alive functionality. (#1067)

    romanb committed Apr 20, 2019
    * Fix connection & handler shutdown when using `KeepAlive::Now`.
    
    Delay::new(Instant::now()) is never immediately ready, resulting in
    `KeepAlive::Now` to have no effect, since the delay is re-created on
    every execution of `poll()` in the `NodeHandlerWrapper`. It can also
    send the node handler into a busy-loop, since every newly
    created Delay will trigger a task wakeup, which creates a new Delay
    with Instant::now(), and so forth.
    
    The use of `Delay::new(Instant::now())` for "immediate" connection shutdown
    is therefore removed here entirely. An important assumption is thereby
    that as long as the node handler non-empty `negotiating_in` and `negotiating_out`,
    the handler is not dependent on such a Delay for task wakeup.
    
    * Correction to the libp2p-ping connection timeout.
    
    The current connection timeout is always short of one `interval`,
    because the "countdown" begins with the last received or sent pong
    (depending on the policy). In effect, the current default config has
    a connection timeout of 5 seconds (20 - 15) from the point when a ping is sent.
    
    Instead, the "countdown" of the connection timeout should always begin
    with the next scheduled ping. That also makes all configurations valid,
    avoiding pitfalls.
    
    The important properties of the ping handler are now checked to hold for all
    configurations, in particular:
    
      * The next ping must be scheduled no earlier than the ping interval
        and no later than the connection timeout.
    
      * The "countdown" for the connection timeout starts on the next ping,
        i.e. the full connection timeout remains at the instant when the
        next ping is sent.
    
    * Do not keep connections alive.
    
    The ping protocol is not supposed to keep otherwise idle connections
    alive, only to add an additional condition for terminating them in
    the form of a configurable number of consecutive failed ping requests.
    
    In this context, the `PingPolicy` does not seem useful any longer.
  2. Fix connection & handler shutdown when using `KeepAlive::Now`. (#1072)

    romanb committed Apr 20, 2019
    * Fix connection & handler shutdown when using `KeepAlive::Now`.
    
    Delay::new(Instant::now()) is never immediately ready, resulting in
    `KeepAlive::Now` to have no effect, since the delay is re-created on
    every execution of `poll()` in the `NodeHandlerWrapper`. It can also
    send the node handler into a busy-loop, since every newly
    created Delay will trigger a task wakeup, which creates a new Delay
    with Instant::now(), and so forth.
    
    The use of `Delay::new(Instant::now())` for "immediate" connection shutdown
    is therefore removed here entirely. An important assumption is thereby
    that as long as the node handler non-empty `negotiating_in` and `negotiating_out`,
    the handler is not dependent on such a Delay for task wakeup.
    
    * Trigger CI.
  3. Fix CircleCI build (#1074)

    tomaka committed Apr 20, 2019
Commits on Apr 18, 2019
  1. swarm: ban connections based on peerid (#1065)

    montekki authored and tomaka committed Apr 18, 2019
    * swarm: ban connections based on peerid
    
    * Update core/src/swarm/swarm.rs
    
    Co-Authored-By: montekki <fedor.sakharov@gmail.com>
    
    * Update core/src/swarm/swarm.rs
    
    Co-Authored-By: montekki <fedor.sakharov@gmail.com>
    
    * remove the testing code
    
    * close connections on ban ban_peer_id
    
    * adds code to unban a peer
    
    * simplify connection closing code
    
    * remove blank line
    
    * ignore DialPeer actions and inject_dial_failure
    
    * Update core/src/swarm/swarm.rs
    
    Co-Authored-By: montekki <fedor.sakharov@gmail.com>
    
    * Update core/src/swarm/swarm.rs
    
    Co-Authored-By: montekki <fedor.sakharov@gmail.com>
    
    * bring back the .expect()
  2. Update to yamux 0.2.0 (#1069)

    twittner committed Apr 18, 2019
  3. Fix `multiaddr::util::BytesWriter`. (#1068)

    twittner committed Apr 18, 2019
    The current implementation does not properly reserve enough space for
    `Write::write_all` to succeed. The property test has been improved to
    trigger that issue.
Commits on Apr 17, 2019
  1. Remove `Transport::nat_traversal` and refactor `multiaddr`. (#1052)

    twittner committed Apr 17, 2019
    The functionality is available through `Multiaddr::replace`.
    What we currently call "nat_traversal" is merley a replacement of an IP
    address prefix in a `Multiaddr`, hence it can be done directly on
    `Multiaddr` values instead of having to go through a `Transport`.
    
    In addition this PR consolidates changes made to `Multiaddr` in
    previous commits which resulted in lots of deprecations. It adds some
    more (see below for the complete list of API changes) and removes all
    deprecated functionality, requiring a minor version bump.
    
    Here are the changes to `multiaddr` compared to the currently published
    version:
    
    1.  Removed `into_bytes` (use `to_vec` instead).
    2.  Renamed `to_bytes` to `to_vec`.
    3.  Removed `from_bytes` (use the `TryFrom` impl instead).
    4.  Added `with_capacity`.
    5.  Added `len`.
    6.  Removed `as_slice` (use `AsRef` impl instead).
    7.  Removed `encapsulate` (use `push` or `with` instead).
    8.  Removed `decapsulate` (use `pop` instead).
    9.  Renamed `append` to `push`.
    10. Added `with`.
    11. Added `replace`.
    12. Removed `ToMultiaddr` trait (use `TryFrom` instead).
  2. Add some TryFrom implementations (#1060)

    tomaka committed Apr 17, 2019
Commits on Apr 16, 2019
  1. Update examples to print a listen address. (#1064)

    romanb committed Apr 16, 2019
    This was no longer the case since #1032.
  2. Add NetworkBehaviour::inject_new_external_addr (#1063)

    tomaka committed Apr 16, 2019
  3. libp2p-ping improvements. (#1049)

    romanb committed Apr 16, 2019
    * libp2p-ping improvements.
    
      * re #950: Removes use of the `OneShotHandler`, but still sending each
        ping over a new substream, as seems to be intentional since #828.
    
      * re #842: Adds an integration test that exercises the ping behaviour through
        a Swarm, requiring the RTT to be below a threshold. This requires disabling
        Nagle's algorithm as it can interact badly with delayed ACKs (and has been
        observed to do so in the context of the new ping example and integration test).
    
      * re #864: Control of the inbound and outbound (sub)stream protocol upgrade
        timeouts has been moved from the `NodeHandlerWrapperBuilder` to the
        `ProtocolsHandler`. That may also alleviate the need for a custom timeout
        on an `OutboundSubstreamRequest` as a `ProtocolsHandler` is now free to
        adjust these timeouts over time.
    
    Other changes:
    
      * A new ping example.
      * Documentation improvements.
    
    * More documentation improvements.
    
    * Add PingPolicy and ensure no event is dropped.
    
    * Remove inbound_timeout/outbound_timeout.
    
    As per review comment, the inbound timeout is now configured
    as part of the `listen_protocol` and the outbound timeout as
    part of the `OutboundSubstreamRequest`.
    
    * Simplify and generalise.
    
    Generalise `ListenProtocol` to `SubstreamProtocol`, reusing it in
    the context of `ProtocolsHandlerEvent::OutboundSubstreamRequest`.
    
    * Doc comments for SubstreamProtocol.
    
    * Adapt to changes in master.
    
    * Relax upper bound for ping integration test rtt.
    
    For "slow" CI build machines?
  4. Add NetworkBehaviour methods for listened addresses (#1061)

    tomaka committed Apr 16, 2019
  5. Update README.md (#1059)

    tomaka committed Apr 16, 2019
  6. Fix the WASM build (#1062)

    tomaka committed Apr 16, 2019
Commits on Apr 11, 2019
  1. Expand wildcard IP addresses in TCP transport. (#1044)

    twittner committed Apr 11, 2019
    Wildcard IP addresses (e.g. 0.0.0.0) are used to listen on all host
    interfaces. To report those addresses such that clients know about them
    and can actually make use of them we use the `get_if_addrs` crate and
    maintain a collection of addresses. We report the whole expansion at the
    very beginning of the listener stream with `ListenerEvent::NewAddress`
    events and add new addresses should they come to our attention.
    
    What remains to be done is to potentially allow users to filter IP
    addresses, for example the local loopback one, and to detect expired
    addresses not only if a new address is discovered.
Commits on Apr 10, 2019
  1. Rewrite the WebCrypto ECDH using wasm-bindgen (#980)

    tomaka committed Apr 10, 2019
    * Rewrite the WebCrypto ECDH
    
    * Add comment about the unsafe
  2. Patch reading/writing frame lengths in libp2p-noise. (#1050)

    romanb committed Apr 10, 2019
    * Patch reading/writing frame lengths in libp2p-noise.
    
    Extracted from #1027 since its
    fate it still undetermined.
    
    * Fix formatting.
  3. Have `Transport::Listener`s produce `ListenerEvent`s. (#1032)

    twittner committed Apr 10, 2019
    Replace the listener and address pair returned from `Transport::listen_on` with just a listener that produces `ListenerEvent` values which include upgrades as well as address changes.
Commits on Apr 8, 2019
  1. Change `Multiaddr` representation to `Bytes`. (#1041)

    twittner committed Apr 8, 2019
    * Change `Multiaddr` representation to `Bytes`.
    
    * Mark several `Multiaddr` methods as deprecated.
Commits on Apr 7, 2019
  1. Add ExpandedSwarm (#1046)

    tomaka committed Apr 7, 2019
Commits on Apr 5, 2019
  1. Generalize TPeerId into TConnInfo (#1045)

    tomaka committed Apr 5, 2019
    * Generalize TPeerId into TConnInfo
    
    * Final fixes
Commits on Apr 4, 2019
  1. Add getters to RawSwarm (#1037)

    tomaka committed Apr 4, 2019
  2. Allow oneshot handler's inactivity_timeout to be configurable (#1039)

    AgeManning authored and tomaka committed Apr 4, 2019
  3. Remove `ProtocolsHandlerUpgrErr::MuxerDeniedSubstream`. (#1043)

    twittner committed Apr 4, 2019
    Closes #1042.
  4. Split the Swarm from the NetworkBehaviour (#1035)

    tomaka committed Apr 4, 2019
Commits on Apr 3, 2019
  1. Add missing zeroize() call for secp256k1::SecretKey::from_bytes. (#1040)

    romanb committed Apr 3, 2019
    * Add missing zeroize() call for secp256k1.
    
    * Add a test.
Commits on Mar 29, 2019
  1. Also publish multistream-select 0.4 (#1034)

    tomaka committed Mar 29, 2019
  2. Publish v0.6.0 (#1031)

    tomaka committed Mar 29, 2019
  3. Add a Toggle NetworkBehaviour (#1024)

    tomaka committed Mar 29, 2019
Commits on Mar 28, 2019
  1. Use bounded channels in transport (#987)

    mattrutherford committed Mar 28, 2019
    * Implement DialFuture
    
    * Update with recommended changes to buffer size, `expect()` and `close()`
  2. Add method to query external addresses (#1022)

    tomaka committed Mar 28, 2019
  3. Remove remnants of shutdown process (#1020)

    tomaka committed Mar 28, 2019
  4. Add lighthouse to list of projects (#1026)

    AgeManning authored and tomaka committed Mar 28, 2019
Commits on Mar 26, 2019
  1. [Kademlia] Rehash PeerId before inserting in a KBucketsTable (#1025)

    elferdo committed Mar 26, 2019
    Add KadHash as the type to be used as key within KBuckets and replace PeerId.
Older
You can’t perform that action at this time.