In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Construct the private chain of Etay Square
1. The environment is win10. Download the latest version of Ethereum-Wallet-win64-0-10-0.zip
Https://github.com/ethereum/mist/releases
2. Decompress to the specified directory and run Ethereum-Wallet to initialize the data. No synchronization is needed for private chain construction.
3. Initialization-related data. If the user is: administrator, it will be generated in the system directory: C:\ Users\ administror\ AppData\ Roaming\ Ethereum Wallet
C:\ Users\ heheiscool\ AppData\ Roaming\ Ethereum
Two files
4. Find the geth.exe command in this C:\ Users\ administrator\ AppData\ Roaming\ Ethereum Wallet\ binaries\ Geth\ unpacked directory
5. Configure your creation block to distinguish between public chains. Create a new creation block file genesis.json under the directory of 4 above. The creation block must be the same in the same network node group, otherwise it cannot be connected:
{
"config": {
"chainId": 10
"homesteadBlock": 0
"eip155Block": 0
"eip158Block": 0
}
"alloc": {}
"coinbase": "0x0000000000000000000000000000000000000000"
"difficulty": "0x02000000"
"extraData":
"gasLimit": "0x2fefd8"
"nonce": "0x0000000000000042"
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000"
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
"timestamp": "0x00"
}
The parameters are as follows:
Mixhash is used in conjunction with nonce for mining, a hash generated by part of the previous block. Here is the initial block noncenonce, which is a 64-bit random number, which is used for mining difficulty to set the difficulty of the current block. If it is too difficult, it is very difficult for cpu mining. Here, set a less difficult alloc to preset the account number and the number of Ethernet coins of the account. Because private chain mining is relatively easy, we do not need to preset accounts with coins. You can create them when you need them. The account number of coinbase miners, which can be used to define the hash value of a block on the time stamp of timestamp setting Genesis Block. Because it is a creation block, this value is additional information of 0extraData. You can fill in your personality information gasLimit. This value sets the limit on the total consumption of GAS, which is used to limit the sum of transaction information that blocks can contain. Because we are private chains, we fill in the largest.
6. Run the command in the directory 4:
Geth-- datadir "C:\ Users\ administrator\ AppData\ Roaming\ Ethereum\ dev" init genesis.json
Thus create a catalog and store Genesis block data.
To start the private chain, enter geth-- identity "mydev"-- datadir "C:\ Users\ administrator\ AppData\ Roaming\ Ethereum\ dev"-- networkid 1111-- rpc-- rpcapi "admin,personal,db,eth,net,web3"-- nodiscover-- rpccorsdomain "*" console
The marking of the identity block chain, which is casually filled in, is used to mark the name of the current network init specifies the location of the creation block file, and to create the initial block datadir to set the current location of the block chain network data storage port network monitoring port rpc starts rpc communication, you can deploy intelligent contracts and debug rpcapi settings to allow connected rpc clients, generally set the network ID of the current block chain for db,eth,net,web3networkid Used to distinguish between different networks, is a digital console startup command line mode, you can execute commands in Geth
Enter the relevant commands in the console, such as: personal.newAccount () to create the first wallet account.
7. Launch Ethereum Wallet wallet, and "PRIVATE-NET" appears in the upper right corner, indicating that the private chain has been started successfully.
After opening the wallet, the account created in 6 will be displayed.
8. Then start digging. Be sure to open the node wallet and get under the console:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.