Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Dance moves disputed? Get off the Dance Floor! #1229

Merged
merged 3 commits into from
Feb 8, 2022
Merged

Commits on Feb 7, 2022

  1. State Channel Dispute Versioning

    A flood of disputes coming in from all over the place can cause enough
    trouble reconciling how to pay out rewards and txns that things start to
    go haywire.
    
    - consistent arity for txn callback
    
    - xor filters don't like to be empty
    
    - set default sc_handler if you're not running tests with a group
    
    - helper for adding traces
    
    - add sc_dispute test
    
    - break out of valid check early if the ledger state channel is already disputed
    
    - add sc_dispute_prevention chaing var --boolean()
    
    - add sc_dispute_prevention eunit test for rewards
    
    - make sure dispute_prevention is active before rejecting close disputes
    
    - Zero out when dispute prevention is active and sc is dipusted,
    otherwise carry on as usual
    
    - better searchable name for the test
    
    - more explicit naming for internal test halpers
    
    - add sc_dispute_prevention chain var to test suite
    
    - Some notes and questions about this test
    
    - grab sc_dispute_prevention from passed in Vars
    
    - don't use assertMatch, allows empty maps to match any map
    
    - more descriptive variable
    
    - use rewards v2
    
    Update src/transactions/v2/blockchain_txn_rewards_v2.erl
    
    Co-authored-by: Andrew Thompson <andrew@hijacked.us>
    
    sc_dispute_prevention -> sc_dispute_strategy_version
    
    - Allows for evolution of handling state channel close disputes
    
    - Add sc_dispute_strategy_version to rewards_vars() map
    
    - get back metadata for rewards
    
    - allow versions higher than 1 without code updates in these paths
    michaeldjeffrey committed Feb 7, 2022
    Configuration menu
    Copy the full SHA
    5873aa4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a093ef3 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2022

  1. move rewards check a couple blocks later

    is_valid check has to be done within the grace period, rewards can't be
    calculated until after the grace period.
    
    having the rewards check before will cause the test to always fail on
    the is_valid check with a cannot_expire result.
    michaeldjeffrey committed Feb 8, 2022
    Configuration menu
    Copy the full SHA
    4adbe67 View commit details
    Browse the repository at this point in the history