current position：Home>Experience - deploy Ethereum private chain (POA)
Experience - deploy Ethereum private chain (POA)
2022-02-03 05:28:13 【Brick moving leader】
Deploy a set of Ethereum private chain locally , Use... For the alliance chain PoA Consensus
If you use the default PoW Consensus , Look at this article : Experience - Deploy Ethereum private chain (PoW)
stay poa Create three folders under the directory , Namely bootdir,node1,node2 Three folders .
mkdir poa cd poa mkdir bootdir node1 node2
stay bootdir Create in folder bootnode Nodes are used to do p2p Network routing .
./bootnode --genkey boot.key # Create a boot.key Of key file . ./bootnode --nodekey boot.key # start-up bootnode Routing node . # The echo message is as follows , After the start node You'll use UDP listener up self=enode://bde0739c7d9f213054575574d6e8e1df21147066a666bc939f29634dac947ad5c[email protected][::]:30301 # perhaps Background operation nohup bootnode -nodekey boot.key -verbosity 9 -addr :30301 2>> bootnode_output.log &
stay node1 node2 Create an account under the directory ( password 123456)
./geth account new 0xbac5564cc4f7528ebb6150270ee63b3fa1641b17 0x8a6673dc85e544bce6d4876f63cfcdc4e5c8cc08
puppeth To produce the creation document . puppeth yes geth The program that comes with it , You can guide users to create geth The document of creation .
function puppeth stay poa Directory generation genesis.json file
puppeth # Then you need to interact +-----------------------------------------------------------+ | Welcome to puppeth, your Ethereum private network manager | | | | This tool lets you create a new Ethereum network down to | | the genesis block, bootnodes, miners and ethstats servers | | without the hassle that it would normally entail. | | | | Puppeth uses SSH to dial in to remote servers, and builds | | its network components out of Docker containers using the | | docker-compose toolset. | +-----------------------------------------------------------+ Please specify a network name to administer (no spaces or hyphens, please) > poa Sweet, you can set this via --network=poa next time! INFO [06-23|17:10:34] Administering Ethereum network name=poa INFO [06-23|17:10:34] No remote machines to gather stats from What would you like to do? (default = stats) 1. Show network stats 2. Configure new genesis 3. Track new remote server 4. Deploy network components > 2 Which consensus engine to use? (default = clique) 1. Ethash - proof-of-work 2. Clique - proof-of-authority > 2 How many seconds should blocks take? (default = 15) > 2 Which accounts are allowed to seal? (mandatory at least one) > 0xd71ad920f80e6a1e06689a720f24b335f22d557e > 0x8bbc43acd355be0cecc61872e13e0a0e53c700b7 > 0x Which accounts should be pre-funded? (advisable at least one) > 0x0xd71ad920f80e6a1e06689a720f24b335f22d557e ERROR[06-23|17:11:33] Invalid address length, please retry > 0xd71ad920f80e6a1e06689a720f24b335f22d557e > 0x Specify your chain/network ID if you want an explicit one (default = random) > 1500 INFO [06-23|17:12:05] Configured new genesis block What would you like to do? (default = stats) 1. Show network stats 2. Manage existing genesis 3. Track new remote server 4. Deploy network components > 2 1. Modify existing fork rules 2. Export genesis configuration 3. Remove genesis configuration > 2 Which file to save the genesis into? (default = poa.json) > genesis.json INFO [06-23|17:12:27] Exported existing genesis block What would you like to do? (default = stats) 1. Show network stats 2. Manage existing genesis 3. Track new remote server 4. Deploy network components > ^C
# Init node1 & node2 echo "Init node1 & node2." geth --datadir node1 init genesis.json geth --datadir node2 init genesis.json sleep 1s # Startup node1 echo "Startup node1." nohup geth --datadir node1/ --syncmode 'full' --port 30311 --rpc --rpcaddr 0.0.0.0 --rpcport 8501 \ --rpcapi 'personal,db,eth,net,web3,txpool,miner' --rpccorsdomain "*" --ws --wsaddr 0.0.0.0 --wsport 8601 --wsapi 'personal,db,eth,net,web3,txpool,miner' --wsorigins "*" \ --bootnodes 'enode://bde0739c7d9f213054575574d6e8e1df21147066a666bc939f29634dac947ad5c[email protected]127.0.0.1:30301' \ --networkid 1515 --gasprice '1' -unlock '0xbac5564cc4f7528ebb6150270ee63b3fa1641b17' --password node1/password.txt --mine \ 2>>node1/eth_output.log & sleep 1s # Startup node2 echo "Startup node2." nohup geth --datadir node2/ --syncmode 'full' --port 30312 --rpc --rpcaddr 'localhost' --rpcport 8502 \ --rpcapi 'personal,db,eth,net,web3,txpool,miner' --ws --wsaddr 0.0.0.0 --wsport 8602 --wsapi 'personal,db,eth,net,web3,txpool,miner' --wsorigins "*" \ --bootnodes 'enode://bde0739c7d9f213054575574d6e8e1df21147066a666bc939f29634dac947ad5c[email protected]127.0.0.1:30301' \ --networkid 1515 --gasprice '1' -unlock '0x8a6673dc85e544bce6d4876f63cfcdc4e5c8cc08' --password node2/password.txt --mine \ 2>>node2/eth_output.log & # Jobs command # jobs # kill %1 # kill %2 # kill %3
（1） When starting node mining , Need to wear a sign –syncmode “full”, Otherwise, report errors ：
Clique : Discarded bad propagated block #1 when syncing
（2） When starting node mining , You need to bring it with you at startup --unlock “ account number ”, Otherwise, mining failure will be reported after mining for a certain time , Error that needs to be unlocked .
author[Brick moving leader],Please bring the original link to reprint, thank you.
The sidebar is recommended
- A blockchain instance analysis based on POS consensus algorithm (upgraded version)
- three. JS imitates the blockchain to realize the interconnection of multiple small balls
- Look at what blockchain is. Don't be cheated again
- Basic meaning of blockchain
- A brief introduction to the basic concepts, principles, characteristics and application scenarios of blockchain
- Blockchain note 1: what is the significance of bitcoin?
- Entering the meta universe, where is the so-called opportunity?
- Blockchain game development and deployment
- Blockchain farm game development source code
- Intensive reading of MESARI cryptocurrency annual report (Part I)
guess what you like
Accessing blockchain data from scrypt smart contract (2)
A malicious kmspico installer can steal your cryptocurrency wallet
How should blockchain be applied in the logistics industry?
What does blockchain change mean
Cattle herding blockchain, blockchain technology changes production relations
5g private network + blockchain: building the "cornerstone of security and trust" of smart government
[blockchain Apocalypse: Nakamoto collection] II: working principle of bitcoin (Part 2)
[blockchain Apocalypse: Nakamoto collection] I: preface | working principle of bitcoin (Part I)
Circle and endaoment will create a usdc based disaster relief fund for communities affected by deadly tornadoes
HSBC Group and IBM successfully created multi ledger CBDC demonstration
- Bloomberg 2022 encryption Outlook: the United States may accept cryptocurrency next year
- Curtis sword (CSC), the first 3D chain game of the concept of meta universe, will be launched soon
- Defi Criticism: in addition to more speculation, it is also an amplifier of greed and fear
- 5g private network + blockchain: building the "cornerstone of security and trust" of smart government
- US media: another huge theft of cryptocurrency was exposed, and hackers stole nearly $200 million
- The chief economist of the International Monetary Fund stressed the "global policy demand" of crypto regulation
- Is NFT music an untapped opportunity?
- The 2nd edition of 1 inch price limit order agreement was officially released
- Decentralized Oracle adameral blockchain data interaction Middleware
- Coinbase releases the vision of metauniverse, or will become Facebook of the early Internet
- Aofex exchange was investigated by the police, and the cryptocurrency exchange retreated into the countdown
- Blockchain talent shortage, world chain job effectively improves the matching rate of people and posts
- DAPP Industry Report in 2021: daily living addresses exceeded 2.7 million, and NFT trading volume exceeded US $23 billion
- Happy bitcoin bear market day: three years have passed since BTC bottomed at $3100
- Teach you how to use Nansen to play NFT
- Win10 uses geth client to build Ethereum private chain
- "Balcony, blockchain and robot" modern automobile thinks about the future with art
- Mars weekly | NBA star Durant became the spokesperson of coinbase brand; Solana launched $150 million chain game fund
- First class position: in depth interpretation of decentralized trading platform Bancor
- The current situation of Dao: investigating Dao ecology from community construction, governance and world integration under the chain
- Technology weekly · why is Web3 related to blockchain
- Blockchain mainstream consensus mechanism
- Technical magic of blockchain
- Decentralized Oracle adameral blockchain data interaction Middleware
- Is it difficult to settle claims in hospital? Blockchain technology realizes "report upon hospitalization and compensation upon discharge"
- Implement the national standardization development outline and put the blockchain on a standardized path
- Understand pledge as service: opportunities and risks, current situation and future
- Talk about Web3 Decentralized work: will the Internet create human prosperity?
- Vitalik: how to improve the transaction anti censorship of the block proposer's scheme
- [Hackathon] BSV programming marathon champion plan to build a dynamic bitcoin network
- Research Report on Solana: practical applications, advantages and challenges
- A hundred flowers bloom in application, presenting the five pole pattern of North Zhejiang, Jiangsu, Shanghai and Guangdong - industrial application of China's blockchain industry development report in 2021
- Popular science article ｜ can Ethereum and Boca use the same address? Moonbeam "unified account" helps you achieve
- Bloomberg 2022 encryption Outlook: the "fate" of bitcoin, Ethereum and encrypted dollar
- Sailian blockchain education provides block chain technology training for Weichai Power
- Sailian blockchain Education: does the school district blockchain have a future?
- Is the development of school district block chain promising?
- Sailian blockchain education was invited to give a training lecture on blockchain technology in Shandong science and engineering district
- School district block chain technology, what do you learn? Blockchain training institutions or self-study?
- What exactly does blockchain learning learn? Do you need to go to blockchain training institutions?