Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BEEFY: add support for slashing validators signing forking commitments (without ancestry proofs) #1329

Commits on Aug 28, 2023

  1. sc-consensus-beefy: add BEEFY fisherman to gossip network

    Signed-off-by: Adrian Catangiu <[email protected]>
    acatangiu authored and Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    d8964df View commit details
    Browse the repository at this point in the history
  2. sp-consensus-beefy: add invalid fork vote proof and equivalent BeefyApi

    Signed-off-by: Adrian Catangiu <[email protected]>
    acatangiu authored and Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    a2678a0 View commit details
    Browse the repository at this point in the history
  3. pallet-beefy: add stubs for reporting invalid fork votes

    Signed-off-by: Adrian Catangiu <[email protected]>
    acatangiu authored and Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    17398d8 View commit details
    Browse the repository at this point in the history
  4. sc-consensus-beefy: fisherman reports invalid votes and justifications

    Signed-off-by: Adrian Catangiu <[email protected]>
    acatangiu authored and Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    df31624 View commit details
    Browse the repository at this point in the history
  5. don't check GRANDPA finality

    GRANDPA finalization proof is not checked, which leads to slashing on
    forks. This is fine since honest validators will not be slashed on the
    chain finalized by GRANDPA, which is the only chain that ultimately
    matters. The only material difference not checking GRANDPA proofs makes
    is that validators are not slashed for signing BEEFY commitments prior
    to the blocks committed to being finalized by GRANDPA. This is fine too,
    since the slashing risk of committing to an incorrect block implies
    validators will only sign blocks they *know* will be finalized by
    GRANDPA.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    938cde1 View commit details
    Browse the repository at this point in the history
  6. change primitive: vote -> commitment

    instead of using votes as the underlying primitive, rather use
    commitments since they're a more universal container for signed payloads
    (for instance `SignedCommitment` is also the primitive used by ethereum relayers).
    SignedCommitments are already aggregates of multiple signatures. Will
    use SignedCommitment directly next.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    fb08553 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    39799b2 View commit details
    Browse the repository at this point in the history
  8. update comments

    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    4aa602a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e0e13d9 View commit details
    Browse the repository at this point in the history
  10. account for #14471

    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    165d7fc View commit details
    Browse the repository at this point in the history
  11. account for #14373

    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    c7df83b View commit details
    Browse the repository at this point in the history
  12. EquivocationOffence.{offender->offenders}

    previously assumed equivocation report for singular malicious party.
    With fork equivocations, the expectation should be that most
    equivocation reports will be for multiple simultaneous equivocators.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    754ae80 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6ed4e99 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1e41551 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    de2ae90 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    273f34b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    eb1e549 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3369783 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    7abbddc View commit details
    Browse the repository at this point in the history
  20. reduce find_mmr_root_digest trait constraint

    reduce from Block to Header: less restrictive.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    8acea22 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    103fc53 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    1509a26 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    a62cc7f View commit details
    Browse the repository at this point in the history
  24. remove duplic. in check_{signed_commitment, proof}

    check_signed commitment wasn't complete anyway.
    good to have both interfaces since BeefyVersionedFinalityProof is what's
    passed on the gossip layer, and SignedCommitments are naturally
    reconstructed from multiple sources, for instance submit_initial calls
    on Ethereum.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    5445977 View commit details
    Browse the repository at this point in the history
  25. update outdated comments

    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    d35a97c View commit details
    Browse the repository at this point in the history
  26. remove report_invalid_payload

    redundant vs report_fork_equivocation
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    4e3e1cc View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    f27a876 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    f641759 View commit details
    Browse the repository at this point in the history
  29. create_beefy_worker: only push block if at genesis

    No need to trigger first session if chain's already had blocks built,
    such as with generate_blocks_and_sync, which needs to build on genesis.
    If chain is not at genesis and create_beefy_worker, it will panic trying
    to canonicalize an invalid (first) block.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    5c4104c View commit details
    Browse the repository at this point in the history
  30. create_beefy_worker: opt. instantiate with TestApi

    can pass in Arc of TestApi now. Required since fisherman reports should be
    pushed to `reported_fork_equivocations`, and should be logged with the
    same instance (see upcoming commit).
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    a0d8b87 View commit details
    Browse the repository at this point in the history
  31. push to reported_fork_equivocations

    mock api's `submit_report_fork_equivocation_unsigned_extrinsic` pushes
    reported equivocations to runtime_api.reported_fork_equivocations
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    9126904 View commit details
    Browse the repository at this point in the history
  32. add generate_fork_equivocation_proof_vote to tests

    Generates fork equivocation proofs from a vote and a header.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    02da07e View commit details
    Browse the repository at this point in the history
  33. test: Alice snitches on Bob's vote equivocation

    i.e. a fork equivocation triggered by a vote
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    a3b4d3f View commit details
    Browse the repository at this point in the history
  34. store reference to key_store in fisherman

    required for fisherman to *not* report own equivocations - see next commit.
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    d44e3c8 View commit details
    Browse the repository at this point in the history
  35. test: Alice doesn't snitch *own* vote equivocation

    i.e. a fork equivocation triggered by a vote
    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    c27579c View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    5516837 View commit details
    Browse the repository at this point in the history
  37. Alice reports Bob & Charlie's signed commitment

    Robert Hambrock authored and Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    60a71c7 View commit details
    Browse the repository at this point in the history
  38. cleanup

    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    ec99b1a View commit details
    Browse the repository at this point in the history
  39. remove superfluous None check

    Co-authored-by: Adrian Catangiu <[email protected]>
    Lederstrumpf and acatangiu committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    ea7dd35 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    3185776 View commit details
    Browse the repository at this point in the history
  41. fmt

    Lederstrumpf committed Aug 28, 2023
    Configuration menu
    Copy the full SHA
    59c1c2a View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. missing keystore

    Lederstrumpf committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    ab3eb02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    844ed67 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ebebed View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2023

  1. Configuration menu
    Copy the full SHA
    efe4b2a View commit details
    Browse the repository at this point in the history
  2. test renames

    Lederstrumpf committed Aug 31, 2023
    Configuration menu
    Copy the full SHA
    d0dba3b View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2023

  1. test fork equivocation (via vote) reports

    skip weight test for now
    Lederstrumpf committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    b438866 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd856ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e1e7b1 View commit details
    Browse the repository at this point in the history
  4. bump number of beefy authorities in tests

    else fork equivocation via signed commitment tests will be less
    meaningful (no validators that don't equivocate, ergo don't get slashed)
    Lederstrumpf committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    f5b1ec5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7504b96 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2023

  1. cleanup & TODOs

    Lederstrumpf committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    036fa2f View commit details
    Browse the repository at this point in the history
  2. test that overlapping reports stack correctly

    Already reported equivocators should neither be slashed again, nor
    should they cause the report containing a re-report of their
    equivocation to be invalidated by their presence.
    Lederstrumpf committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    53e8ae0 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

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

