Skip to content

AIP #61 v5: GET /channel/:id/spender/:addr #391

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

Closed
4 tasks done
elpiel opened this issue Mar 30, 2021 · 0 comments · Fixed by #422, #423 or #416
Closed
4 tasks done

AIP #61 v5: GET /channel/:id/spender/:addr #391

elpiel opened this issue Mar 30, 2021 · 0 comments · Fixed by #422, #423 or #416
Assignees
Milestone

Comments

@elpiel
Copy link
Member

elpiel commented Mar 30, 2021

https://github.com/AdExNetwork/aips/issues/61

See the AIP#61 for up-to-date information.

Tasks

  • returns { totalDeposited, spenderLeaf }, where spenderLeaf will contain totalSpent and merkle proof (from AIP#61)

    • Accounting & NewState include spender Balances, from which the spenderLeaf will be taken.
    • spenderLeaf: (spender, balance) however the request already contains the spender address, this is why we only need totalSpent
    • merkle proof of the latest ApproveState, this is so that we can validate that spenderLeaf(hash("spender", spender, totalSpent)) is present in latestApprovedState.stateRoot (todo: additional clarifications needed)
  • GET will return total spendable amount (from Spendable in the DB) and spender leaf (from AIP#61)

  • Update NewState & ApproveState with the new Balances::<CheckedState> once merged Changed NewState/Accounting to use Balances<CheckedState> #422 primitives - Balances & BalancesState #423

  • Generate MerkleProof in the SpenderLeaf AIP #61: AdEx v5: significantly cheaper channels #377 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment