Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

beefy: initialize voter from genesis and fix initial sync #11959

Merged
merged 14 commits into from
Sep 5, 2022

Commits on Aug 1, 2022

  1. Configuration menu
    Copy the full SHA
    eb36f51 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2022

  1. 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.
    acatangiu committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    2057593 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    428dc84 View commit details
    Browse the repository at this point in the history
  3. 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.
    
    Signed-off-by: acatangiu <[email protected]>
    acatangiu committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    d2c028a View commit details
    Browse the repository at this point in the history
  4. 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.
    acatangiu committed Aug 2, 2022
    Configuration menu
    Copy the full SHA
    f853a71 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Configuration menu
    Copy the full SHA
    396ba91 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2022

  1. Configuration menu
    Copy the full SHA
    388391f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c7c17d View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2022

  1. client/beefy: correct voter initialization

    BEEFY voter should resume voting from either:
      - last BEEFY finalized block,
      - session start,
    whichever is closest to head.
    
    Signed-off-by: acatangiu <[email protected]>
    acatangiu committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    924f4d0 View commit details
    Browse the repository at this point in the history
  2. client/beefy: test voter initialization

    Signed-off-by: acatangiu <[email protected]>
    acatangiu committed Aug 5, 2022
    Configuration menu
    Copy the full SHA
    bd89534 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ffec98 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2022

  1. Configuration menu
    Copy the full SHA
    1b013fb View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2022

  1. Configuration menu
    Copy the full SHA
    6a17e76 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    71ae1bf View commit details
    Browse the repository at this point in the history