Skip to content

Hydrozoa is a brand new Cardano L2 state channel, proudly funded by Catalyst Fund 12 - https://milestones.projectcatalyst.io/projects/1200059/milestones

License

Notifications You must be signed in to change notification settings

fernweh0/hydrozoa

 
 

Repository files navigation

Hydrozoa

State channel L2 for Cardano

Getting Started

Depending on your preferences, consider the following options:

  • Play with Hydrozoa network running it locally => goto demo
  • Build and read the latest specification => goto specification
  • Download a pre-built spec
  • Join discussions on GH => goto discussion
  • Start hacking by picking up an issue => goto issues: help wanted

Developer's Guide

Prerequisites

You'll need Java JDK 21+, scala-cli or sbt of proper versions. The preferred way is to use Nix. Install a fresh version of the Nix package manager and run nix develop to drill into a dev-shell with all the dependencies needed.

Setting up IntelliJ IDEA

File -> New -> Project from Existing Sources -> select the project directory -> Import project from external model -> BSP -> Sbt

Building with sbt

Run sbt to enter the sbt shell.

Run compile to compile the project.

Run test to run the tests.

Running

Private Network

Currently, Hydrozoa works against a private network backed with Yaci DevKit. Here is the link to the installation page.

Enter devkit's CLI, create the node, and run it:

devkit start
> create-node -o
> start

Resetting the local Cardano node

If you need to reset the local testnet, run this command (in the devkit shell):

reset

Running Hydrozoa Network

If you use IDEA, check out configurations in .run folder.

Otherwise:

  • Main class: hydrozoa.HydrozoaNode
  • CLI arguments:
    • Alice: Alice 8093 9400
    • Bob: Bob 8094 9401
    • Carol: Carol 8095 9402

Testing

In addition to unit tests in the main codebase, there is also integration project which contains several test suites, including a model-based test suite. For now, these test suites need to be updated, please refer to issue #111.

Note on terminology

In an attempt to minimise potential confusion coming from the use of the word "reference" as an identifier of a utxo and for a utxo that a transaction accesses in a read-only manner we use the following terms:

TxId = tx hash
TxIx = tx output index
UtxoId = (TxId, TxIx) // AKA OutputReference
UtxoSet = Map UtxoId Utxo
Utxo = (UtxoId, Output)
Output = Output (i.e. address, value, datum, script)
inputIds :: Set UtxoId = output references of the transaction's inputs
refInputIds :: Set UtxoId = output reference of the transaction's reference inputs

Build the specification

Build this project's PDF specification from the LaTeX files in the specification subdirectory.

Please ensure that nix is installed in your system and flakes are enabled.

Build in one step:

make spec

Clean all files generated by make spec:

make spec-clean

Find more instructions on working with the spec in specification/README.md file.

About

Hydrozoa is a brand new Cardano L2 state channel, proudly funded by Catalyst Fund 12 - https://milestones.projectcatalyst.io/projects/1200059/milestones

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 72.7%
  • TeX 26.6%
  • Other 0.7%