Private Chain Construction
Prepare an Account
Access the working directory /directory/of/geth
The keystore
file of the new account is located under the path/directory/of/dxc/build/bin/data/keystore
.
Import the JSON file in Metamask.
Create genesis.json
Create gensis.json file under
/path/to/dxc/build/bin/
Change
chainId
to 72Replace the initial address in
extraData
with your new account address
4. Set the initial balance in alloc
for the new address, at least 0x50c783eb9b5c85f2a80000000
Initialize the Genesis Block
Start the Node
pageCompile and RunStart Mining
Open the console
./geth attach --datadir ./data
Unlock miner account
personal.unlockAccount("miner address","password",0)
Start mining
miner.start()
Multi-nodes Mining
Other nodes use the same
genesis.json
initial nodesGet the enode information for the master node
admin.nodeInfo
New node
geth attach
Open the console, add the node information for master node
admin.addPeer("enode info")
Last updated