Commits on Sep 5, 2023

  1. Configuration menu
    Copy the full SHA
    4074a27 View commit details
    Browse the repository at this point in the history
  2. fmt

    Lederstrumpf committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    e5537dd View commit details
    Browse the repository at this point in the history
  3. cleanup & remove TODO

    stick with Vec since now in practice, always iterating through entire
    signatories & not performing any key lookup.
    
    also leaving ForkEquivocationProof { commitment, signatories, .. } as is
    for now - let's change to SignedCommitment if it gets in the way.
    Lederstrumpf committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    c815af6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    35330bb View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Configuration menu
    Copy the full SHA
    bb2e791 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    936406b View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Configuration menu
    Copy the full SHA
    16c12eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b48fec View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2023

  1. Configuration menu
    Copy the full SHA
    7be7ba9 View commit details
    Browse the repository at this point in the history
  2. account for paritytech#2446

    Lederstrumpf committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    0cd4a75 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. {correct->canonical}_header

    Co-authored-by: Serban Iorga <[email protected]>
    Lederstrumpf and serban300 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    e1953eb View commit details
    Browse the repository at this point in the history
  2. remove old logging

    Reported-by: Serban Iorga <[email protected]>
    Lederstrumpf committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    26fc473 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d7f553f View commit details
    Browse the repository at this point in the history
  4. linearize failfast flow

    Co-authored-by: Serban Iorga <[email protected]>
    Lederstrumpf and serban300 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    d2bf211 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. debug->warn

    Co-authored-by: Adrian Catangiu <[email protected]>
    Lederstrumpf and acatangiu committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    11a16cc View commit details
    Browse the repository at this point in the history