-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Part of AIP#61 - AdEx v5 #338
AIP#61: AdEx v5: significantly cheaper channels (full details here)
Workflow
GET /campaign/all, and for each channel:
Extract all unique Channels and hook up the campaign Validators to them. This is necessary since the campaign holds information about the validators urls in V5.- (Chanel Tick begins)
GET /channel/:id/spender/all&GET channel/:id/accounting - Next validate:
sum(Accounting.spenders) == sum(Accounting.earners)just by usingBalances<CheckedState>- Validate each spender (
GET channel/:id/spender/allresponse)spender.spender_leaf.total_deposit >= accounting.balances.spenders[spender.address]
GET Last Approved State& fetchGET Last Approved NewState- since theNewStateholds the actual balances and not theApproveState.- Validate change in balances & OUTPACE rule:
-
Change in balances - validate that there is a change in the balances (current
Accounting.balances != NewState.blaances). If there are no changes, we will not create new states (NewState&ApproveState) -
validate spender/earner amounts - each amount should increase , i.e.:
Accounting.balances.spenders[spender_address] > NewState.balances.spender[spender_address]&Accounting.balances.earners[earner_address] > NewState.balances.earners[earner_address]
-
OUTPACE rules:
sum(accounting.balances.spenders) > sum(new_state.balances.spenders)sum(accounting.balances.earners) > sum(new_state.balances.earners)
NOTE: leader/follower tick - We no longer need the producer::tick since we have the always up-to-date Accounting
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels