State Channels bi-weekly development update - late August 2019

This is a bi-weekly update of all things concerning the protocol design and
reference implementation of State Channels.

Thanks to the SC contributors @dimitar.chain, @uwiger,
@gorbak25, @Aleksandarf and @bot.

The previous report was Early August 2019.

Backchannel updates when SC WS client disconnected

Design: PR #394, PR #398
Implementation: PR #2611

Off-chain updates can now still be completed even if one of the Websocket
clients is offline. If the originator manages to get the initial update
request co-signed ‘out-of-band’, the responding FSM will proceed as if
it received a successful signing response from the client.

Cache tx env for better SC FSM performance

Implementation: PR #2661

Caching the tx_env data turns out to have a significant impact on SC FSM performance.
The aetx_env data is cached in an env cache ets table introduced in the aesc_state_cache process.
The state cache subscribes to top_changed events and refreshes the top block tx_env,
but only if it has cached offchain states, indicating that there are actually running FSMs.

Fix SC WebSocket API example generation

Design: PR #393
Implementation: PR #2617

The generation of examples has been broken for some time and therefore the
examples were missing in the procotol repository. The generation was fixed and
new examples added to the protocol repository.

Support snapshot_solo in the SC WS API

Implementation: PR #2647

snapshot_solo is defined as an on-chain tx. This change enables the client
request one via the WS API in a manner similar to close_solo.

State Channel UAT Test Suite

Implementation: PR #3, PR #4, PR #5

To enable rapid validation and experimentation outside of the context of the
Aetenity core, the project ae-channel-service is meant to implement real-world
use-cases of state channels to validate the protocol and implementation via
blackbox testing.

The project is still in its early stages but has already provided useful
feedback for the core protocol development.

Refactorings, general improvements and test improvements

Implementation: PR #2612, PR #2626, PR #2629, PR #2641, PR #2659, PR #2670

In preparation for Virtual State Channels an ongoing effort
is to refactor parts of the code to make it easier to comprehend and
maintainable. Refactorings are meant to be done is small chunks to keep impact
low and feature development going.

4 Likes

Thank you for this update! The report is well written and the links to the PRs are helpful too. Thank you for doing this.