1. Apr 28, 2022
  2. Mar 25, 2022
    • Adrian Catangiu's avatar
      Implement Lean BEEFY (#10882) · 498e8c18
      Adrian Catangiu authored
      
      
      Simplified BEEFY worker logic based on the invariant that GRANDPA
      will always finalize 1st block of each new session, meaning BEEFY
      worker is guaranteed to receive finality notification for the
      BEEFY mandatory blocks.
      
      Under these conditions the current design is as follows:
      - session changes are detected based on BEEFY Digest present in
        BEEFY mandatory blocks,
      - on each new session new `Rounds` of voting is created, with old
        rounds being dropped (for gossip rounds, last 3 are still alive
        so votes are still being gossiped),
      - after processing finality for a block, the worker votes if
        a new voting target has become available as a result of said
        block finality processing,
      - incoming votes as well as self-created votes are processed
        and signed commitments are created for completed BEEFY voting
        rounds,
      - the worker votes if a new voting target becomes available
        once a round successfully completes.
      
      On worker startup, the current validator set is retrieved from
      the BEEFY pallet. If it is the genesis validator set, worker
      starts voting right away considering Block #1 as session start.
      
      Otherwise (not genesis), the worker will vote starting with
      mandatory block of the next session.
      
      Later on when we add the BEEFY initial-sync (catch-up) logic,
      the worker will sync all past mandatory blocks Signed Commitments
      and will be able to start voting right away.
      
      BEEFY mandatory block is the block with header containing the BEEFY
      `AuthoritiesChange` Digest, this block is guaranteed to be finalized
      by GRANDPA.
      
      This session-boundary block is signed by the ending-session's
      validator set. Next blocks will be signed by the new session's
      validator set. This behavior is consistent with what GRANDPA does
      as well.
      
      Also drop the limit N on active gossip rounds. In an adversarial
      network, a bad actor could create and gossip N invalid votes with
      round numbers larger than the current correct round number. This
      would lead to votes for correct rounds to no longer be gossiped.
      
      Add unit-tests for all components, including full voter consensus
      tests.
      
      Signed-off-by: default avatarAdrian Catangiu <[email protected]>
      Co-authored-by: default avatarTomasz Drwięga <[email protected]>
      Co-authored-by: David Salami <Wizdave97>
      498e8c18
  3. Feb 15, 2022
    • Davide Galassi's avatar
      Fix beefy mock ecdsa keys (#10854) · 6f53b974
      Davide Galassi authored
      Compressed ECDSA keys requires to have 0x02 or 0x03 as their first byte
      in order to allow public key recovery.
      
      Nevertheless the test was working because of the `unwrap_or_default()`
      at the end of the conversion routine (i.e. the invalid keys were
      converted to an empty vector).
      6f53b974
  4. Jan 20, 2022
  5. Jan 03, 2022
  6. Dec 21, 2021
  7. Dec 16, 2021
    • dharjeezy's avatar
      Replace parameter_types with ConstU32 &c. (#10402) · 1b0be8ae
      dharjeezy authored
      
      
      * remove parameter types and use const type
      
      * remove parameter types and use const type
      
      * Delete {
      
      * Delete count,
      
      * refractor for beefy, benchmarking, child bounties, and collective pallets
      
      * refractor for pallet contracts
      
      * refractor for elections
      
      * refractor for more pallets
      
      * fix CI issues
      
      * fix CI issues
      
      * fix CI issues
      
      * fix CI issues
      
      * remove warning to fix CI issue
      
      * remove warning to fix CI issue
      refractor for pallet preimage
      
      * remove warning to fix CI issue
      refractor for pallet proxy
      
      * remove warning to fix CI issue
      refractor for pallet recovery
      refractor for pallet randomness-collective-flip
      
      * remove warning to fix CI issue
      refractor for pallet scored-pool
      refractor for pallet scheduler
      refractor for pallet session
      
      * remove warning to fix CI issue
      refractor for pallet society, support, system, timestamp, tips
      
      * remove warning to fix CI issue
      refractor for pallet transaction_payment, transaction_storage, treasury, uniques, utility
      
      * remove warning to fix CI issue
      
      * cargo +nightly fmt
      
      * CI fix
      
      * more param refractor on beefy-mmr
      
      * refractor for beefy
      
      * Update frame/babe/src/mock.rs
      
      * Update frame/babe/src/mock.rs
      
      * Update frame/bounties/src/tests.rs
      
      * Update frame/tips/src/tests.rs
      
      * Delete mock.rs
      
      * Update frame/examples/basic/src/tests.rs
      
      * Apply suggestions from code review
      
      * Update frame/im-online/src/mock.rs
      
      * Update frame/im-online/src/mock.rs
      
      * Update frame/offences/benchmarking/src/mock.rs
      
      * Update frame/session/benchmarking/src/mock.rs
      
      * Update frame/support/test/tests/pallet_compatibility.rs
      
      * Update frame/support/test/tests/pallet_compatibility_instance.rs
      
      * Update frame/treasury/src/tests.rs
      
      * Update test-utils/runtime/src/lib.rs
      
      * some cleanup
      
      * fmt
      
      * remove unused
      
      Co-authored-by: default avatarDamilare <[email protected]>
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      1b0be8ae
  8. Dec 13, 2021
  9. Dec 09, 2021
  10. Nov 12, 2021
  11. Oct 06, 2021
  12. Sep 28, 2021
  13. Sep 23, 2021