如何在局域网(LAN)搭建含13台节点电脑的区块链网络?
Hey there! Since you’ve already got hands-on experience with Hyperledger, Ethereum, and Quorum, you’re already ahead of the curve for setting up a 13-node LAN blockchain. Let’s break down the most straightforward entry points tailored to your background:
Given your existing expertise and the 13-node LAN requirement, two frameworks stand out as the easiest to scale up:
Hyperledger Fabric (Ideal for Consortium Chains)
Fabric is built exactly for multi-participant networks, so it’s a natural fit here. You can leverage your past experience to expand from small testnets to 13 nodes:
- Start with the official
test-networktemplate as a base. Modify theconfigtx.yamlto define 13 organizations (or group nodes under a few orgs if they belong to the same entity) - Use the
cryptogentool to generate TLS certificates and identity keys for each of the 13 nodes. Distribute these files to the corresponding machines over the LAN - Set up a local Docker registry on your LAN to share Fabric images, or pre-pull all required images (
hyperledger/fabric-peer,hyperledger/fabric-orderer, etc.) on each node to avoid internet dependencies - Adjust the
docker-compose.yaml(or use Fabric Operator for easier management) to map each node’s LAN IP and expose necessary ports (7051 for peer communication, 7053 for chaincode calls) - Once the orderer node is up, create a channel and use
peer channel jointo add all 13 peers. Test with a simple chaincode to verify block sync across the network
Quorum (Great for High-Performance Private Chains)
Since you’ve worked with Quorum before, scaling to 13 nodes in a LAN will feel familiar—especially if you need privacy features or high throughput:
- First, ensure every machine has Go, Quorum, and Tessera (if using private transactions) installed
- Generate node keys with
bootnode -genkey nodekeyfor each node, and create local accounts usinggeth account new - Set up a single bootnode on one of the machines; this will help all 13 nodes discover each other on the LAN
- Create a shared
genesis.jsonfile with IBFT 2.0 consensus (perfect for 13-node Byzantine fault tolerance) and list all 13 nodes as validators - Launch each node with a command like:
geth --datadir data --networkid 12345 --bootnodes enode://<bootnode-enode-url> --syncmode full --mine --miner.threads 1 --http --http.addr <local-lan-ip> --http.corsdomain "*" - Verify sync by checking the block height on all nodes after sending a test transaction
- Pre-Flight Connectivity Check: Make sure all 13 machines can ping each other, and that firewalls aren’t blocking ports like 7051 (Fabric), 30303 (Quorum), or the bootnode port
- Keep Configs Consistent: Every node must use the same genesis block, chain ID, and consensus parameters—even a tiny mismatch will break sync
- Test Incrementally: Don’t jump to 13 nodes right away. Start with 2-3 nodes, confirm they sync correctly, then add more one by one
- Monitor Logs: Keep an eye on node logs (e.g.,
docker logs -f peer0.org1.example.comfor Fabric,tail -f data/geth.logfor Quorum) to troubleshoot sync issues quickly
内容的提问来源于stack exchange,提问作者Rohan Khanna

