Introduction to Proof-of-Authority (PoA) Chains
When should you create your own PoA test chain?
- For corporate intranets or isolated networks where blockchain synchronization is impossible
- To reduce block confirmation times during testing
- To avoid compatibility issues with test networks like testrpc
Key characteristics of PoA chains:
- Unlike Proof-of-Work (PoW) that requires computational puzzles, PoA relies on pre-approved Authority nodes to generate blocks
- Flexible configuration of Authority node quantities
- Customizable block generation intervals (e.g., 5 seconds after transaction receipt)
- Compatible with standard Ethereum nodes for transactions and smart contracts
Getting Started with Parity Wallet
Installation Guide
- Download Parity Ethereum Client:
Official website: Parity Ethereum
Latest release: GitHub v2.2.9 Ubuntu Installation:
# Install Linuxbrew ruby -e "$(wget -O- https://raw.github.com/Homebrew/linuxbrew/go/install)" apt install linuxbrew-wrapper # Add Parity repository brew tap paritytech/paritytech # Install latest stable version brew install parity --stable
Configuring Your Consortium Chain
Genesis Block Specification
Create demo-spec.json with this template:
{
"name": "DemoPoA",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "5",
"validators": {
"list": []
}
}
}
},
"params": {
"gasLimitBoundDivisor": "0x0400",
"networkID": "0x2323"
},
"genesis": {
"difficulty": "0x20000",
"gasLimit": "0x5B8D80"
}
}Key parameters:
stepDuration: 5-second block intervalsvalidators: Initially empty (to be populated later)
Node Configuration Files
Node 0 (node0.toml):
[parity]
chain = "demo-spec.json"
base_path = "parity0"
[network]
port = 30300
[rpc]
port = 8540
apis = ["web3", "eth", "net", "personal", "parity"]Node 1 (node1.toml):
[parity]
chain = "demo-spec.json"
base_path = "parity1"
[network]
port = 30301
[rpc]
port = 8541
apis = ["web3", "eth", "net", "personal", "parity"]๐ Explore advanced node configuration options
Account Setup and Network Deployment
Creating Authority Accounts
Initialize accounts through Parity UI:
- Access Node 0 at
http://localhost:8180 - Create Authority account with passphrase "node0"
- Create user account with initial balance
- Access Node 0 at
Update
demo-spec.json:"validators": { "list": [ "0x00Bd138...77C9e", "0x00F9B30...b180" ] }, "accounts": { "0x0064B09...3EcC": { "balance": "10000000000000000000000" } }
Launching Authority Nodes
Add mining configuration to TOML files:
[account]
password = ["node.pwds"]
[mining]
engine_signer = "0x00Bd138...77C9e" # Authority address
reseal_on_txs = "none"Start nodes with:
parity --config node0.toml
parity --config node1.tomlNetwork Operations and Transactions
Connecting Nodes
Retrieve Node 0's enode:
{"method":"parity_enode","params":[]}Connect from Node 1:
{"method":"parity_addReservedPeer","params":["enode://...@IP:30300"]}
Sending Test Transactions
Use the user account (funded with 10,000 ETH) to:
- Transfer between accounts
- Deploy test contracts
- Verify block generation timing
๐ Learn about consortium chain use cases
FAQ Section
Q1: What's the difference between PoA and private chains?
A: PoA chains use designated validators instead of mining, offering faster block times and deterministic finality.
Q2: How many Authority nodes are recommended?
A: For testing, 2-3 nodes suffice. Production environments typically use 7-15 for fault tolerance.
Q3: Can I connect MetaMask to my PoA chain?
A: Yes, configure MetaMask with your node's RPC endpoint (e.g., http://localhost:8540).
Q4: How do I add more nodes later?
A: Update the validators list in demo-spec.json and restart all nodes with the new configuration.
Q5: What's the gas price on PoA chains?
A: Typically set to 0 or minimal values since there's no mining competition.
Q6: How do I monitor node performance?
A: Use Parity's built-in UI or tools like Grafana with the trace API enabled.