First contact with Ethereum, only installed, not reasonable:
1.WIN10 system, 64-bit
2. Ethereum Wallet
3. Ethereum Geth Client
Geth and wallets can be downloaded to Ethfans.org's library, which provides a domestic mirror and an official website address.
Wallet Tool: Https://ethfans.org/wikis/Ethereum-Wallet-Mirror
Geth:https://ethfans.org/wikis/ethereum-geth-mirror
First, install Geth, select the installation directory D:\blockchain, after the installation is complete, the folder appears next to Geth.exe (note that the file path does not appear in Chinese.) It can also be installed in other directories, and then replicate Geth.exe to D:\blockchain in the year after. Do not put in the C-drive, the late run, because the system to the C-disk protection, there will be some access rights issues. )
Then create the initialization file for the Genesis block under this folder Genesis.json
The contents are as follows
{
"Config": {
"Chainid": 15,
"Homesteadblock": 0,
"Eip155block": 0,
"Eip158block": 0
},
"Difficulty": "0x400",
"Gaslimit": "0x2fefd8",
"Alloc": {
"7df9a875a174b3bc565e6424a0050ebc1b2d1d82": {"balance": "300000"},
"F41c74c9ae680c1aa78f42e5647a62f353b7bdde": {"balance": "400000"}
}
}
Complete the Genesis block configuration file and start deploying the node!
Win key + R enter cmd command line
Type D: Yes command line into D drive
Type cd blockchain into the blockchain directory of the D drive
Type geth–help to see if you can enter help information
Type Geth–datadir "%cd%\chain" Init Genesis.json to initialize the Genesis block information
Type Geth–datadir "%cd%\chain" console to open Geth consoles
In the console type Personal.newaccount (' 123.ABC ') to create a user 123.abc password for the user, customize it (the miner that the user used to start the private chain)
Type exit to exit the Geth console
Type Geth–cache 512–targetgaslimit 4294967295–rpc–rpcaddr "127.0.0.1" –rpcport "8101" –port "30301" –rpcapi "Eth,net,web" 3,personal "–networkid 2017–datadir"%cd%\chain "-rpccorsdomain" * "–mine–minerthreads 1 console start private chain node
can also be directly: Geth-datadir "Chain" console
Ps:
targetgaslimit– each block can carry gas caps, which can be temporarily understood as capacity
rpc– initiates RPC communication and can be deployed and debugged for smart contracts
Address of the Rpcaddr–rpc interface
Port number of the Rpcport–rpc interface
port– Network listening port for communication between nodes
rpcapi– set the scope of the RPC, temporarily open eth,web3,personal enough
networkid– set the network ID of the current blockchain, which is a number that can be arbitrarily written (as much as 10)
datadir– Setting the location of the current blockchain network data storage
Mine allows mine to be mined
Minerthreads the number of threads started by mining, the default is 4.
console– Start command line mode *
Type Enter
Then wait for a message similar to the following:
INFO [04-11|10:59:01] generating DAG in progress epoch=0 percentage=0 elapsed=1.780s
INFO [04-11|10:59:03] generating DAG in progress epoch=0 percentage=1 elapsed=3.717s
INFO [04-11|10:59:05] generating DAG in progress epoch=0 percentage=2 elapsed=5.650s
INFO [04-11|10:59:07] generating DAG in progress epoch=0 percentage=3 elapsed=7.580s
It turns out that the creation of the Genesis block, and the DAG, will start digging after the progress is up to 100%.
========================================================
Open the Ethwallet folder and run Ethereum-wallet.exe
Ethereum-wallet.exe There may be a timeout failure, we specify a native RPC
"C:\Program files\ethereum-wallet\ethereum Wallet.exe"--rpc "\\.\PIPE\GETH.IPC" (I installed the C drive, with Administrator privileges)
The following window appears
If "Private-net" appears in the upper-right corner, it proves that the wallet client is connected to our private node.
Click "LAUNCH Application"
Go to the Wallet homepage
As follows
Since mining is more CPU-intensive, open the console at this point
Type Miner.stop () to stop mining. Do not care about the output of the brush screen, just enter the completion after the return, if the input is correct, the return will output "true".
Type Miner.start (1) Use a CPU to mine and reduce the consumption of computer performance.
Below we go to the next link, trading
Because we have only one user now, no way to trade normally, so now the main page click "ADD Account" to create another user, follow the steps to enter the password, confirm the password, the creation of the user work is completed.
Click "ACCOUNT2" to enter the Account Details page to copy the user's address
When copying, the prompt "Warning:you is on the Test Network" appears. Be careful not to transfer real funds to the this account. ". Do not ignore him, click OK.
Then click "Send" on the Wallet interface to enter the trading interface
Click "from" below the input field, select the trader's initiator, we choose "Main account", because currently only his accounts have the etheric currency. The input field below "to" we enter the address of the "ACCOUNT2" that we just copied. "AMOUNT" Enter the number of etheric coins for this minor transaction, taking 10 as an example. Enter 10. Other places do not care, we drag the scroll bar to the bottom, the bottom left there is a "SEND" button, click. Pop up the following window
Enter the password for the master account in the input field and click "Send TRANSACTION" to send the transaction.
The page will automatically jump to the transfer page. Let's roll the scroll bar to the bottom.
We can see the deals we just started from the main account like "ACCOUNT2".
Well, in that case, a private chain is done. Also carried out a simple transaction. Long March's first step was taken. Don't feel too much trouble, because all the follow-up is more troublesome than this.
The subsequent build of the Linux environment, as well as the smart contract I will slowly update. I hope we all learn together and make progress together.
Yes, in order to facilitate the follow-up, we can command Geth–cache 512–targetgaslimit 4294967295–rpc–rpcaddr "127.0.0.1" –rpcport "8101" –port "30301" –rpc API "Eth,net,web3,personal" –networkid 2017–datadir "%cd%\chain"-rpccorsdomain "*" –mine–minerthreads 1 console saved as a. b The at suffix of the batch file. Place the directory where the Geth resides. To start later, double-click the batch file.
Ethereum-windows-Private Chain-build (non-source)