I’m sorry for putting it in this section but I believe its the right place. I’d like to start a discussion about our goals for payments on the backend side and get everyone on the same page from backend to frontend. I believe it is a good time to discuss it as Clarity can make payments already, and guac (and its rita integration) wasn’t touched in a while.
I’m also missing some context as I’m relatively new to the team. For last couple of days I was consumed by implementing clarity so I apologise if I forgot about some facts.
I’ll also make separate topic with proposal for agenda for next dev meeting to brainstorm things we don’t know yet.
- Clarity 0.1.1 is released and is compliant with official ETH test suite for Transactions (all ~198 tests are passing), it was also verified on Ropsten testnet, and on ganache (at the time of writing I have another PR that does automatic payments verification on ganache testnet). This means that we can make ETH transactions on the backend even on MIPS and big endian systems.
- We have contract developed and it could be integrated for DAO payments (@Sebohe correct me if I’m wrong). This process could be done manually as well before integrating it into the stack. We have a piece of code on Rita that already checks the membership.
- Frontend is ready to do this.
- Debt tracking works well and we should be able to at least allow simple payments between clients
- DAO calls are done already on Rita side to verify if an address is in the list or not.
I can think of one important use case right now for Guac that is not yet finished:
- Alice wants to pay Bob for the traffic she used.
To my knowledge this is currently missing and we need to implement it as a new feature.
- Alice wants to pay Bob for the traffic she used
- Amount of Wei is calculated that has to be transferred from Alice to Bob given the parameters of the mesh.
- Alice clicks a button “Pay debts” (This can be triggered manually, button seems safe choice at the beginning)
- A transaction is broadcasted to the network (Frontend could display a message “Do you really want to transfer XXX ETH to Bob?”)
- After few moments Alice and Bob balance is updated with a message that the payment went through
- Debt keeper resets the counter.
The last part is very important - we need a way to know that the transaction is confirmed. I can imagine querying the network with TX hash and checking amount of confirmations.
On the other hand we want to use ETH payment channels which I believe is important distinction.
I’d keep Guac’s purpose to focus only on being a “Payment Controller” i.e. expose an API to make transactions with an ability to know if a transaction is confirmed, or not. I believe it was the original goal.
I believe that even though guac contains a lot of logic for payment channels and non trivial amount of tests it still contains gaps in functionality we really need to get payments going. For example: how do we know if the transaction was successful?