Network Management
This guide covers creating, managing, and monitoring blockchain networks in ChainLaunch.
Overview
ChainLaunch supports two main blockchain platforms:
- Hyperledger Fabric - Permissioned consortium blockchains with channels and chaincodes
- Hyperledger Besu - Ethereum-compatible networks with smart contracts
Networks are managed through platform-specific endpoints: /networks/fabric and /networks/besu. There is no generic /networks endpoint.
Network Lifecycle
Created → Initialized → Running → Stopped → Deleted
Network States
| State | Description | Actions Available |
|---|---|---|
| Created | Network genesis generated, nodes not yet deployed | Deploy nodes, configure, delete |
| Running | Nodes are operational and producing blocks | Monitor, add/remove nodes |
| Stopped | Nodes have been shut down | Start nodes, delete, backup |
| Error | Network has encountered issues | View logs, restart nodes, diagnose |
Creating Networks
Hyperledger Fabric Networks
Fabric networks are consortium blockchains with organizations, peers, orderers, and channels.
Key Components:
- Organizations - Business entities with admin certificates
- Orderers - Consensus nodes (Raft)
- Peers - Endorsers, committers, state database maintainers
- Channels - Isolated ledgers with specific members (a Fabric network in ChainLaunch represents a channel)
Create via UI:
- Go to Networks → Create Network
- Select Fabric
- Configure organizations, peers, and orderers
- Set channel policies
- Click Create
Via API:
curl -X POST http://localhost:8100/api/v1/networks/fabric \
-u admin:password \
-H "Content-Type: application/json" \
-d '{
"name": "fabric-network",
"channelName": "mychannel"
}'
Hyperledger Besu Networks
Besu networks are Ethereum-compatible with validators, bootnodes, and smart contracts.
Key Components:
- Validators - Consensus participants
- Bootnodes - Peer discovery nodes
- Consensus - IBFT 2.0, QBFT, Clique
- Smart Contracts - EVM-based applications
Create via UI:
- Go to Networks → Create Network
- Select Besu
- Choose consensus mechanism
- Configure genesis parameters
- Click Create
Via API:
curl -X POST http://localhost:8100/api/v1/networks/besu \
-u admin:password \
-H "Content-Type: application/json" \
-d '{
"name": "besu-network"
}'
See Create a Besu Network for detailed steps.
Importing Networks
Import existing networks without recreating them:
Import Fabric Network:
curl -X POST http://localhost:8100/api/v1/networks/fabric/import \
-u admin:password \
-H "Content-Type: application/json" \
-d '{
"name": "imported-fabric-network"
}'
Import Besu Network:
curl -X POST http://localhost:8100/api/v1/networks/besu/import \
-u admin:password \
-H "Content-Type: application/json" \
-d '{
"name": "imported-besu-network"
}'
Managing Nodes
Add Nodes to Fabric Network
Via API:
curl -X POST http://localhost:8100/api/v1/networks/fabric/1/nodes \
-u admin:password \
-H "Content-Type: application/json" \
-d '{
"name": "peer-0",
"nodeType": "FABRIC_PEER"
}'
Start/Stop Nodes
Node lifecycle is managed per-node, not per-network.
Start a node:
curl -X POST http://localhost:8100/api/v1/nodes/1/start \
-u admin:password
Stop a node:
curl -X POST http://localhost:8100/api/v1/nodes/1/stop \
-u admin:password
Restart a node:
curl -X POST http://localhost:8100/api/v1/nodes/1/restart \
-u admin:password
Remove Nodes
curl -X DELETE http://localhost:8100/api/v1/nodes/1 \
-u admin:password
Monitoring Networks
View Network Status
Via UI:
- Go to Networks
- Select network to view status
- View node count, block height, peer connections
Via API (Fabric):
curl -u admin:password http://localhost:8100/api/v1/networks/fabric/1
Via API (Besu):
curl -u admin:password http://localhost:8100/api/v1/networks/besu/1
View Network Map
See a visual map of network topology:
Fabric:
curl -u admin:password http://localhost:8100/api/v1/networks/fabric/1/map
Besu:
curl -u admin:password http://localhost:8100/api/v1/networks/besu/1/map
View Node Logs
Stream logs via WebSocket:
# WebSocket connection
ws://localhost:8100/api/v1/nodes/1/logs
View Node Events
curl -u admin:password http://localhost:8100/api/v1/nodes/1/events
Fabric-Specific Management
Manage Organizations
Create organization:
curl -X POST http://localhost:8100/api/v1/organizations \
-u admin:password \
-H "Content-Type: application/json" \
-d '{
"name": "org1",
"mspId": "Org1MSP"
}'
Join Peers and Orderers to Channels
In ChainLaunch, a Fabric network represents a channel. Join peers and orderers to the network's channel:
Join peer to channel:
curl -X POST http://localhost:8100/api/v1/networks/fabric/1/peers/1/join \
-u admin:password
Join orderer to channel:
curl -X POST http://localhost:8100/api/v1/networks/fabric/1/orderers/1/join \
-u admin:password
Set Anchor Peers
curl -X POST http://localhost:8100/api/v1/networks/fabric/1/anchor-peers \
-u admin:password \
-H "Content-Type: application/json" \
-d '{}'
View Channel Info
Get channel configuration:
curl -u admin:password http://localhost:8100/api/v1/networks/fabric/1/channel-config
Get network info:
curl -u admin:password http://localhost:8100/api/v1/networks/fabric/1/info
Browse Blocks and Transactions
List blocks:
curl -u admin:password http://localhost:8100/api/v1/networks/fabric/1/blocks
Get specific block:
curl -u admin:password http://localhost:8100/api/v1/networks/fabric/1/blocks/5
Get transaction:
curl -u admin:password http://localhost:8100/api/v1/networks/fabric/1/transactions/txid123
Deploy Chaincodes
See Deploy Chaincode for detailed steps.
Besu-Specific Management
View Besu Network Nodes
curl -u admin:password http://localhost:8100/api/v1/networks/besu/1/nodes
Deploy Smart Contracts
curl -X POST http://localhost:8100/api/v1/sc/besu/deploy \
-u admin:password \
-H "Content-Type: application/json" \
-d '{}'
Backup & Recovery
Create a Backup
curl -X POST http://localhost:8100/api/v1/backups \
-u admin:password \
-H "Content-Type: application/json" \
-d '{
"targetId": 1,
"nodeId": 1
}'
Restore Network
See Backup & Recovery for detailed steps.
Troubleshooting
Network Not Producing Blocks
- Check all nodes are running
- Verify network connectivity between nodes
- Check node logs for errors
- Verify consensus parameters (especially for Besu IBFT)
See Troubleshooting Guide for more solutions.
Best Practices
1. Use Descriptive Names
GOOD: production-fabric-network, dev-besu-testnet
BAD: network1, network2
2. Version Your Networks
GOOD: fabric-v2.5-prod, besu-clique-v1.10
BAD: fabric-latest, besu-main
3. Monitor Regularly
- Check node health daily
- Review metrics weekly
- Archive audit logs monthly
- Test backups quarterly
4. Plan Capacity
- Estimate storage: ~100MB per 1000 blocks for Fabric
- Monitor CPU/memory per node
- Plan for network growth
5. Document Configuration
- Keep genesis files in version control
- Document channel policies
- Document validator set changes
- Maintain runbooks for operations