1. Mar 20, 2020
  2. Mar 19, 2020
  3. Mar 18, 2020
    • Max Inden's avatar
      client/network-gossip/src/bridge: Finish when network event stream closes (#5282) · 48701053
      Max Inden authored
      * client/network-gossip/src/bridge: Finish when network even stream closes
      
      Previously within `<GossipEngine as Future>::poll` one would poll the
      `network_event_stream` ignoring all messages other than
      `Poll::Ready(Some())`. Ignoring `Poll::Ready(None)` leads to a panic on
      the next poll of the stream, gien that it is not fused.
      
      By design `network_event_stream` does not close unless an unbounded send
      into it fails, or the `NetworkWorker` gets shut down.
      
      > The stream never ends (unless the `NetworkWorker` gets shut down).
      > (client/network/src/service.rs)
      
      An `unbounded_send` to fail on an unbounded channel is unlikely. The
      `NetworkWorker` shutting down is not unlikely. In such case the
      `GossipEngine` should shut down as well.
      
      With this patch a `<GossipEngine as Future>` finishes on
      `Poll::Ready(None)` returned from `network_event_stream`.
      
      * client/finality-grandpa/communication: Error on gossip engine finished
      
      Have `<NetworkBridge as Future>::poll` return `Poll::Ready(Err)` instead
      of `Poll::Ready(Ok)` to be consistent with the handling of the neighbor
      packet worker stream and the gossip validator report stream. Both `Err`
      as well as `Ok` shut down the `NetworkBridge` as well as the
      `VoterWorker`.
      
      * client/network-gossip/src/bridge: Add regression test
      
      * client/network-gossip: Move substrate test client to dev dependencies
      
      * client/network-gossip: Remove TODO
      
      Addressed in a follow up pull request.
      
      * client/network-gossip/bridge: Put match on newline after loop
      
      * client/finality-grandpa/src/observer: Fix regression test
      
      Make sure the event stream sender side is not dropped till the end.
      48701053
    • Benjamin Kampmann's avatar
      alpha.4 release fixes (#5303) · 9fa8589d
      Benjamin Kampmann authored
      * Adding missing metadata for benchmark-pallet
      
      * Missed to bump a few
      
      * release on roling tag
      
      * Wasm executors were missed
      ci-release
      9fa8589d
    • Benjamin Kampmann's avatar
      Releasing 2.0.0-alpha.4 (#5279) · 6a38fdc0
      Benjamin Kampmann authored
      
      
      * Version bump
      
      * Split generate_changelog.sh into separate script
      
      Can be run in the format `generate_changelog.sh $previous_version $version`.
      
      * remove early exit from publish_draft_release.sh
      
      * adding changelog
      
      * ci: change last_github_release to also find pre-releases
      
      Co-authored-by: default avatarMartin Pugh <[email protected]>
      v2.0.0-alpha.4
      6a38fdc0
    • Toralf Wittner's avatar
      sc-network: Return on Poll::Pending. (#5295) · c6f1ba9e
      Toralf Wittner authored
      If polling encounters a `Poll::Pending` we need to return it instead of
      continuing the loop which may turn it into a blocking operation, causing
      problems with executors.
      c6f1ba9e
  4. Mar 17, 2020
  5. Mar 16, 2020
  6. Mar 15, 2020
    • Bastian Köcher's avatar
      Move runtime upgrade to `frame-executive` (#5197) · 064ca16f
      Bastian Köcher authored
      * Move runtime upgrade to `frame-executive`
      
      Instead of storing the runtime upgraded in the space of `frame-system`,
      this moves it to `frame-executive`. We also start storing the
      `spec_version` and `impl_version` the last runtime upgrade was applied.
      
      This scheme has multiple advantages:
      - We don't need to make sure that runtime upgrade was set.
      - This will work in the future when we want to test a runtime upgrade,
      because the `on_runtime_upgrade` will be executed automatically when the
      runtime changes.
      
      * Move `LAST_RUNTIME_UPGRADE` key to `frame-executive`
      
      * Add some more documentation
      
      * Make sure `spec_version` always increases between runtime upgrades
      
      * Fix test
      
      * Upgrade `parity-multiaddr` to fix compilation
      
      * Also check if the `spec_name` changed
      
      * Remove `RuntimeUpgraded` storage entry
      
      * Don't run on genesis
      064ca16f
    • Shawn Tabrizi's avatar
      Fix genesis bug in bench db (#5253) · 2c0fdb50
      Shawn Tabrizi authored
      2c0fdb50
  7. Mar 14, 2020
    • Max Inden's avatar
      client/finality-grandpa: Add Prometheus metrics to GossipValidator (#5237) · dd194a4c
      Max Inden authored
      * client/finality-grandpa: Add Prometheus metrics to GossipValidator
      
      Instrument finality grandpa `GossipValidator` exposing count of messages
      validated by message type and message action.
      
      ```
      \# HELP substrate_finality_grandpa_communication_gossip_validator_messages Number of messages validated by the finality grandpa gossip validator.
      \# TYPE substrate_finality_grandpa_communication_gossip_validator_messages counter
      substrate_finality_grandpa_communication_gossip_validator_messages{action="discard",message="neighbor"} 39
      substrate_finality_grandpa_communication_gossip_validator_messages{action="keep",message="vote"} 28
      ```
      
      * client/finality-grandpa: Add None as Prometheus registry in tests
      
      * client/finality-granpda/src/communication: Refactor metric registration
      dd194a4c
    • Kian Paimani's avatar
      4da1756b
  8. Mar 12, 2020
  9. Mar 11, 2020
  10. Mar 10, 2020
  11. Mar 09, 2020
    • André Silva's avatar
      grandpa: improve handling of global gossip messages (#5133) · 971cdc3e
      André Silva authored
      * grandpa: only gossip commits to peers on the same set
      
      * grandpa: track commits uniquely by round and set
      
      * grandpa: fix communication test
      
      * grandpa: add tests for commit gossip handling
      
      * grandpa: add missing docs
      971cdc3e
    • Max Inden's avatar
      client/network-gossip: Merge GossipEngine and GossipEngineInner (#5042) · 78cdd3bf
      Max Inden authored
      * client/network-gossip: Merge GossipEngine and GossipEngineInner
      
      Given that GossipEngine and GossipEngineInner are not shared between
      threads anyone (public interface + background tasks), neither depends on
      being Send or Sync. Thus one can merge the two as done in this patch.
      One only needs to wrap an `Arc<Mutex<>>` around the whole structure when
      the owner (e.g. finality-grandpa) needs to share the gossip engine
      between threads.
      
      * client/finality-grandpa: Wrap GossipEngine in Arc Mutex & lock it on use
      
      GossipEngine in itself has no need to be Send and Sync, given that it
      does not rely on separately spawned background tasks anymore. Given that
      finality-grandpa shares the `NetworkBridge` potentially between threads
      its components need to be clonable, thus this patch wraps `GossipEngine`
      in an `Arc<Mutex<>>`.
      78cdd3bf
  12. Mar 06, 2020