0x00 Summary
Block is the basic structure of block chain, is also the carrier of trading information, miners through the form of mining to generate new blocks and get rewards, the new block process is also a transaction packaging process, only to join the block in the transaction will be recognized by all other nodes of the system, is effective. 0x01 Cblockheader
/** * Nodes in the network are constantly collecting new transactions, then a Merkle tree is packaged into a block, the process of pa
NsubsidyhalvInginterval = 210000; 115 116//Build the Genesis block. Note that theoutput of the Genesis Coinbase cannot 117//is spent as it did not originally the database. 118//119//Cblock (Hash=000000000019d6, ver=1,hashprevblock=00000000000000, HASHMERKLEROOT=4A5E1E, ntime=1231006505, NBITS=1D00FFFF, nnonce=2083236893,vtx=1) 120//CTransaction (HASH=4A5E1E, ver=1,vin.size=1, Vout.size=1, nlocktime=0) 121//CTxIn (COutPoint (000000,-1), coinbase04ffff
chapter explains: The actual combat to build a private network.
In this chapter we will combat how to use Geth, how to build ethereum private network.
Previously said Geth is one of three tools to implement the Ethereum protocol, as Geth is officially respected and personal Energy Limited, for the other two tools to build a private network, please refer to the online information.The following Geth actual combat, implemented on the MacBook, for Windows, the comparison is similar.
Step 1: Create
Today, we built a private chain and dug and transferred funds, made a simple record, and wrote a detailed tutorial tomorrow.
1, mkdir Private-geth
CD Private-geth
Create a new TXT within the folder and enter the following code:
{"Coinbase": "0x0000000000000000000000000000000000000000","Config": {"Homesteadblock": 5},"Difficulty": "0x20000","Extradata": "0x","Gaslimit": "0x2fefd8","Mixhash": "0x00000000000000000000000000000000000000647572616c6578736564
Knowing these nouns is a good place to start: Public key cryptography System. Alice has a public key and a private key. She can create a digital signature with her private key, and Bob can use her public key to verify that the signature was actually created with Alice's private key, that is, Alice's signature. When you create a digital currency or Bitcoin wallet, that long 0xdf ... The 5f address is essentially a public key, and the corresponding private key is saved somewhere. An online wall
SOURCE Package Path: github.com/ethereum/go-ethereum/consensus/
The definition of the consensus algorithm engine interface is as follows
Type Engine Interface {//Author retrieves the Ethereum address of the account that minted the given//block, which
May was different from the header ' s coinbase if a consensus//engine was based on signatures. author (header *types. Header) (Common. Address, error)//Verifyheader checks whether a header conforms to the
transaction. Each txin is associated to a witness field. The witness field starts with Var_int, and the Var_int value represents the number of stacks that the txin needs to occupy, followed by the stack's member values. Each stack member begins with Var_int. Witness data is not a script or a 520-byte compression stack limit. A non-witness txin must be associated with an empty witness field, represented as 0x00. If all txin do not have a witness program, then the transaction must be serialized
and public key is compressed information, the early virtual currency developers did not know that the generated public key can be compressed, The compressed public key has only 33 bytes, and the uncompressed public key has 65 bytes. The compressed public key is more meaningful to the virtual currency, because the virtual currency is a centralized, peer-to-coinbase crypto currency, each node will have a complete transaction record, each transaction wi
easier to get started with Ethereum, smart contracts, and build dapps (decentralized apps, distributed applications). I will try to explain in my own (still novice) understanding what each step of the workflow is doing, and I get a lot of help from Consensys's cool developers. Basic Concepts
Knowing these nouns is a good place to start:
Public key cryptography System. Alice has a public key and a private key. She can create a digital signature with her private key, and Bob can use her public ke
Ppa:ethereum/ethereum-dev
After that, just install it.
$ sudo apt-get update$ sudo apt-get install Ethereum
Start Geth immediately after installation is complete.First, create a data directory and describe the settings for the first block (the Genesis block).
$ mkdir~/eth_private_net$ vim~/eth_private_net/my_genesis.json{"nonce": "0x0000000000000042", "timestamp": "0x0", " Parenthash ":" 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 "," Extradata ":"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.