Kuber greatly simplifis interaction with hydra. Transaction building Apis share same interface for both layer1 and layer2
- ✅ Passing on v4.0.0
Here we prepare the devnet configuration for bootstrapping a local cardano node. Devnet runs as a single node cluster and greatly simplifies local testing
cd devnet
./reset-cluster.sh # creates new cluster, resets cluster to fresh state if already running
docker compose psYou can now start developing
Navigate to the kuber-hydra directory:
cd kuber-hydra/devnetAfter you are in /kuber-hydra/devnet
bash setup-devnet.shsetup-devnet.sh cleans the runtime directory and puts the current time in genesis-shelly and genesis-byron.
Next getting up the cardano node running.
docker compose up -d cardano-nodeTo verify the cardano node is running
docker compose logs cardano-node -fAfter that we need to generate the credentials for each participant.This contains hydras signing key , verification keys and cardano verification and signing keys.
bash generate-credentials.shNext we need to fund alice,bob,carol some utxos for committing and for paying fees.
bash seed-devnet.shIt used the cardano-cli that is within the already running cardano-node container.
docker compose up -d hydra-node-{1,2,3}See logs or docker ps for seeing if their ports are active and listening.
docker ps
docker compose logs hydra-node-1After hydra-nodes and cardano node are up and runnig next step is to start kuber-hydra.
Start the services:
bash docker-compose up -d kuber-hydra-{1,2,3}
Verify services are running:
bash docker-compose ps
Ensure all services are up and healthy.
Access the Kuber-Hydra Relay API:
The API will be accessible at http://localhost:8081.
Test : http://localhost:8082/hydra/query/head .
To run kuber-hydra with cabal, you need to set the required environment variables and then run the application.
export CARDANO_NODE_SOCKET_PATH=/path/to/cardano-node/preview/node.socket
export NETWORK=preview
cd kuber-hydra
cabal run kuber-hydra -- --hydra-url ws://172.16.238.10:4001 --port 8081CARDANO_NODE_SOCKET_PATH: The path to your Cardano node socket.NETWORK: The Cardano network ID (e.g.,mainnet,preview,preprod, or anetwork_magicnumber). This is a required environment variable.--hydra-url: The WebSocket URL of your Hydra node. This is a required command-line argument.--port: The port for the Kuber-Hydra relay server. If not specified, it defaults to8081.