Description
Tracking issue
For the changes regarding AIP#61: AdEx v5: significantly cheaper channels (full details here)
Change log
-
Channel
&Campaign
AIP #61 v5: Channel and Campaign #382 (PRs: AdEx v5: Issue #382 Channel and Campaign #383 ) -
NewState
&Accounting
AIP #61 v5: NewState and Accounting #398 - Sentry
-
API documentation Sentry REST API documentation #475
-
Accounting & spenders AIP #61 v5: Spenders & Address accounting (postgres) #381
-
GET /v5/channel/:id/accounting AIP #61 v5: GET /v5/channel/:id/accounting #431 @simzzz
-
GET /v5/channel/:id/spender/:addr AIP #61 v5: GET /channel/:id/spender/:addr #391
-
GET /v5/channel/:id/spender/all AIP #61 v5: GET /channel/:id/spender/all #392
-
POST /v5/channel/:id/spender/:addr POST /v5/channel/:id/spender/:addr + tests #465 @simzzz
- Change output to use SpenderResponse instead of just success: true Changed POST /v5/channel/:id/spender/:addr output to SpenderResponse #484 @simzzz
-
POST /v5/channel/:id/pay POST /v5/channel/:id/pay #477 @simzzz
Channel Payout with authentication of the spender.
Withdrawals of advertiser funds - re-introduces thePAY
event with a separate route -
GET /v5/channel/:id/get-leaf @simzzz (PR GET
/v5/channel/:id/get-leaf
route + tests #544)
from AIP#61:add another helper route /get-leaf that is called like this: /get-leaf?spender=... or /get-leaf?earner=...; this will get the latest approved state (NewState/ApproveState pair), will find the given spender/earner in the balances tree, and produce a merkle proof for it; this is useful for the Platform to verify if a spender leaf really exists
I've discussed this with Ivo, we will make spender/earner routes instead of using query parameters, e.g.:
/get-leaf/spender/0x....
/get-left/earner/0x...
-
POST /v5/campaign/:id/close AIP #61 v5 Sentry POST /v5/campaign/:id/close #417 (PR Issue 417 campaign close route #457)
(newBudget = totalSpent
, i.e.newBudget
=oldBudget - remaining
) -
POST / PUT /v5/campaign (create / modify) AIP #61 v5: Channel and Campaign #382
- update spender available funds when they try to mutate campaigns
-
GET
/v5/units-for-slot
Supermarket'sunits-for-slot
route integration inside Sentry #471 -
Enforce limits ( PR Issue 382 campaign insert events #413 )
-
Events AIP #61 v5: Channel and Campaign #382 ( PR Issue 382 campaign insert events #413 )
- enforce per-campaign spending limits atomically - we already do this in
access
- enforce per-campaign spending limits atomically - we already do this in
-
Distribute fees AIP #61 v5: Spenders & Address accounting (postgres) #381 ( PR Issue 382 campaign insert events #413 )
-
Analytics breakdowns by 1hr AIP #61 v5: Channel and Campaign #382
-
Campaign(s) remaining Campaign(s) remaining (redis) #415
-
- Validator
- Worker flow Preparations for V5 validator workflow #426 V5 validator Leader/Follower ticks with timeouts & logging #433
For details see JS issue AIP #61 v5: Validator Worker workflow adex-validator#360- worker will group the ticks (i.e. Accounting, NewState/ApproveState) per channel
- leader/follower ticks V5 validator workflow - Follower & Leader ticks #428
- Channel tick V5 validator Leader/Follower ticks with timeouts & logging #433
- Tests @simzzz Leader/Follower tick tests + Heartbeat tests #490
- Unified precision AIP #61 v5: Unified precision (8) #384 ( PR AdEx v5: Issue #384 Unified precision - primitives::UnifiedNum #386 Issue 384 unified precision #393 )
- Targeting rules DSL - use UnifiedNum instead of BigNum (part of AIP #61 v5: Unified precision (8) #384)
- Remove Fees (and move to Sentry) AIP #61 v5: Spenders & Address accounting (postgres) #381 ( PR Issue 382 campaign insert events #413 )
- Outpace - spender & earner limits
- sum(spenders) = sum(earners) - use the
Balances<CheckedState>
. The struct can be directly deserialized and will check the state of the Balances. - For Spender - Deposit > spent (use the necessary sentry routes to perform this validation)
- sum(spenders) = sum(earners) - use the
- Worker flow Preparations for V5 validator workflow #426 V5 validator Leader/Follower ticks with timeouts & logging #433
- Adapter
- Calculate total spendable amount AIP #61 v5: Adapter - total spendable amount #380
- Generic Deposit - instead of having adapter Deposit & spender Deposit, make the Deposit struct over a generic type ( impled in Channel v5 table #432 )
- AdView manager:
- A way to test adview-manager generated code manually Initial AdView manager for
serve
-ing and testing generated code for ads #476 Adview manager serve ads preview #564 Infinity Behaviour + AdView Manager Tests #566 - Make V5 changes
- Finalize AIP#61: AdEx V5: adview-manager: AIP#31 Targeting changes #322
- A way to test adview-manager generated code manually Initial AdView manager for
pub struct Deposit<T> {
pub total: T,
pub still_on_create2: T,
}
impl Deposit<UnifiedNum> {
pub fn from_precision(precision: u8, deposit: Deposit<BigNum>) -> Option<Deposit<UnifiedNum>> {... }
}
- Remove
SpenderLeaf
Remove SpenderLeaf #442 @simzzz - Integration tests - new mini test kit (see https://github.com/AdExNetwork/adex-validator/blob/v5/integrationTests.md)
- PR Validator test harness - running sentry servers #437
- A
test_harness
crate for running the tests - A way to run 2 sentry servers (Leader / Follower)
- A
- PR Validator stack - Running Workers tick & inserting events #454
- A way to run both validator workers in single tick
- Writing the test cases test_harness - additional multichain tests #491
- Analytics AIP #61 v5: Analytics multi-chain support #494
- PR Validator test harness - running sentry servers #437
deposit into a channel and create a campaign make sure it doesn't work before that submit events verify that payments appear in NewState/ApproveState, incl. fees verify that /analytics returns stuff
Remove old V4 routes that are no longer needed:
- Create Channel
POST /channel
Issue 382 Remove V4 Channel and fns cleanup #435 - Validator Channel
POST /channel/validate
Issue 382 Remove V4 Channel and fns cleanup #435 - Status of Channel
GET /channel/:id/status
Issue 382 Remove V4 Channel and fns cleanup #435 - Event aggregates
GET channel/:id/events-aggregates
(removed in Sentry REST API & functions documentation #473)
Sentry Authentication required (AuthRequired
middleware) routes
- POST /v5/campaign (Auth is used to validate the campaign.creator)
- POST /v5/campaign/:id/close (Auth is used to validate the campaign.creator)
- POST /v5/channel/:id/spender/:addr
- GET /v5/channel/:id/spender/:addr
- POST /v5/channel/:id/spender/all
- GET channel/:id/events-aggregates (v4)
- POST channel/:id/validator-messages (v4)
- POST /v5/channel/:id/validator-messages
- /v5/channel/:id/pay
- /v5/analytics/for-publisher
- /v5/analytics/for-advertiser
- /v5/analytics/for-admin