1. Mar 24, 2020
  2. Mar 23, 2020
    • Bastian Köcher's avatar
      Show an error when we connect to a bootnode with a different peer id (#5365) · b9ea236f
      Bastian Köcher authored
      Currently when we connect to a bootnode and it returns a different peer
      id, than the one we provided, we disconnect silently. This pr changes
      the behavior to printing an error when a bootnode returns a different
      peer id than the provided one.
      b9ea236f
    • Wei Tang's avatar
      Simplify BABE pre-digest definitions (#5289) · 3b347059
      Wei Tang authored
      
      
      * Init vrf crate without type alias
      
      * Generic PreDigest definition for BABE
      
      * Fix BABE vrf interface change
      
      * Missing default-features def in sp-consensus-babe
      
      * Fix sp-consensus-babe compile
      
      * frame-babe: fix type inference
      
      * Unify type definitions of vrf output/proof and randomness
      
      * frame-babe: fix tests
      
      * Bump node impl version
      
      * Update cargo lock
      
      * Derive Copy for RawVRFOutput and RawVRFProof
      
      * Fix duplicated derive
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      3b347059
    • Pierre Krieger's avatar
      dd23d45c
    • Max Inden's avatar
      client/network-gossip/state_machine: Fix log message (#5350) · 682ff1f9
      Max Inden authored
      A gossip validator returns `ValidationResult::Discard` for messages that
      should not be processed nor kept due to not being useful for the node.
      Examples are out-of-scope messages or messages with bad signatures. The
      corresponding log message did not reflect this, thus the update through
      this patch.
      
      One caveat is a finality grandpa neighbor packet. Given that the concept
      of neighbor packets is handled in the finality grandpa gossip validator
      only, valid neighbor packets are always discarded on the
      `client/network-gossip` layer.
      682ff1f9
  3. Mar 21, 2020
  4. Mar 20, 2020
  5. Mar 19, 2020
  6. 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
  7. Mar 17, 2020
  8. Mar 16, 2020
  9. 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
  10. 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
  11. Mar 12, 2020
  12. Mar 11, 2020