Sidechains are an innovation devised to enable blockchain scalability and extensibility. The basic idea is simple yet powerful: construct parallel chains – "sidechains" – each implementing the desired features and custom business logic, rooted on a protocol that offers a way to transfer coins from and to the original mainchain and each sidechain.
Our Sidechains-SDK is a framework that supports the creation of such sidechains and their custom business logic, with the Horizen blockchain as the "mainchain". Detailed description of the concept, the protocol, and details about mainchain / sidechain interaction can be found on the Zendoo Whitepaper.
Beta features
- Cross-Chain Transfer Protocol implementation to support Sidechain Declaration, Forward Transfers, Backward Transfer requests and Withdrawal Certificates;
- Basic zk-SNARK threshold signature verification circuit to authenticate Withdrawal Certificates. For more details see zendoo-sc-cryptolib;
- Full implementation of the Latus Proof-of-Stake consensus protocol;
- Built-in transactions enabling coins transfers within the sidechain;
- HTTP API for basic node operations;
- Extensible transactions and boxes allowing the introduction of custom logic and data within the sidechain;
- Extensible node API interface;
- Command line tool to interact with the sidechain node;
- Sidechain Bootstrapping Tool to create and configure a new sidechain network;
- Graphical Wallet allowing easy sidechain creations, fordward transfers to sidechain, list of existing sidechains and more: Sphere by Horizen.
Supported platforms
Sidechains-SDK is available and tested on Linux and Windows (64bit).
Requirements
- Java 8 or newer (Java 11 recommended)
- Scala 2.12.10+
Interaction
Each node has an API server bound to the address:port
specified in a configuration file.
Also the node starts the Swagger server.
There are two ways to interact with the Node:
- Swagger web interface. Just open in your browser the path to the API server. By default it's
localhost:9085
. - Use any convenient HTTP client. For example, curl or postman.
Project structure
Project has a Maven module structure and consists of 4 modules:
- SDK - core of the Sidechains-SDK.
- ScBootstrappingTool - tool that supports the creation of a Sidechain configuration file that allows the synchronization with the mainchain network.
- Simple App - an example application, without any specific custom logic, that runs a Node, that can be either connected to the mainchain network, or isolated from it.
- Qa - Sidechain Test Framework for Sidechain testing via RPC/REST commands.
Examples You can find an example of a sidechain implementation, without any custom business logic, here: Simple App. A detailed description about how to setup and run this sidechain node with a connection to mainchain is detailed here: description.