Main Fabric Network (peerpay-fabric)¶
The peerpay-fabric repository is the backbone of the PeerPay blockchain ecosystem. It contains the primary Hyperledger Fabric network configuration, smart contracts (chaincodes), and the automated deployment scripts required to launch and maintain the core blockchain infrastructure.
At a Glance¶
| Property | Value |
|---|---|
| Role | Core ledger plane (orderer, peers, CAs, channels, chaincodes) |
| Stack | Hyperledger Fabric 2.x, Docker Compose, Make |
| Default channels | bankloan-channel, p2p-channel, mychannel |
| Default chaincodes | bankloan, p2ptransfer |
| Typical orderer endpoint | orderer.example.com:7050 |
| Typical peer endpoint | peer0.org1.example.com:7051 |
| Typical CA endpoint | ca.org1.example.com:7054 |
Purpose¶
This repository is responsible for:
- Initializing the genesis block and the primary Orderer node (
orderer.example.com). - Launching the primary organisation peers (e.g.
org1,org2). - Setting up the Certificate Authorities (CAs) used for identity management and securing the network with mutual TLS (mTLS).
- Deploying the initial channels:
bankloan-channel,p2p-channel, andmychannel. - Managing and deploying the system's chaincodes (
bankloanandp2ptransfer).
Prerequisites¶
- Docker and Docker Compose v2
- GNU Make
- Sufficient open ports for orderer (
7050), peers (7051,9051, …) and CAs (7054,8054, …) - A clean state directory if you are rebuilding from scratch (the
make teardown-and-setuptarget handles this for you)
How It Runs Independently¶
The Main Fabric Network is fully containerised and driven by make targets. It does not depend on any other PeerPay service — it is the root of the network that everything else connects to.
To launch the network from scratch:
make setup
# If make setup fails (for example because there is leftover state):
make teardown-and-setup
This single command starts the network, generates certificates, creates channels, deploys chaincodes, and seeds the initial ledger state.
For day-to-day operations:
| Command | What it does |
|---|---|
make up |
Start the network using existing crypto |
make down |
Stop the network without deleting volumes |
make restart |
Restart all containers |
make logs |
Tail logs from orderer and peers |
make teardown |
Remove containers, volumes, and crypto state |
Communication¶
- Internal node communication — orderers and peers talk over gRPC. Peers broadcast transactions and block updates using Fabric's Gossip protocol.
- Inbound from the API — the Fabric SaaS API connects via the Fabric Node SDK on the standard ports (orderer
7050, peer7051, CA7054). - External integration — when a remote enterprise peer or a secondary orderer joins, it connects directly to the exposed gRPC endpoints of this network using cryptographic material generated by this network's CAs.