Know a bit about, there may be a problem.
Mainly from ppt (github)
Some content from a network
Also known to be almost searches relevant content
https://blog.csdn.net/kaihuiguoji/article/details/91974530
https://www.jianshu.com/p/7d86785496c6
https://blog.csdn.net/jsjwk/article/details/81671619
Nakamoto algorithm block chain.
Each user has a public key private key pair (pairs, one multi-identity) -> problem, was intercepted by a node might be posing
Important concept is the trading block
Mining:
Random Number + HASH-> 256 The first 10 bits is 0. (This is a difficult problem), to find a random number that solved this problem, it will be rewarded Bitcoin
problem:
Double payment issues, the Byzantine generals problem.
Double payment problems: for example, to pay the same payment code at the same time in different locations. (At this time the micro-channel can not limiting screenshots, while the short pattern will change)
process
Two objects do the transaction broadcast transaction, verify (such as A to B bits payment credits, the other node if there is enough bits A coin validation recording), the other nodes will successfully verify transactions into their blocks (blocks non chain block, the block is a record of the transaction temporary period of time), then do the algorithm (block + nonce) (the above said HASH) for the block, after the success of the whole network broadcast, verify that the other node and the block node calculated random number is correct, if correct (most correct validation node), then the block is added to block chain.
example:
A-> B transaction, A check on the B encrypted with the public key, and then use the signature private key A, which is a transaction , so that all nodes can know the transmission of the transaction A, A can verify whether the balance adequate, whether there are duplicate payments, but only B can get money.
When the transaction is considered to be no problem A radio, most nodes, the transaction is considered to be no problem, each node writes block his record as a whole.
Thus each node has a block record block chain is not a member of many transactions.
Do first out algorithm and block nodes, network-wide broadcast (including blocks and some of the information for verification), verify that the block chains are added, the node is considered to have the block. Then all nodes are saved the correct block is considered equivalent to this period of time is recorded transaction is saved to block the chain (all nodes Save the block, the relevant transaction records are kept).
Block structure:
prev block forward block chain of a hash value
merkle root hash value of the current block trading information
Nonce, the node calculates a random number, the random number to the recording Nonce
timestamp timestamp
....
Txh Txh Txh ... (the block trading record)
The verification hash value equal to each block chain in accordance with the block and the block merkle root transaction.