Æternity's State Channels - Playground

Hi Everyone!

On our blog you can read about our new project regarding State Channels: Playground. Playground will be a tool to experiment and showcase æpps that make use of State Channels.
We would love to have your feedback and ideas in this thread!
As mentioned in the blog post, we envision the MVP to have the following features:

  • Providing two user accounts
  • Opening a channel and closing a channel
  • Depositing and withdrawing AE tokens from the chain into the State Channel
  • Showing transaction history, on-chain and off-chain
  • Tracking balances on-chain and off-chain

In future iterations, we would like to add more functionalities like:

  • Display æternity node logs
  • Deploy contracts in the channel
  • Integrate a sequence chart in order to view the State Channel states
  • Save projects in order to share simulations with other people

Do you think something is missing or do you have other suggestions? Please let us know :slight_smile:

Best wishes,
Jantine

8 Likes

Very interesting aepp!

Is there any sourcecode in public or detailed documents for newbie to learn as classic state channel sample?

Hi @LiuYang.chain
State channels are documented in the protocol repo.
You can read the motivation behind decisions being taken here. There are detailed descriptions of the on-chain and off-chain protocols. This is how channels work. AE had implemented this protocol and the node already provides most of the functionalities for you via a WebSocket API. You can read a dry description of it here or read about its intended usage here. The WebSocket has two parallel APIs - a legacy one and a JSON-RPC one. All examples are using the legacy one and those are to be replaced. You can read about the fully operational JSON-RPC here.

If you want to dive even deeper, you can follow our generated examples here. Those are the output of test logs and have all the messages send between both parties and their nodes: all sign requests, responses, events and etc.

While our implementation does all the heavy lifting required for the encrytped trustless communication for you, there are quite a lot of events to be handled client-side. We are also developing a JS SDK to do that for you and since this pull request it provides some of the functionality. Based on it, there is a great tutorial of how to run a state channel between two parties you can follow here.

The playground tool @Jantine wrote about is yet another step to make channels more easy to on-board people.

5 Likes

Thanks very much~that’s so detailed guide, thank you!