1. Jan 23, 2020
    • Max Inden's avatar
      client/finality-grandpa: Make round_communication use bounded channel (#4691) · 597c0a6c
      Max Inden authored and asynchronous rob's avatar asynchronous rob committed
      * clinet/finality-grandpa: Make round_communication use bounded channel
      
      `round_communication` returns a `Sink` and a `Stream` for outgoing and
      incoming messages. The messages send into the `Sink` are forwarded down
      to the network as well as send back into the `Stream` to ensure the node
      processes its own messages.
      
      So far, to send messages into the `Sink` back into the `Stream`, an
      unbounded channel was used. This patch updates `round_communication` and
      `OutgoingMessages` to use a bounded channel.
      
      This is part of a greater effort to reduce the number of owners of
      components within `finality-grandpa` and `network` as well as to reduce
      the amount of unbounded channels. For details see d9837d7d and
      5f80929d.
      
      * client/finality-grandpa: Import futures03::future::ready at the top
      
      * client/finality-grandpa: Make tests use compat of future 03
      
      * client/finality-grandpa: Do not import ready into scope
      
      Instead of importing futures03::future::ready into the scope, only
      import futures::future03 into scope and call ready as furure03::ready.
      597c0a6c
    • Wei Tang's avatar
      Default fork choice value and intermediates for block import parameters (#4652) · 4b2e6a5b
      Wei Tang authored
      
      
      * consensus, pow: intermediate separation and fail
      
      * Fix compiles
      
      * Update primitives/consensus/common/src/block_import.rs
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * Update primitives/consensus/common/src/block_import.rs
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * Document what None means for `fork_choice` in block import params
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      4b2e6a5b
  2. Jan 22, 2020
  3. Jan 21, 2020
  4. Jan 20, 2020
  5. Jan 19, 2020
  6. Jan 18, 2020
  7. Jan 17, 2020
    • Shawn Tabrizi's avatar
      Society: Ensure all votes are removed after tally (#4666) · bd0e72ff
      Shawn Tabrizi authored
      * Ensure all votes are removed after tally
      
      * Fix comment
      bd0e72ff
    • Max Inden's avatar
      client/finality-grandpa: Reintegrate gossip validator report stream (#4661) · 5f80929d
      Max Inden authored
      * client/finality-grandpa: Reintegrate gossip validator report stream
      
      The `finality-grandpa` `GossipValidator` is called by the `GossipEngine`
      in a synchronous fashion on each gossip message. Its main task is to
      decide whether to gossip the given message on, or whether to drop it.
      
      In addition it also updates the reputation of a node's peers based on
      the incoming gossip messages. To do so it needs to be able to report the
      reputation change which it does through an unbounded channel (in order
      to stay synchronous).
      
      Previously the receiving side of this channel would be handled by a new
      task, polling the channel and forwarding the changes to a clone of the
      `GossipEngine` that it would own.
      
      Instead the receiver of the above mentioned channel is now being polled
      by the `NetworkBridge` within its `Future::poll` implementation.
      Reputation changes are reported through the already existing
      `GossipEngine` instance within `NetworkBridge`.
      
      For details on the overall goal, see d9837d7d.
      
      * client/finality-grandpa: Remove exit future from test NetworkBridges
      5f80929d
    • Sergey Pepyakin's avatar
      Drive by fix of doc of `Value`. (#4658) · 8c789806
      Sergey Pepyakin authored
      
      
      * Drive by fix of doc of `Value`.
      
      * Apply suggestions from code review
      
      Co-Authored-By: default avatarAndré Silva <[email protected]>
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarAndré Silva <[email protected]>
      8c789806
    • Fedor Sakharov's avatar
      Expose proof generation and verifying api. (#4646) · ad60af5f
      Fedor Sakharov authored
      * Expose proof generation and verifying api.
      
      * tabs to spaces
      
      * bring back license comment
      
      * Revert "tabs to spaces"
      
      This reverts commit 4c3f72f9ef76b6a9f8988ed15b1bab17a9e51d2f.
      
      * Formatting and docs nits
      
      * Bump deps versions
      
      * Upadte Cargo.lock
      
      * into -> in
      ad60af5f
    • Shawn Tabrizi's avatar
      Patch practical usability issues with Society (#4651) · d5ecec37
      Shawn Tabrizi authored
      * Add `max_members` to `found`, add society genesis for Substrate node
      
      * Update test
      
      * Use `Option<bool>` rather than `Option<()>`
      
      * Update from feedback
      d5ecec37
    • Nikolay Volf's avatar
      add missing bits (#4660) · ba1d446b
      Nikolay Volf authored
      ba1d446b
    • André Silva's avatar
    • Max Inden's avatar
      client/finality-grandpa: Reintegrate periodic neighbor packet worker (#4631) · d9837d7d
      Max Inden authored
      The `NeighborPacketWorker` within `client/finality-grandpa` does two
      things:
      
      1. It receives neighbor packets from components within
      `client/finality-grandpa`, sends them down to the `GossipEngine` in
      order for neighboring nodes to receive.
      
      2. It periodically sends out the most recent neighbor packet to the
      `GossipEngine`.
      
      In order to send out packets it had a clone to a `GossipEgine` within
      an atomic reference counter and a mutex. The `NeighborPacketWorker` was
      then spawned onto its own asynchronous task.
      
      Instead of running in its own task, this patch reintegrates the
      `NeighborPacketWorker` into the main `client/finality-grandpa` task not
      requiring the `NeighborPacketWorker` to own a clone of the
      `GossipEngine`.
      
      The greater picture
      
      This is a tiny change within a greater refactoring. The overall goal is
      to **simplify** how finality-grandpa interacts with the network and to
      **reduce** the amount of **unbounded channels** within the logic.
      
      Why no unbounded channels: Bounding channels is needed for backpressure
      and proper scheduling. With unbounded channels there is no way of
      telling the producer side to slow down for the consumer side to catch
      up.  Rephrased, there is no way for the scheduler to know when to favour
      the consumer task over the producer task on a crowded channel and the
      other way round for an empty channel.
      
      Reducing the amount of shared ownership simplifies the logic and enables
      one to use async-await syntax-suggar, given that one does not need to
      hold a lock across poll invocations. Using async-await enables one to
      use bounded channels without complex logic.
      d9837d7d
    • Wei Tang's avatar
      59140c59
    • Nikolay Volf's avatar
      add debug logs (#4657) · 26a53ac0
      Nikolay Volf authored
      26a53ac0
    • Stanislav Tkach's avatar
      Add typedefs for storage types (#4654) · 482ca522
      Stanislav Tkach authored
      * Add typedefs for storage types
      
      * Fix after merge
      482ca522