Payment Channel Integration on Aeternity Lab (WIP)

  • Was not looking at contract call and was only working on the ‘Payment channel’ part and not on ‘state channel’ since I could not figure out if there is any requirement of smart contract in our use case.
  • The generic message does not makes sense because the whole purpose is of mutual agreement.
  • Now I am left with payment transfer, I guess batching seems to be reasonable option here.

Having said that I have couple of questions/ clarification/ doubts here:

As per my understanding in the minimal setup of channel use case, we have 3 entities:

  • Client 1- The initiator [A Websocket server]
  • Client 2- The responder [A Websocket server]
  • Aeternity blockchain node [A Websocket server ]
    When we setup the a channel, Client1 connect to Aeternity node and then waits for Client2 to connect with Aeternity (the accepts phase). Once Cilent2 connects, the channel is created and separate FSMIds are maintained on the Aeternity node. So at this point of time, they all three forms a network on web sockets some thing like this:

  • Now once the channel is setup, Client1 and Client2 can go ahead and do ping-pong to pay each other offline. My first question is, when they update the state offchian, does it happens peer-to-peer between client1 and client2 or Ae-node is also involved in this communication (may be for maintaining the state of rounds so that double spending could be prevented)?
  • The second question which I have is, when client1 connects with ae-node at the time of creation of channel, (as per my knowledge) the client2 has to get notified out side the protocol. Is it possible to send notification to client2 from Ae-node itself? like if there is any callback or event which can help here?
3 Likes