Hedgehog
Hedgehog is the node software of the Unigrid network: one program that joins a peer-to-peer network, agrees with its peers on a small set of signed network parameters, and, in a coming release, stores files across the network so that they survive the loss of individual machines. The same executable is the network daemon, the command-line client that controls it, and a stand-alone key utility. The current release is 0.0.8, and Running Hedgehog shows how to download, check and start it.
What it does
- Peer-to-peer networking. Nodes find each other and exchange data over QUIC, an encrypted transport built on UDP. See Peer-to-peer network protocol.
- Governed network parameters. Supply, vesting and storage settings are sporks: signed records that every node verifies, and that take effect only when two board keys active now have signed them. After 0.0.8 the board keys themselves change through a signed chain of their own. See Grid sporks.
- A REST interface. A node is controlled over HTTPS, and the command-line client is built on it. See REST interface.
- A bridge from the legacy chain. Every address, balance and transaction of the legacy Unigrid chain is carried over as a signed, queryable snapshot. See Legacy chain snapshot.
- A ledger. A chain of account balances kept by a voted set of validators, where every block is signed
by more than two thirds of them. A daemon started with
--preview --ledgerruns it, taking its mints, blacklist and fees from the sporks. It is onmaster, and release 0.0.9 leaves it off like the parts below. See Ledger and Running a ledger node.
On master, not released yet
Release 0.0.8 does not have gridnodes, network storage, the S3 endpoint or the SOCKS5 proxy. They are on
master, and the next release, 0.0.9, leaves them off with the ledger: a plain daemon runs none of them and
hides their options and commands. The hidden switch daemon --preview turns them on, for development and
testing.
- Network storage. A file is encrypted on the owner’s node, cut into fragments and spread over the gridnodes. Any 8 of the 24 guaranteed fragments of a group can be lost without losing data, and the gridnodes rebuild missing fragments among themselves while the owner is offline. See Network storage and Erasure coding.
- An S3 endpoint. The Amazon S3 API over network storage, for the AWS SDKs, rclone, restic and other S3 clients. See S3 endpoint.
- A SOCKS5 proxy. A local SOCKS5 server whose TCP and UDP traffic leaves the network at a gridnode, sealed between the client and that exit. See SOCKS proxy.
Where to start
| If you want | Read |
|---|---|
| To run a node | Running Hedgehog |
| The whole picture in ten minutes | Architecture overview |
| What makes the storage durable and private | Network storage, then Erasure coding |
| To use network storage from S3 clients | S3 endpoint |
| To send traffic through the network | SOCKS proxy |
| How the network is governed | Grid sporks |
| To run a ledger node | Running a ledger node |
| To try the ledger on a network of your own | Running a private network |
| To read the ledger, send coins, claim or vote | Ledger command line |
| To talk to a node | REST interface |
| To build, test or package the code | Build, testing and native image |
| To add or change a component | CDI container and component lifecycle |
Each page is a short overview that ends with the source files to open for the detail. The reasoning
behind the network and consensus design is in the
white paper, and the storage design in
documentation/storage-white-paper/ of the Hedgehog repository.
Key facts
| Language and runtime | Java 25, also shipped as a single executable for Linux, macOS and Windows |
| Peer-to-peer port | 52883 (QUIC over UDP) |
| REST port | 52884 (HTTPS, bearer token) |
| Build | mvn clean install |
| License | GNU Affero General Public License 3, with the addendum in COPYING.addendum |