Skip to content
  1. Oct 06, 2022
    • Adrian Catangiu's avatar
      Add pluggable BEEFY payload constructors (#12428) · b91d2dfd
      Adrian Catangiu authored
      * primitives/beefy: move Payload to its own file
      
      * primitives/beefy: add Payload tests
      
      * primitives/beefy: add MmrRootProvider as custom BEEFY payload provider
      
      * client/beefy: use generic BEEFY 'PayloadProvider'
      
      * primitives/beefy: rename Payload::new to Payload::from_single_entry for clarity
      
      * fix visibility
      
      * fix cargo doc
      b91d2dfd
  2. Oct 05, 2022
  3. Oct 04, 2022
  4. Oct 03, 2022
    • Adrian Catangiu's avatar
      Beefy on-demand justifications as a custom RequestResponse protocol (#12124) · 2a27545a
      Adrian Catangiu authored
      
      
      * client/beefy: create communication module and move gossip there
      
      * client/beefy: move beefy_protocol_name module to communication
      
      * client/beefy: move notification module under communication
      
      * client/beefy: add incoming request_response protocol handler
      
      * client/beefy: keep track of connected peers and their progress
      
      * client/beefy: add logic for generating Justif requests
      
      * client/beefy: cancel outdated on-demand justification requests
      
      * try Andre's suggestion for JustificationEngine
      
      * justif engine add justifs validation
      
      * client/beefy: impl OnDemandJustificationsEngine async next()
      
      * move beefy proto name test
      
      * client/beefy: initialize OnDemandJustificationsEngine
      
      * client/tests: allow for custom req-resp protocols
      
      * client/beefy: on-demand-justif: implement simple peer selection strategy
      
      * client/beefy: fix voter initialization
      
      Fix corner case where voter gets a single burst of finality
      notifications just when it starts.
      
      The notification stream was consumed by "wait_for_pallet" logic,
      then main loop would subscribe to finality notifications, but by that
      time some notifications might've been lost.
      
      Fix this by subscribing the main loop to notifications before waiting
      for pallet to become available. Share the same stream with the main loop
      so that notifications for blocks before pallet available are ignored,
      while _all_ notifications after pallet available are processed.
      
      Add regression test for this.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      * client/beefy: make sure justif requests are always out for mandatory blocks
      
      * client/beefy: add test for on-demand justifications sync
      
      * client/beefy: tweak main loop event processing order
      
      * client/beefy: run on-demand-justif-handler under same async task as voter
      
      * client/beefy: add test for known-peers
      
      * client/beefy: reorg request-response module
      
      * client/beefy: add issue references for future work todos
      
      * client/beefy: consolidate on-demand-justifications engine state machine
      
      Signed-off-by: default avataracatangiu <[email protected]>
      
      * client/beefy: fix for polkadot companion
      
      * client/beefy: implement review suggestions
      
      * cargo fmt and clippy
      
      * fix merge damage
      
      * fix rust-doc
      
      * fix merge damage
      
      * fix merge damage
      
      * client/beefy: add test for justif proto name
      
      Signed-off-by: default avataracatangiu <[email protected]>
      2a27545a
  5. Sep 30, 2022
  6. Sep 27, 2022
  7. Sep 26, 2022
  8. Sep 25, 2022
  9. Sep 23, 2022
    • Davide Galassi's avatar
      Independence of Slot-based algorithms from system Timestamp (#12224) · bf97f2a7
      Davide Galassi authored
      
      
      * Remove timestamp from SlotInfo
      
      * Expose as millis instead of secs
      
      * Nits
      
      * Fix test after field removal
      
      * Yet another test fix
      
      * On the fly timestamp computation
      
      * Removed slot timestamp from logs
      
      * Removed reference to timestamp from slots subsystem
      
      * Slot based algorithm tests do not require timstamp inherent anymore
      
      * Remove junk files
      
      * Further tests cleanup
      
      * Trigger pipeline
      
      * Apply code suggestions
      
      * Trigger pipeline
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      bf97f2a7
  10. Sep 22, 2022
  11. Sep 21, 2022
  12. Sep 20, 2022
  13. Sep 16, 2022
    • Arkadiy Paronyan's avatar
      Fix warp sync (#12281) · 86b122d7
      Arkadiy Paronyan authored
      86b122d7
    • Adrian Catangiu's avatar
      client/beefy: fix voter initialization (#12274) · d9a4d835
      Adrian Catangiu authored
      
      
      Fix corner case where voter gets a single burst of finality
      notifications just when it starts.
      
      The notification stream was consumed by "wait_for_pallet" logic,
      then main loop would subscribe to finality notifications, but by that
      time some notifications might've been lost.
      
      Fix this by subscribing the main loop to notifications before waiting
      for pallet to become available. Share the same stream with the main loop
      so that notifications for blocks before pallet available are ignored,
      while _all_ notifications after pallet available are processed.
      
      Add regression test for this.
      
      Signed-off-by: default avataracatangiu <[email protected]>
      d9a4d835
  14. Sep 15, 2022
  15. Sep 14, 2022
  16. Sep 13, 2022
  17. Sep 12, 2022
  18. Sep 08, 2022
  19. Sep 05, 2022
    • Davide Galassi's avatar
      Fetch Babe configuration from runtime state (#11760) · 83aec6f9
      Davide Galassi authored
      * Fetch babe config data from runtime state
      
      * Some renaming
      
      * More renaming
      
      * Final nits
      
      * Fix tests and benches
      
      * Rename  to  in BabeConfiguration
      
      * Remove duplicate babe parameter description
      
      Already specified over the 'PRIMARY_PROBABILITY' constant value
      
      * trigger pipeline
      
      * trigger pipeline
      83aec6f9
    • Nazar Mokrynskyi's avatar
      Enforce blocks response limit (#12146) · efa04ed7
      Nazar Mokrynskyi authored
      efa04ed7
    • Adrian Catangiu's avatar
      beefy: initialize voter from genesis and fix initial sync (#11959) · 84acfd5f
      Adrian Catangiu authored
      
      
      * client/beefy: use backend instead of client where possible
      
      * client/beefy: initialize voter from genesis
      
      Now that we have justifications import, we can drop the "lean beefy"
      behaviour and start building justifications chain from Genesis with
      containing all past sessions' mandatory blocks justifications.
      
      * client/beefy: walk finality tree_route to catch session changes
      
      * client/beefy: fix block import
      
      During initial block import blocks are not finalized, so trying to
      validate and append justifications within block import fails (for
      initial network sync imported blocks).
      
      Changes:
      
      - Move justification validation to _after_ `inner.block_import()`,
        so block is imported in backend and runtime api can be called to
        get the BEEFY authorities for said block.
      - Move append-to-backend for imported BEEFY justification to voter,
        because it already has the required logic to BEEFY-finalize blocks
        only after GRANDPA finalized them.
      - Mark voting rounds as concluded when finalizing through
        imported justifications as well as when finalizing through voting.
      
      * client/beefy: valid justifications are one per block number
      
      The only way we'd get _different_ _validated_ justifications for same
      block number is if authorities are double voting, which will be handled
      later.
      
      * client/beefy: process incoming justifs during major sync
      
      * client/beefy: correct voter initialization
      
      BEEFY voter should resume voting from either:
        - last BEEFY finalized block,
        - session start,
      whichever is closest to head.
      
      * client/beefy: test voter initialization
      
      * client/beefy: impl review suggestions
      
      Signed-off-by: default avataracatangiu <[email protected]>
      84acfd5f
  20. Sep 03, 2022
    • Dmitry Markin's avatar
      Use custom type for ProtocolName (#12172) · 24d09fe8
      Dmitry Markin authored
      * Add ProtocolName custom type
      
      * Use new ProtocolName in sc_network_common
      
      * Use new ProtocolName in sc_network
      
      * Use new ProtocolName for BEEFY and GRANDPA
      
      * Use new ProtocolName for notifications
      
      * Use new ProtocolName in sc_network (part 2)
      
      * Use new ProtocolName in sc_network_gossip
      
      * Use new ProtocolName in sc_offchain
      
      * Remove unused imports
      
      * Some more fixes
      
      * Add tests
      
      * Fix minor import issues
      
      * Re-export ProtocolName in sc_network
      
      * Revert "Re-export ProtocolName in sc_network"
      
      This reverts commit 8d8ff71927e7750757f29c9bbd88dc0ba181d214.
      
      * Re-export ProtocolName in sc_network
      
      * Remove dependency on sc-network-common from beefy-gadget
      24d09fe8
  21. Sep 02, 2022
    • Bastian Köcher's avatar
      Do not drop the `task_manager` for benchmarking stuff (#12147) · 90714449
      Bastian Köcher authored
      We can not drop the `task_manager` for benchmarking stuff, because otherwise stuff that may needs
      this feature (like background signature verification) will fail. Besides the base path setup is
      moved to `SharedParams` directly. Meaning any call to `base_path` will now directly return a tmp
      path when `--dev` is given.
      90714449