Skip to content

⚑ Hybrid-Ready Fabric Network Overview #18

@apierr

Description

@apierr

This document explains the structure of the Hyperledger Fabric network setup using a hybrid-ready BCCSP stub.
It shows how Docker Compose, Dockerfiles, and images interact. πŸš€


πŸ—Ί ASCII Diagram


╔════════════════════════════════════════════════════════════╗
β•‘                    docker-compose.yaml                     β•‘
β•‘                fabric-baseline-hybrid                      β•‘
╠════════════════════════════════════════════════════════════╣
β•‘ Defines services:                                          β•‘
β•‘   β€’ peer0_org1                                             β•‘
β•‘   β€’ orderer                                                β•‘
β•‘                                                            β•‘
β•‘ Configuration:                                             β•‘
β•‘   β€’ environment variables                                 β•‘
β•‘   β€’ volumes                                                β•‘
β•‘   β€’ ports                                                  β•‘
β•‘   β€’ network                                                β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•¦β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
                        β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚                                   β”‚
╔═════════▼════════════╗           ╔══════════▼════════════╗
β•‘  peer0_org1 service  β•‘           β•‘    orderer service    β•‘
╠═════════════════════╣           ╠═══════════════════════╣
β•‘ image:               β•‘           β•‘ image:                β•‘
β•‘   custom-fabric-peer β•‘           β•‘   hyperledger/        β•‘
β•‘   :2.5               β•‘           β•‘   fabric-orderer:2.5 β•‘
β•‘   (built locally)    β•‘           β•‘                       β•‘
β•‘                      β•‘           β•‘ environment:          β•‘
β•‘ environment:         β•‘           β•‘   β€’ CORE_ORDERER_     β•‘
β•‘   β€’ CORE_PEER_BCCSP_*β•‘           β•‘     BCCSP_*           β•‘
β•‘   β€’ CORE_PEER_BCCSP_ β•‘           β•‘                       β•‘
β•‘     DEFAULT_TYPE=    β•‘           β•‘ volumes, ports, net   β•‘
β•‘     HYBRID           β•‘           β•šβ•β•β•β•β•β•β•β•β•β•β•¦β•β•β•β•β•β•β•β•β•β•β•β•β•
β•‘                      β•‘                      β”‚
β•‘ volumes, ports, net  β•‘                      β”‚
β•šβ•β•β•β•β•β•β•β•β•β•β•¦β•β•β•β•β•β•β•β•β•β•β•β•           ╔══════════▼════════════╗
           β”‚                       β•‘   Official Image      β•‘
╔══════════▼═══════════╗           β•‘ fabric-orderer:2.5   β•‘
β•‘   Dockerfile.peer    β•‘           β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
╠═════════════════════╣
β•‘ FROM fabric-peer:2.5 β•‘
β•‘ COPY bccsp/hybrid/   β•‘
β•‘ make peer            β•‘
β•‘ ENTRYPOINT peer      β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•



πŸ“– Explanation

1️⃣ Docker Compose YAML

  • Orchestrates all containers in the network. πŸ› 
  • Uses already available images for standard services, e.g., the orderer. βœ…
  • Specifies environment variables, volumes, ports, and networks. 🌐

2️⃣ Peer Custom Image

  • The peer0_org1 container uses a custom-built image with the HYBRID BCCSP stub. 🧩
  • The Dockerfile (Dockerfile.peer) starts from the official Fabric peer image and adds the stub code. ✨
  • Environment variable CORE_PEER_BCCSP_DEFAULT_TYPE=HYBRID instructs the peer to use the HYBRID provider. πŸ”‘
  • Currently, the stub delegates all cryptographic operations to ECDSA (SW). πŸ”’

3️⃣ Orderer

  • The orderer container uses the official image hyperledger/fabric-orderer:2.5. πŸ›
  • It is also configured hybrid-ready via environment variables but still uses ECDSA. βš™οΈ

4️⃣ Workflow

  1. Docker Compose reads the YAML and starts the containers. ▢️
  2. Peer0_org1 starts using the custom image that includes the HYBRID stub. 🟒
  3. Orderer starts using the official image with hybrid-ready config. 🟒
  4. The network works as usual with ECDSA, ready for future Post-Quantum integration. πŸ•’

This setup allows a gradual approach:

  • Start with a functioning ECDSA network. βœ…
  • Introduce a hybrid BCCSP stub in the peer. 🧩
  • Add Post-Quantum cryptography later without changing the network orchestration. ⚑

If you want, I can also highlight the β€œfuture PQC steps” directly in the ASCII diagram with emojis, so it’s visually clear where the upgrade will occur. Do you want me to do that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions