Blockchain Learning Day06 (Implementation of PoW in Bitcoin)

Implementation of PoW in Bitcoin

1. Source code location

https://githun/bitcoin/bitcion

2. Bitcoin Block

Block header and block definition in bitcoin0-15.1 source code:
written in C++, not GO

Insert image description here
We use GO to imitate the source code and write it.

3. Principle of Bitcoin POW algorithm

bitcoin0-15.1 Pow algorithm implementation in source code

uses mining algorithm to form new blocks
Insert image description here
Insert image description here

Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here
Insert image description here

4. Bitcoin mining difficulty calculation

Implementation of mining difficulty calculation in bitcoin0-15.1 source code.
Insert image description here
Insert image description here
Just understand the above code.

Guess you like

Origin blog.csdn.net/weixin_44774466/article/details/135184900