Skip to content
  1. Feb 11, 2021
    • asynchronous rob's avatar
      Implement Approval Voting Subsystem (#2112) · e48c6875
      asynchronous rob authored
      
      
      * skeleton
      
      * skeleton aux-schema module
      
      * start approval types
      
      * start aux schema with aux store
      
      * doc
      
      * finish basic types
      
      * start approval types
      
      * doc
      
      * finish basic types
      
      * write out schema types
      
      * add debug and codec impls to approval types
      
      * add debug and codec impls to approval types
      
      also add some key computation
      
      * add debug and codec impls to approval types
      
      * getters for block and candidate entries
      
      * grumbles
      
      * remove unused AssignmentId
      
      * load_decode utility
      
      * implement DB clearing
      
      * function for adding new block entry to aux store
      
      * start `canonicalize` implementation
      
      * more skeleton
      
      * finish implementing canonicalize
      
      * tag TODO
      
      * implement a test AuxStore
      
      * add allow(unused)
      
      * basic loading and deleting test
      
      * block_entry test function
      
      * add a test for `add_block_entry`
      
      * ensure range is exclusive at end
      
      * test clear()
      
      * test that add_block sets children
      
      * add a test for canonicalize
      
      * extract Pre-digest from header
      
      * utilities for extracting RelayVRFStory from the header-chain
      
      * add approval voting message types
      
      * approval distribution message type
      
      * subsystem skeleton
      
      * state struct
      
      * add futures-timer
      
      * prepare service for babe slot duration
      
      * more skeleton
      
      * better integrate AuxStore
      
      * RelayVRF -> RelayVRFStory
      
      * canonicalize
      
      * implement some tick functionality
      
      * guide: tweaks
      
      * check_approval
      
      * more tweaks and helpers
      
      * guide: add core index to candidate event
      
      * primitives: add core index to candidate event
      
      * runtime: add core index to candidate events
      
      * head handling (session window)
      
      * implement `determine_new_blocks`
      
      * add TODO
      
      * change error type on functions
      
      * compute RelayVRFModulo assignments
      
      * compute RelayVRFDelay assignments
      
      * fix delay tranche calc
      
      * assignment checking
      
      * pluralize
      
      * some dummy code for fetching assignments
      
      * guide: add babe epoch runtime API
      
      * implement a current_epoch() runtime API
      
      * compute assignments
      
      * candidate events get backing group
      
      * import blocks and assignments into DB
      
      * push block approval meta
      
      * add message types, no overseer integration yet
      
      * notify approval distribution of new blocks
      
      * refactor import into separate functions
      
      * impl tranches_to_approve
      
      * guide: improve function signatures
      
      * guide: remove Tick from ApprovalEntry
      
      * trigger and broadcast assignment
      
      * most of approval launching
      
      * remove byteorder crate
      
      * load blocks back to finality, except on startup
      
      * check unchecked assignments
      
      * add claimed core to approval voting message
      
      * fix checks
      
      * assign only to backing group
      
      * remove import_checked_assignment from guide
      
      * newline
      
      * import assignments
      
      * abstract out a bit
      
      * check and import approvals
      
      * check full approvals from assignment import too
      
      * comment
      
      * create a Transaction utility
      
      * must_use
      
      * use transaction in `check_full_approvals`
      
      * wire up wakeups
      
      * add Ord to CandidateHash
      
      * wakeup refactoring
      
      * return candidate info from add_block_entry
      
      * schedule wakeups
      
      * background task: do candidate validation
      
      * forward candidate validation requests
      
      * issue approval votes when requested
      
      * clean up a couple TODOs
      
      * fix up session caching
      
      * clean up last unimplemented!() items
      
      * fix remaining warnings
      
      * remove TODO
      
      * implement handle_approved_ancestor
      
      * update Cargo.lock
      
      * fix runtime API tests
      
      * guide: cleanup assignment checking
      
      * use claimed candidate index instead of core
      
      * extract time to a trait
      
      * tests module
      
      * write a mock clock for testing
      
      * allow swapping out the clock
      
      * make abstract over assignment criteria
      
      * add some skeleton tests and simplify params
      
      * fix backing group check
      
      * do backing group check inside check_assignment_cert
      
      * write some empty test functions to implement
      
      * add a test for non-backing
      
      * test that produced checks pass
      
      * some empty test ideas
      
      * runtime/inclusion: remove outdated TODO
      
      * fix compilation
      
      * av-store: fix tests
      
      * dummy cert
      
      * criteria tests
      
      * move `TestStore` to main tests file
      
      * fix unused warning
      
      * test harness beginnings
      
      * resolve slots renaming fallout
      
      * more compilation fixes
      
      * wip: extract pure data into a separate module
      
      * wip: extract pure data into a separate module
      
      * move types completely to v1
      
      * add persisted_entries
      
      * add conversion trait impls
      
      * clean up some warnings
      
      * extract import logic to own module
      
      * schedule wakeups
      
      * experiment with Actions
      
      * uncomment approval-checking
      
      * separate module for approval checking utilities
      
      * port more code to use actions
      
      * get approval pipeline using actions
      
      * all logic is uncommented
      
      * main loop processes actions
      
      * all loop logic uncommented
      
      * separate function for handling actions
      
      * remove last unimplemented item
      
      * clean up warnings
      
      * State gives read-only access to underlying DB
      
      * tests for approval checking
      
      * tests for approval criteria
      
      * skeleton test module for import
      
      * list of import tests to do
      
      * some test glue code
      
      * test reject bad assignment
      
      * test slot too far in future
      
      * test reject assignment with unknown candidate
      
      * remove loads_blocks tests
      
      * determine_new_blocks back to finalized & harness
      
      * more coverage for determining new blocks
      
      * make `imported_block_info` have less reliance on State
      
      * candidate_info tests
      
      * tests for session caching
      
      * remove println
      
      * extricate DB and main TestStores
      
      * rewrite approval checking logic to counteract early delays
      
      * move state out of function
      
      * update approval-checking tests
      
      * tweak wakeups & scheduling logic
      
      * rename check_full_approvals
      
      * test that assignment import updates candidate
      
      * some approval import tests
      
      * some tests for check_and_apply_approval
      
      * add 'full' qualifier to avoid confusion
      
      * extract should-trigger logic to separate function
      
      * some tests for all triggering
      
      * tests for when we trigger assignments
      
      * test wakeups
      
      * add block utilities for testing
      
      * some more tests for approval updates
      
      * approved_ancestor tests
      
      * new action type for launch approval
      
      * process-wakeup tests
      
      * clean up some warnings
      
      * fix in_future test
      
      * approval checking tests
      
      * tighten up too-far-in-future
      
      * special-case genesis when caching sessions
      
      * fix bitfield len
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      e48c6875
  2. Feb 02, 2021
    • Sergey Pepyakin's avatar
      Clean up PersistedValidationData (#2353) · d4fdbf7d
      Sergey Pepyakin authored
      * PVD: `block_number`->`relay_parent_number`
      
      * ValidationParams: `relay_chain_height`->`relay_parent_number`
      
      * Expose DMQ MQC hash as a well-known-key
      
      This way the relay storage merkle proofs will be able to obtain the DMQ
      MQC hash and we will be able to remove the it from the
      PersistedValidationData struct.
      
      * PersistedValidationData: Remove HRMP MQC heads
      
      * PersistedValidationData: Remove `dmq_mqc_head`
      
      * Expose the HRMP ingress channel index as a well-known-key
      
      This way a parachain (PVF and collator) can find all the parachains that
      have an outbound channel to the given one. That allows in turn to find
      all the inbound channels for the given para.
      
      Having access to that allows the parachain to get the same information
      as the hrmp_mqc_heads now provide.
      
      * Rename `relay_storage_root` to `relay_parent_storage_root`
      d4fdbf7d
  3. Jan 29, 2021
  4. Jan 28, 2021
    • Bastian Köcher's avatar
      Companion for #7997 (#2345) · 7f019517
      Bastian Köcher authored
      * Companion for #7997
      
      https://github.com/paritytech/substrate/pull/7997
      
      
      
      * rename slot_number to slot
      
      * rename SlotNumber type in overseer docs
      
      * "Update Substrate"
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      Co-authored-by: parity-processbot <>
      7f019517
    • Peter Goodspeed-Niklaus's avatar
      misbehavior: report multiple offenses per validator as necessary (#2222) · 25cfb884
      Peter Goodspeed-Niklaus authored
      * use proper descriptive generic type names
      
      * cleanup
      
      * Table stores a list of detected misbehavior per authority
      
      * add Table::drain_misbehaviors_for
      
      * WIP: unify misbehavior types; report multiple misbehaviors per validator
      
      Code checks, but tests don't yet pass.
      
      * update drain_misbehaviors: return authority id as well as specific misbehavior
      
      * enable unchecked construction of Signed structs in tests
      
      * remove test-features feature & unnecessary generic
      
      * fix backing tests
      
      This took a while to figure out, because where we'd previously been
      passing around `SignedFullStatement`s, we now needed to construct
      those on the fly within the test, to take advantage of the signature-
      checking in the constructor. That, in turn, necessitated changing the
      iterable type of `drain_misbehaviors` to return the validator index,
      and passing that validator index along within the misbehavior report.
      
      Once that was sorted, however, it became relatively straightforward:
      just needed to add appropriate methods to deconstruct the misbehavior
      reports, and then we could construct the signed statements directly.
      
      * fix bad merge
      25cfb884
  5. Jan 26, 2021
  6. Jan 25, 2021
  7. Jan 18, 2021
  8. Jan 17, 2021
  9. Jan 15, 2021
  10. Jan 12, 2021
  11. Jan 11, 2021
  12. Jan 08, 2021
    • Fedor Sakharov's avatar
      Exit from av-store loop on fatal error. (#2232) · 8f293e18
      Fedor Sakharov authored
      * Fuse receive stream in Context
      
      * Revert "Fuse receive stream in Context"
      
      This reverts commit ddd26fa98f0ca1afbc22064e93010e4193a058b2.
      
      * Exit on node shutdown from av-store loop
      
      * Filter only context error
      8f293e18
  13. Jan 07, 2021
  14. Jan 06, 2021
  15. Jan 05, 2021
  16. Jan 04, 2021
    • Sergey Pepyakin's avatar
      Add relay storage root to persisted validation data (#2161) · a864eaa0
      Sergey Pepyakin authored
      * Cont.: Implement the state root obtaining during inclusion
      
      During inclusion now we obtain the storage root by passing it through
      the inclusion_inherent.
      
      * Fix tests
      
      * Bump rococo spec version
      
      * Reorder the parent header into the end
      
      of the inclusion inherent.
      
      When the parent header is in the beginning, it shifts the other two
      fields, so that a previous version won't be able to decode that. If
      we put the parent header in the end, the other two fields will stay
      at their positions, thus make it possible to decode with the previous
      version.
      
      That allows us to perform upgrade of rococo runtime without needing of
      simultanuous upgrade of nodes and runtime, or restart of the network.
      
      * Squash a stray tab
      a864eaa0
    • Bastian Köcher's avatar
      Improve unbacked span (#2191) · 930978ce
      Bastian Köcher authored
      We need to make sure to drop the import-statement child span before the
      parent span is dropped.
      930978ce
    • Bastian Köcher's avatar
      9e554721
  17. Jan 02, 2021
  18. Dec 28, 2020
  19. Dec 18, 2020
  20. Dec 17, 2020
    • asynchronous rob's avatar
      adjust span names (#2135) · fa7cced5
      asynchronous rob authored
      * adjust span names
      
      * fix compile
      fa7cced5
    • asynchronous rob's avatar
      add better spans for unbacked candidates (#2132) · 7cbf4f0b
      asynchronous rob authored
      * add better spans for unbacked candidates
      
      * improve span names
      7cbf4f0b
    • Bastian Köcher's avatar
      Fix bug and further optimizations in availability distribution (#2104) · d0c97539
      Bastian Köcher authored
      
      
      * Fix bug and further optimizations in availability distribution
      
      - There was a bug that resulted in only getting one candidate per block
      as the candidates were put into the hashmap with the relay block hash as
      key. The solution for this is to use the candidate hash and the relay
      block hash as key.
      - We stored received/sent messages with the candidate hash and chunk
      index as key. The candidate hash wasn't required in this case, as the
      messages are already stored per candidate.
      
      * Update node/core/bitfield-signing/src/lib.rs
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      
      * Remove the reverse map
      
      * major refactor of receipts & query_live
      
      * finish refactoring
      
      remove ancestory mapping,
      
      improve relay-parent cleanup & receipts-cache cleanup,
      add descriptor to `PerCandidate`
      
      * rename and rewrite query_pending_availability
      
      * add a bunch of consistency tests
      
      * Add some last changes
      
      * xy
      
      * fz
      
      * Make it compile again
      
      * Fix one test
      
      * Fix logging
      
      * Remove some buggy code
      
      * Make tests work again
      
      * Move stuff around
      
      * Remove dbg
      
      * Remove state from test_harness
      
      * More refactor and new test
      
      * New test and fixes
      
      * Move metric
      
      * Remove "duplicated code"
      
      * Fix tests
      
      * New test
      
      * Change break to continue
      
      * Update node/core/av-store/src/lib.rs
      
      * Update node/core/av-store/src/lib.rs
      
      * Update node/core/bitfield-signing/src/lib.rs
      
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      
      * update guide to match live_candidates changes
      
      * add comment
      
      * fix bitfield signing
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      d0c97539
    • ordian's avatar
      refactor View to include finalized_number (#2128) · 3f5156e8
      ordian authored
      * refactor View to include finalized_number
      
      * guide: update the NetworkBridge on BlockFinalized
      
      * av-store: fix the tests
      
      * actually fix tests
      
      * grumbles
      
      * ignore macro doctest
      
      * use Hash::repeat_bytes more consistently
      
      * broadcast empty leaves updates as well
      
      * fix issuing view updates on empty leaves updates
      3f5156e8
  21. Dec 11, 2020
  22. Dec 10, 2020
    • Bernhard Schuster's avatar
      addition error definitions (#2107) · 35c71bf3
      Bernhard Schuster authored
      * remove low information density error doc comments
      
      * another round of error dancing
      
      * fix compilation
      
      * remove stale `None` argument
      
      * adjust test, minor slip in command
      
      * only add AvailabilityError for full node features
      
      * another None where none shuld be
      35c71bf3
  23. Dec 07, 2020