Bitcoin miner funciona

bitcoin miner funciona

Duration: 7:06. When Jack's transaction is broadcast to the Bitcoin network, it would be verified in a few minutes by miners. The 10 bitcoins will now be. Jump to your language: EN / ES / RU / 中文 Hi miner, Bitcoin's network difficulty has resumed its steep upward climb in the past few weeks. For miners who aren't​. bitcoin miner funciona

Bitcoin miner funciona - are mistaken

philipperemy / my-first-bitcoin-miner

For the people who are curious to understand in a simplified setup:

  • How the Bitcoin blockchain works
  • How mining works

For a complete implementation (that can actually mine!), please browse this repository https://github.com/jgarzik/pyminer.

This miner is not connected to the bitcoin network and is a very simplified version of what would be a real bitcoin miner. The purpose of this implementation is to provide a basic comprehension of the mining logic.

What are bitcoin miners really solving?

Step 1

At a high level, the miner software takes a list of active transactions, and then groups them together in something called a "block".

Or more accurately stated: The miner software converts all the transactions into a summary view called a "merkle root", and hashes it, which is representative of the transactions.

Step 2

The mining software then converts this to into a binary format called a Block Header, which also references the previous blocks (also called a chain).

Step 3

The miner hardware changes a small portion of this block called a "nonce".

Step 4

The block header is hashed and compared to the Target as if it were simply a large number like 10,000,000 > 7,000,000 (the real numbers are much bigger, and in hex). The target is compressed and stored in each block in a field called bits.

An expanded target looks like this:

And the goal is to make sure the SHA256 hash of the block is less than this value. In the example below "83ee" is smaller than "83ef"

To simplify this concept, you can ballpark the target by counting the leading zeros (as the other answer here explains). Here is an example:

Here is a sample block with transactions you can view on BlockChain.info. Look in the upper right hand corner of the webpage for this hash:

That previous hash was from today and has 14 leading zeroes. Let's compare that to what was needed 3 years ago with block 100 which has 8 leading zeros.

Summary

So at the end of the day, all a miner does is:

  • Take a block header as input
  • Change the Nonce
  • Test if the Block Header hash is less than the Target. If it is, you win.
  • Go to step 2 (or go to step 1 if someone else won the block)

References

Источник: https://github.com/philipperemy/my-first-bitcoin-miner

0 thoughts to “Bitcoin miner funciona”

Leave a Reply

Your email address will not be published. Required fields are marked *