Skip to content
  1. Nov 29, 2021
  2. Nov 19, 2021
    • Robert Klotzner's avatar
      Dispute spam protection (#4134) · 25974f20
      Robert Klotzner authored
      
      
      * Mostly notes.
      
      * Better error messages.
      
      * Introduce Fatal/NonFatal + drop back channel participation
      
      - Fatal/NonFatal - in order to make it easier to use utility functions.
      - We drop the back channel in dispute participation as it won't be
      needed any more.
      
      * Better error messages.
      
      * Utility function for receiving `CandidateEvent`s.
      
      * Ordering module typechecks.
      
      * cargo fmt
      
      * Prepare spam slots module.
      
      * Implement SpamSlots mechanism.
      
      * Implement queues.
      
      * cargo fmt
      
      * Participation.
      
      * Participation taking shape.
      
      * Finish participation.
      
      * cargo fmt
      
      * Cleanup.
      
      * WIP: Cleanup + Integration.
      
      * Make `RollingSessionWindow` initialized by default.
      
      * Make approval voting typecheck.
      
      * Get rid of lazy_static & fix approval voting tests
      
      * Move `SessionWindowSize` to node primitives.
      
      * Implement dispute coordinator initialization.
      
      * cargo fmt
      
      * Make queues return error instead of boolean.
      
      * Initialized: WIP
      
      * Introduce chain api for getting finalized block.
      
      * Fix ordering to only prune candidates on finalized events.
      
      * Pruning of old sessions in spam slots.
      
      * New import logic.
      
      * Make everything typecheck.
      
      * Fix warnings.
      
      * Get rid of obsolete dispute-participation.
      
      * Fixes.
      
      * Add back accidentelly deleted Cargo.lock
      
      * Deliver disputes in an ordered fashion.
      
      * Add module docs for errors
      
      * Use type synonym.
      
      * hidden docs.
      
      * Fix overseer tests.
      
      * Ordering provider taking `CandidateReceipt`.
      
      ... To be kicked on one next commit.
      
      * Fix ordering to use relay_parent
      
      as included block is not unique per candidate.
      
      * Add comment in ordering.rs.
      
      * Take care of duplicate entries in queues.
      
      * Better spam slots.
      
      * Review remarks + docs.
      
      * Fix db tests.
      
      * Participation tests.
      
      * Also scrape votes on first leaf for good measure.
      
      * Make tests typecheck.
      
      * Spelling.
      
      * Only participate in actual disputes, not on every import.
      
      * Don't account backing votes to spam slots.
      
      * Fix more tests.
      
      * Don't participate if we don't have keys.
      
      * Fix tests, typos and warnings.
      
      * Fix merge error.
      
      * Spelling fixes.
      
      * Add missing docs.
      
      * Queue tests.
      
      * More tests.
      
      * Add metrics + don't short circuit import.
      
      * Basic test for ordering provider.
      
      * Import fix.
      
      * Remove dead link.
      
      * One more dead link.
      
      Co-authored-by: default avatarLldenaurois <[email protected]>
      25974f20
  3. Nov 15, 2021
  4. Oct 27, 2021
  5. Oct 15, 2021
  6. Oct 06, 2021
  7. Oct 04, 2021
    • asynchronous rob's avatar
      Make candidate validation timeouts configurable (#4001) · 60028658
      asynchronous rob authored
      * pvf: make execution timeout configurable
      
      * guide: add timeouts to candidate validation params
      
      * add timeouts to candidate validation messages
      
      * fmt
      
      * port backing to use the backing pvf timeout
      
      * port approval-voting to use the execution timeout
      
      * port dispute participation to use the correct timeout
      
      * fmt
      
      * address grumbles & test failure
      60028658
  8. Oct 03, 2021
  9. Oct 01, 2021
  10. Sep 30, 2021
  11. Sep 29, 2021
  12. Sep 27, 2021
  13. Sep 23, 2021
  14. Sep 22, 2021
  15. Sep 15, 2021
  16. Sep 14, 2021
  17. Sep 04, 2021
  18. Sep 01, 2021
  19. Aug 30, 2021
  20. Aug 20, 2021
  21. Aug 19, 2021
  22. Aug 08, 2021
  23. Aug 06, 2021
  24. Aug 05, 2021
  25. Aug 04, 2021
    • Lldenaurois's avatar
      node/approval-voting: Continue to migrate tests to subsystem tests (#3471) · 86f14eed
      Lldenaurois authored
      * node/approval-voting: Continue to migrate tests to subsystem tests
      
      * node/approval-voting: Continue to implement subsystem tests.
      
      * Add more tests
      
      * node/approval-voting: Add more tests
      
      * node/approval-voting: Difficuly determining the proper test scenario for threshold tests
      
      * node/approval-voting: Introduce should_trigger_assignment tests
      
      * node/approval-voting: Finalize threshold tests
      
      * node/approval-voting: Address Feedback and add comments
      
      * node/approval-voting: Tidy up approval tests
      
      * Tidy up tests
      
      * Fix rustfmt
      86f14eed
  26. Aug 02, 2021
  27. Jul 26, 2021
    • Bernhard Schuster's avatar
      integrate dispute finality (#3484) · 6519ba98
      Bernhard Schuster authored
      
      
      * finality_target adjustments
      
      * fn finality_target
      
      * partially address review comments
      
      * fixins
      
      * more rustic if condition
      
      * fix tests
      
      * fixins
      
      * Update node/core/approval-voting/src/lib.rs
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * Update node/core/approval-voting/src/lib.rs
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      
      * review comments part one
      
      * rename candidates -> block_descriptions
      
      * testing outline (incomplete, WIP)
      
      * test foo
      
      * split RelayChainSelection into RelayChainSelection{,WithFallback}, introduce HeaderProvider{,Provider}
      
      * make some stuff public (revert this soon™)
      
      * some test improvements
      
      * slips of pens
      
      * test fixins
      
      * add another trait abstraction
      
      * pending edge case tests + warnings fixes
      
      * more test cases
      
      * fin
      
      * chore fmt
      
      * fix cargo.lock
      
      * Undo obsolete changes
      
      * // comments
      
      * make mod pub(crate)
      
      * fix
      
      * minimize static bounds
      
      * resolve number() as before
      
      * fmt
      
      * post merge fix
      
      * address some nits
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      6519ba98
  28. Jul 14, 2021
    • Denis_P's avatar
      WIP: CI: add spellcheck (#3421) · fc253e6e
      Denis_P authored
      
      
      * CI: add spellcheck
      
      * revert me
      
      * CI: explicit command for spellchecker
      
      * spellcheck: edit misspells
      
      * CI: run spellcheck on diff
      
      * spellcheck: edits
      
      * spellcheck: edit misspells
      
      * spellcheck: add rules
      
      * spellcheck: mv configs
      
      * spellcheck: more edits
      
      * spellcheck: chore
      
      * spellcheck: one more thing
      
      * spellcheck: and another one
      
      * spellcheck: seems like it doesn't get to an end
      
      * spellcheck: new words after rebase
      
      * spellcheck: new words appearing out of nowhere
      
      * chore
      
      * review edits
      
      * more review edits
      
      * more edits
      
      * wonky behavior
      
      * wonky behavior 2
      
      * wonky behavior 3
      
      * change git behavior
      
      * spellcheck: another bunch of new edits
      
      * spellcheck: new words are koming out of nowhere
      
      * CI: finding the master
      
      * CI: fetching master implicitly
      
      * CI: undebug
      
      * new errors
      
      * a bunch of new edits
      
      * and some more
      
      * Update node/core/approval-voting/src/approval_db/v1/mod.rs
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * Update xcm/xcm-executor/src/assets.rs
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * Suggestions from the code review
      
      * CI: scan only changed files
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      fc253e6e
  29. Jul 09, 2021
    • asynchronous rob's avatar
      Wire up candidate backing, approval-voting to disputes (#3348) · e5122227
      asynchronous rob authored
      * add a from_backing_statement to SignedDisputeStatement
      
      * inform dispute coordinator of all backing statements
      
      * add dispute coordinator message to backing tests
      
      * send positive dispute statement with every approval
      
      * issue disputes when encountering invalid candidates.
      
      * try to fix flaky test for CI (passed locally)
      
      * guide: keep track of concluded-positive disputes until pruned
      
      * guide: block implications
      
      * guide: new dispute inherent flow
      
      * mostly implement recency changes for dispute coordinator
      
      * add a clock to dispute coordinator
      
      * adjust DB tests
      
      * fix and add new dispute coordinator tests
      
      * provisioner: select disputes
      
      * import all validators' approvals
      
      * address nit: refactor backing statement submission
      
      * gracefully handle disconnected dispute coordinator
      
      * remove `review` comment
      
      * fix up old_tests
      
      * fix approval-voting compilation
      
      * fix backing compilation
      
      * use known-leaves in WaitForActivation
      
      * follow-up test fixing
      
      * add back allow(dead_code)
      e5122227
    • Bernhard Schuster's avatar
      thiserror annotations + spelling (#3452) · d76560fe
      Bernhard Schuster authored
      * remove duplicate thiserror annotations
      
      * chore: cargo spellcheck
      d76560fe
  30. Jul 08, 2021
    • Bernhard Schuster's avatar
    • Lldenaurois's avatar
      Approval voting full subsystem tests (#3391) · 2510bfc5
      Lldenaurois authored
      * node/approval-voting: Introduce Backend trait and Overlaybackend
      
      This commit introduces a Backend trait and attempts to move away
      from the Action model via an OverlayBackend as in the ChainSelection
      subsystem.
      
      * node/approval-voting: Add WriteOps for StoredBlockRange and BlocksAtHeight
      
      * node/approval-voting: Add load_all_blocks to overlay
      
      * node/approval-voting: Get all module tests to pass.
      
      This commit modifies all tests to ensure tests are passing.
      
      * node/approval-voting: Address oversights in the previous commit
      
      This commit addresses some oversights in the prior commit.
      
      1. Inner errors in backend.write were swallowed
      2. One-off write functions removed to avoid useless abstraction
      3. Touch-ups in general
      
      * node/approval-voting: Move from TestDB to dyn KeyValueDB
      
      This commit removes the TestDB from tests.rs and replaces it with
      an in-memory kvdb.
      
      * node/approval-voting: Address feedback
      
      * node/approval-voting: Add license to ops.rs
      
      * node/approval-voting: Address second-pass feedback
      
      * Add TODO
      
      * node/approval-voting: Bump spec_version
      
      * node/approval-voting: Address final comments.
      
      * node/approval-voting: Introduce framework for full subsystem tests
      
      * node/approval-voting: Introduce basic tests to attempt to provide
      coverage via full subsystem tests
      
      * node/approval-voting: Introduce Chainbuilder
      2510bfc5
    • Lldenaurois's avatar
      Approval voting overlay db (#3366) · 7313e485
      Lldenaurois authored
      * node/approval-voting: Introduce Backend trait and Overlaybackend
      
      This commit introduces a Backend trait and attempts to move away
      from the Action model via an OverlayBackend as in the ChainSelection
      subsystem.
      
      * node/approval-voting: Add WriteOps for StoredBlockRange and BlocksAtHeight
      
      * node/approval-voting: Add load_all_blocks to overlay
      
      * node/approval-voting: Get all module tests to pass.
      
      This commit modifies all tests to ensure tests are passing.
      
      * node/approval-voting: Address oversights in the previous commit
      
      This commit addresses some oversights in the prior commit.
      
      1. Inner errors in backend.write were swallowed
      2. One-off write functions removed to avoid useless abstraction
      3. Touch-ups in general
      
      * node/approval-voting: Move from TestDB to dyn KeyValueDB
      
      This commit removes the TestDB from tests.rs and replaces it with
      an in-memory kvdb.
      
      * node/approval-voting: Address feedback
      
      * node/approval-voting: Add license to ops.rs
      
      * node/approval-voting: Address second-pass feedback
      
      * Add TODO
      
      * node/approval-voting: Bump spec_version
      
      * node/approval-voting: Address final comments.
      7313e485
  31. Jul 06, 2021
    • asynchronous rob's avatar
      Chain Selection: Follow-ups (#3328) · f69c1751
      asynchronous rob authored
      
      
      * DB skeleton
      
      * key formats
      
      * lexicographic test
      
      * custom types for DB
      
      * implement backend for db-v1
      
      * remove VoidBackend and integrate with real DbBackend
      
      * detect stagnant blocks on in interval
      
      * fix tests
      
      * add tests for stagnant
      
      * send ChainSelectionMessage::Approved
      
      * tests for DB backend
      
      * unused import
      
      * upgrade kvdb-memorydb
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      f69c1751
  32. Jul 05, 2021
  33. Jun 22, 2021
    • Lldenaurois's avatar
      Approval Checking: Avoid redundant checks (#3306) · 777499dc
      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
      777499dc