wiki commit

This commit is contained in:
1HXb9KMAtwNJqz4egi6hJx08EQgJajiBTH
2020-01-02 15:01:19 -05:00
committed by buwiki
parent eca355c330
commit 8f80da56b8
2 changed files with 15 additions and 2 deletions
+3 -1
View File
@@ -31,4 +31,6 @@ The block reward started at 5,000,000,000 satoshis (50 BCH) and decreases by hal
Transaction fees are often required by the network for transactions to be relayed across the network.
Satoshis provided as inputs to a transaction, but not consumed by its outputs, are collected by the coinbase transaction as implicit inputs.
## Genesis Block
The coinbase message is provided in the inputs unlocking script. The unlocking script is required to begin a push of the block height which can then be followed why whatever data is desired. The block height encoded as a variable-length, little-endian integer. The [OP_DATA_X](/protocol/blockchain/script/op-codes/op-data-x) operation is used to push the necessary number of bytes to encode the length.
## Genesis Block
+12 -1
View File
@@ -12,4 +12,15 @@ Because SHA-256 is used to hash block headers, and it is not known how to find a
2. The receipt of the block reward for the block.
3. The receipt of the fees for the block.
This is only quasi-random because the likelihood of building a block with an appropriate hash is directly proportional to the computational power (often referred to as hashing power), available to each individual mining blocks.
This is only quasi-random because the likelihood of building a block with an appropriate hash is directly proportional to the computational power (often referred to as hashing power), available to each individual mining blocks.
## Extra Nonce
Ideally in such a proof-of-work system, the dynamic parameters of the data being hashed (i.e. the block header) would provide enough variability to guarantee any possible output of the hash function used.
However, SHA-256 outputs 32 bytes and the only part of the block header that can be changed rapidly are the nonce, which is only 4 bytes long, and the timestamp, which while also 4 bytes must remain close to the current time.
As a result, there was a need for additional data to be varied.
The only other parameter of the block header that a miner has any power over is the merkle root.
In order to change the merkle root, the transactions in the block would need to be changed.
But since the [coinbase transaction](/protocol/blockchain/block#Coinbase%20Transaction) is already created by the miner of the block, and updating its hash would allow for efficient re-calculation of the merkle root, putting this "extra nonce" in the coinbase transaction was the logical conclusion.
Ultimately, the extra nonce is included as a part of the coinbase message, usually following the block height that is required to be first.