1. 25 Jun, 2021 2 commits
  2. 22 Jun, 2021 6 commits
    • asynchronous rob's avatar
      SelectChain implementation for relay chains (#3341) · 6331c25e
      asynchronous rob authored
      * stubbed SelectRelayChain
      * disconnected overseer handlers
      * add is_disconnected
      * add fallback in case overseer is disconnected
      * fall back on fallback
      * fetch leaves by calling into chain-selection subsystem
      * implement best_chain
      * mostly implement finality_target
      * chain constrain
      * metrics and maximum safeguard
      * remove review comment after review
    • André Silva's avatar
      runtime: remove randomness collective flip pallet (#3347) · 869a130b
      André Silva authored
      * runtime: remove randomness collective flip pallet
      * add storage migration to remove key
      Co-Authored-By: parity-processbot <>
      Co-authored-by: Shawn Tabrizi's avatarShawn Tabrizi <shawntabrizi@gmail.com>
    • Lldenaurois's avatar
      Approval Checking: Avoid redundant checks (#3306) · 8d8d2a6e
      Lldenaurois authored
      * node/approval-voting: Introduce LruCache for pending Approval work
      This commit adds an LruCache that is intended to track the approval work
      submitted as background tasks in order to ensure that the validator needn't
      launch duplicate approval work for the same candidate across multiple blocks.
      A simple state machine is also introduced in order to differentiate pending
      and completed tasks. In addition, this LruCache will retain ValidationResults
      from the completed approval work once the task has completed. As per LruCache
      implementation, the oldest tasks will get evicted as new approval work is
      submitted to this cache.
      * node/approval-voting: Revert changes to master
      This commit reverts changes from the previous commit in order
      to simplify addressing the architecture discussion raised in the PR.
      * node/approval-voting: remove background task mpsc construct
      This diff removes the mpsc construct for background tasks in preparation
      for a move to leveraging RemoteHandles to launch approvals, rather than
      passing ApprovalRequests to a mpsc channel and handling the ApprovalRequests
      in the main subsystem task.
      * node/approval-voting: Introduce LRU Cache
      This commit introduces an LRU Cache but does not yet make use of it.
      * node/approval-voting: Remove BackgroundTasksMap and memoize currently_checking
      This commit removes the BackgroundTasksMap in the main subsystem task
      and introduces a method to keep track of RemoteHandles in such a way that
      we can ensure that a task is spawned once for a CandidateHash and
      relay parent tuple.
      * node/approval-voting: Remove BackgroundTasksMap and memoize currently_checking
      This commit removes the BackgroundTasksMap in the main subsystem task
      and introduces a map of FuturesUnordered per BlockNumber. In addition,
      a FusedFuture is generated by iterating across all FuturesUnordered for
      the BlockNumbers for which at least one candidate has approvals work
      running in the subsystem.
      * node/approval-voting: Address Rob's comments
      This diff removes the prior HashMap<BlockNumber, FuturesUnordered>
      construction and instead moves to a simple FuturesUnordered where
      all the work is await with Timeout.
      * node/approval-voting: Update Cargo.lock
      Due to a mismatch in rustc versions
      * node/approval-voting: Make use of actions when issuing_approval
      This commit fixes a small oversight in the logic of the prior commit.
      * node/approval-voting: Address Rob's feedback
      * node/approval-voting: Introduce lazy launch_approval evaluation
      * node/approval-voting: Send DistibruteApproval message on every LaunchApproval
      In addition to fixed the DistributeApproval bug, this commit also
      increases the size of the approvals cache and ensures the StaleGuard
      is removed when the advantageous approval state is reached.
      * node/approval-voting: Address final comments
      This commit removes the CandidateIndex from the ApprovalVoteRequest.
      Instead, the launch_approval function will compute the candidate_index
      from the block entry.
      In addition, a comment has been added explaining the difficulty of
      issuing approvals in the handle_actions function.
      * node/approval-voting: Set timeout to be 120s rather than 2s
      * Update Cargo.lock
    • dependabot[bot]'s avatar
      Bump paste from 1.0.4 to 1.0.5 (#3340) · bad890f8
      dependabot[bot] authored
      Bumps [paste](https://github.com/dtolnay/paste) from 1.0.4 to 1.0.5.
      - [Release notes](https://github.com/dtolnay/paste/releases)
      - [Commits](https://github.com/dtolnay/paste/compare/1.0.4...1.0.5
      - dependency-name: paste
        dependency-type: direct:production
        update-type: version-update:semver-patch
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    • dependabot[bot]'s avatar
      Bump rand_chacha from 0.3.0 to 0.3.1 (#3225) · 217a4819
      dependabot[bot] authored
      Bumps [rand_chacha](https://github.com/rust-random/rand) from 0.3.0 to 0.3.1.
      - [Release notes](https://github.com/rust-random/rand/releases)
      - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
      - [Commits](https://github.com/rust-random/rand/compare/rand_chacha-0.3.0...rand_chacha-0.3.1
      - dependency-name: rand_chacha
        dependency-type: direct:production
        update-type: version-update:semver-patch
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    • Arkadiy Paronyan's avatar
      Fast sync companion PR (#3078) · 5b3e6ad4
      Arkadiy Paronyan authored
      * Fixed build
      * Bumped trie-db
      * update Substrate
      * impl-guide: fix broken links
      Co-authored-by: parity-processbot <>
      Co-authored-by: Andronik Ordian's avatarAndronik Ordian <write@reusable.software>
  3. 21 Jun, 2021 2 commits
    • Bastian Köcher's avatar
      Remove the streamunordered crate (#3339) · 95df77e0
      Bastian Köcher authored
      The functionality is now provided by the `futures` crate.
    • asynchronous rob's avatar
      Chain Selection Subsystem Logic (#3277) · 70a4469d
      asynchronous rob authored
      * crate skeleton and type definitions
      * add ChainSelectionMessage
      * add error type
      * run loop
      * fix overseer
      * simplify determine_new_blocks API
      * write an overlay struct and fetch new blocks
      * add new function to overlay
      * more flow
      * add leaves to overlay and add a strong type around leaves-set
      * add is_parent_viable
      * implement block import, ignoring reversions
      * add stagnant-at to overlay
      * add stagnant
      * add revert consensus log
      * flow for reversions
      * extract and import block reversions
      * recursively update viability
      * remove redundant parameter from WriteBlockEntry
      * do some removal of viable leaves
      * address grumbles
      * refactor
      * address grumbles
      * add comment about non-monotonicity
      * extract backend to submodule
      * begin the hunt for viable leaves
      * viability pivots for updating the active leaves
      * remove LeafSearchFrontier
      * partially -> explicitly viable and untwist some booleans
      * extract tree to submodule
      * implement block finality update
      * Implement block approval routine
      * implement stagnant detection
      * ensure blocks pruned on finality are removed from the active leaves set
      * write down some planned test cases
      * floww
      * leaf loading
      * implement best_leaf_containing
      * write down a few more tests to do
      * remove dependence of tree on header
      * guide: ChainApiMessage::BlockWeight
      * node: BlockWeight ChainAPI
      * fix compile issue
      * note a few TODOs for the future
      * fetch block weight using new BlockWeight ChainAPI
      * implement unimplemented
      * sort leaves by block number after weight
      * remove warnings and add more TODOs
      * create test module
      * storage for test backend
      * wrap inner in mutex
      * add write waker query to test backend
      * Add OverseerSignal -> FromOverseer conversion
      * add test harnes
      * add no-op test
      * add some more test helpers
      * the first test
      * more progress on tests
      * test two subtrees
      * determine-new-blocks: cleaner genesis avoidance and tighter ancestry requests
      * don't make ancestry requests when asking for one block
      * add a couple more tests
      * add to AllMessages in guide
      * remove bad spaces from bridge
      * compact iterator
      * test import with gaps
      * more reversion tests
      * test finalization pruning subtrees
      * fixups
      * test clobbering and fix bug in overlay
      * exhaustive backend state after finalizaiton tested
      * more finality tests
      * leaf tests
      * test approval
      * test ChainSelectionMessage::Leaves thoroughly
      * remove TODO
      * avoid Ordering::is_ne so CI can build
      * comment algorithmic complexity
      * Update node/core/chain-selection/src/lib.rs
      Co-authored-by: default avatarBernhard Schuster <bernhard@ahoi.io>
      Co-authored-by: default avatarBernhard Schuster <bernhard@ahoi.io>
  4. 20 Jun, 2021 3 commits
  5. 19 Jun, 2021 4 commits
  6. 18 Jun, 2021 2 commits
  7. 17 Jun, 2021 1 commit
  8. 16 Jun, 2021 4 commits
  9. 15 Jun, 2021 1 commit
  10. 14 Jun, 2021 4 commits
  11. 13 Jun, 2021 1 commit
    • asynchronous rob's avatar
      Dispute Coordinator Subsystem (#3150) · 19c1d29d
      asynchronous rob authored
      * skeleton for dispute-coordinator
      * add coordinator and participation message types
      * begin dispute-coordinator DB
      * functions for loading
      * implement strongly-typed DB transaction
      * add some tests for DB transaction
      * core logic for pruning
      * guide: update candidate-votes key for coordinator
      * update candidate-votes key
      * use big-endian encoding for session, and implement upper bound generator
      * finish implementing pruning
      * add a test for note_current_session
      * define state of the subsystem itself
      * barebones subsystem definition
      * control flow
      * more control flow
      * implement session-updating logic
      * trace
      * control flow for message handling
      * Update node/core/dispute-coordinator/src/lib.rs
      Co-authored-by: default avatarAndré Silva <123550+andresilva@users.noreply.github.com>
      * Update node/subsystem/src/messages.rs
      Co-authored-by: default avatarAndré Silva <123550+andresilva@users.noreply.github.com>
      * some more control flow
      * guide: remove overlay
      * more control flow
      * implement some DB getters
      * make progress on importing statements
      * add SignedDisputeStatement struct
      * move ApprovalVote to shared primitives
      * add a signing-payload API to explicit dispute statements
      * add signing-payload to CompactStatement
      * add relay-parent hash to seconded/valid dispute variatns
      * correct import
      * type-safe wrapper around dispute statements
      * use checked dispute statement in message type
      * extract rolling session window cache to subsystem-util
      * extract session window tests
      * approval-voting: use rolling session info cache
      * reduce dispute window to match runtime in practice
      * add byzantine_threshold and supermajority_threshold utilities to primitives
      * integrate rolling session window
      * Add PartialOrd to CandidateHash
      * add Ord to CandidateHash
      * implement active dispute update
      * add dispute messages to AllMessages
      * add dispute stubs to overseer
      * inform dispute participation to participate
      * implement issue_local_statement
      * implement `determine_undisputed_chain`
      * fix warnings
      * test harness for dispute coordinator tests
      * add more helpers to test harness
      * add some more helpers
      * some tests for dispute coordinator
      * ignore wrong validator indices
      * test finality voting rule constraint
      * add more tests
      * add variants to network bridge
      * fix test compilation
      * remove most dispute coordinator functionality
      as of #3222 we can do most of the work within the approval voting subsystem
      * Revert "remove most dispute coordinator functionality"
      This reverts commit 9cd615e8
      * Use thiserror
      Co-authored-by: default avatarBernhard Schuster <bernhard@ahoi.io>
      * Update node/core/dispute-coordinator/src/lib.rs
      Co-authored-by: default avatarBernhard Schuster <bernhard@ahoi.io>
      * extract tests to separate module
      * address nit
      * adjust run_iteration API
      Co-authored-by: default avatarAndré Silva <123550+andresilva@users.noreply.github.com>
      Co-authored-by: default avatarBernhard Schuster <bernhard@ahoi.io>
  12. 12 Jun, 2021 2 commits
  13. 11 Jun, 2021 4 commits
  14. 10 Jun, 2021 1 commit
  15. 09 Jun, 2021 3 commits