completed
Decentralized REDIS state channels
Current Project Status
Complete
Amount
Received
$80,000
Amount
Requested
$80,000
Percentage
Received
100.00%
Solution

Apply REDIS, a best-in-class in-memory database, to create a decentralized state-channel service for dApp developers.

Problem

dApp developers and users need access to low-latency, distributed data storage for high-performance interactive dApps.

Addresses Challenge
Feasibility
Auditability
Decentralized REDIS state channels

Our solution is to research and prototype a reusable and programmable state channel interface for dAPPs requiring interprocess communication in a fast and secure fashion including:

  • Documentation on how to use the state channel
  • State channel Structure
  • API Interfaces and JSON attributes
  • Highly Available Distributed Application Backend

The reusable Application backend will be used by developers for the purposes below:

  • state channel
  • Database
  • Authentication
  • caching
  • Message queue / decentralized background-jobs
  • Multi-user coordination

In future iterations of this project, we might work on such details as:

  • A dashboard presenting usage, status, and purchase options
  • API keys generation
  • Tokenizing usage

Motivation

To enable dApps on Cardano to have the best user experiences, enabling another class of low-latency apps such as music-collaboration, online interaction, card games, and video games.

  • Studies at Google demonstrate significant dropoffs in user engagement with even 100ms of additional latency
  • Usability studies demonstrate that <1s response time is needed for people to feel that their technology is actually reliable (faster is always better)
  • Some protocols need to wait for chain-based confirmation, but many interactions in dAPPs benefit from lower-latency solutions. Multi-user cases especially.

Build Versus Buy:

  • When suitable, off-the-shelf solutions can provide major cost savings in engineering projects. Do we really need to re-invent the wheel?
  • Redis is the premier in-memory database, with ready-to-use clustering capabilities for high availability. Its distributed data-management technology provides near-zero maintenance for operators.
  • Not a magic solution, but a high-value technical element for dApps
  • One of our key research goals on this project: enable Redis to be used for true decentralization for dApps in Cardano (and beyond?)

dAPPs on blockchains exchange information with the underlying blockchain when a transaction between the parties occur. Using a state channel can reduce the number of transactions and allow internal transfers between the parties until it is required to save the final state to the blockchain. State channels dramatically reduce the execution time and fees.

The project aims to research and produce an alternative, low latency state channel solution for Cardano. This is exactly in line with the challenge. As the challenge states “Proposers should consider new novel ideas or research”. This is a previously unexplored area of research with the potential to produce a decentralized network of low latency state channels.

Information security for these state channels is our top recognized risk. Working with encryption and other cryptographic techniques, we will be carefully addressing these considerations so that application developers can maintain privacy within their scope of the state channels.

  • A compromise on the backend servers may reveal sensitive data. One approach we can use to address this: peer-to-peer encryption keys may be generated inside an HSM device.
  • The risk is that state channels may not be reliable when less than 3 active dAPPs using the system. We will seek to design for the intended reliability.
  • REDIS Servers are accessible to the Internet and reachable via DNS resolution. The situation creates DDoS risk and potential flaws on the REDIS server may create a threat. We will mitigate through the use of proxy services, firewall rules, and data-replication relays.
  • We will find new risks and design considerations during our project. We will course-correct and report on those considerations as part of our plan, whether we resolve them or not

August 2022: State channel alpha stage will be available on the testnet.

The Roadmap

Phase 1

April

  • Design of the state-channel structure

May

  • Design and implementation of testnet backend server services

June

  • Packing and dockerization
  • Documentation

July

  • Alpha release available on testnet

Phase 2

  • Community feedback and patching
  • Beta release tests
  • Penetration and Vulnerability tests
  • Hackathon

Design

  • Use standard redis as a Docker container
  • Create a node.js-based replication service to distribute state-channel content across the Dandelion network, with push+pull configuration for reliability improvements
    • and/OR - prototyping to prove appropriate collaborations between REDIS Cluster built-in capabilities vs separate data-replications
  • Make an on-chain registration mechanism for network nodes
  • Prototype encryption techniques with DH/ECC to support temporary private channels

Implementation

  • Add monitoring for memory size, state-channel timeouts and other resource-management considerations

  • Ensure node-operators can set their own limits for timeouts and/or memory-consumption

  • Create docker containers and kubernetes recipes

  • Research and Development - $54000

  • REDIS server integration techniques $8k

  • Transparent state-channel replication $11k

  • Design server-registration mechanisms $12k

  • Design and implement encryption protocols for state-channel members: $15k

  • REDIS resource-management planning, development & iteration $8k

  • Program management: $16000

  • Deployment automation: $8000

  • Penetration & Vulnerability tests: $2000

Patrik Suzzi - Fullstack Engineer, Banking, Automotive, SW Modeling, Funded Proposer of Cardano After Dark, interested client of a fast state channel - <https://www.linkedin.com/in/psuzzi/>, <https://github.com/psuzzi>

Cem Karaca - Exclusive REDIS representative in Turkey, data center operator for more than 20 years. System integrator and Funded Proposer of Cardano After Dark.

<https://www.linkedin.com/in/ckaraca/>

<https://github.com/ckaraca>

Thomas - Th. Physicist, mathematician, programmer, and Plutus pioneer - <https://nl.linkedin.com/in/thomas-vellekoop-1a622119a>

Randall Harmon - 25-year software veteran, system architect, project manager, Plutus Pioneer. 10+ programming languages, full-stack expertise. Applied research in distributed computing at Yahoo (pre-Hadoop era).

Seomon - CA, vCA, Challenge Team - Open Source & Open Standards, funded proposer IT-consultant, project manager

<https://github.com/Seomon4u>

Javascript developer (TBD): implement API endpoints in our service tier, coordinating decentralized services and serving client requests.

Application framework prototype, docker images, and documentation will be available in August 2022

A sample application will be offered as a boilerplate

We will be publishing all work in a Dedicated Discord Channel of Cardano After Dark <https://discord.gg/Y4xUWktwaW>

Also, source codes will be available on CAD Github Site: <https://github.com/Cardano-After-Dark>

The project aims to have a reusable state channel framework built over Redis in-memory database. As developers, system admins, and DevOps of Cardano After Dark, we will make it easy and understandable for developers to use state channels to store valuable information with consensus.

The framework should get contributors from other applications.

The framework is used by one or more dAPPs on Cardano

Please provide information on whether this proposal is a continuation of a previously funded project in Catalyst or an entirely new one.

Yes, this proposal is a continuation of F7: Cardano After Dark; We need a state channel solution for ongoing poker games and we will share the reusable state channel with the community.

This proposal will

  • Create reusable state channel infrastructure for Cardano dAPPs
  • Reduce time to go to market
  • Can be offered as a decentralized service in the following phases

Yes and no.

State channels on REDIS are required by Cardano After Dark, however, the scope of this project is completely different.

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00