1. 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
  2. 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
  3. Mar 12, 2020
  4. Mar 11, 2020
  5. Mar 10, 2020
  6. 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
  7. Mar 06, 2020
  8. Mar 05, 2020
  9. Mar 04, 2020