Bitcoin Forum
May 04, 2024, 10:14:26 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Proof of work, and hashes  (Read 175 times)
WaterPower (OP)
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
August 05, 2017, 12:27:36 PM
 #1

Following on from my previous question, could someone explain what exactly is a "proof of work" in a block, and what hashes are.
1714817666
Hero Member
*
Offline Offline

Posts: 1714817666

View Profile Personal Message (Offline)

Ignore
1714817666
Reply with quote  #2

1714817666
Report to moderator
1714817666
Hero Member
*
Offline Offline

Posts: 1714817666

View Profile Personal Message (Offline)

Ignore
1714817666
Reply with quote  #2

1714817666
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714817666
Hero Member
*
Offline Offline

Posts: 1714817666

View Profile Personal Message (Offline)

Ignore
1714817666
Reply with quote  #2

1714817666
Report to moderator
1714817666
Hero Member
*
Offline Offline

Posts: 1714817666

View Profile Personal Message (Offline)

Ignore
1714817666
Reply with quote  #2

1714817666
Report to moderator
Watanabe1505
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250



View Profile
August 05, 2017, 02:05:32 PM
 #2

A proof of work is a piece of data which is difficult (costly, time-consuming) to produce but easy for others to verify and which satisfies certain requirements. Producing a proof of work can be a random process with low probability so that a lot of trial and error is required on average before a valid proof of work is generated. Bitcoin uses the Hashcash proof of work system.

One application of this idea is using Hashcash as a method to preventing email spam, requiring a proof of work on the email's contents (including the To address), on every email. Legitimate emails will be able to do the work to generate the proof easily (not much work is required for a single email), but mass spam emailers will have difficulty generating the required proofs (which would require huge computational resources).

Hashcash proofs of work are used in Bitcoin for block generation. In order for a block to be accepted by network participants, miners must complete a proof of work which covers all of the data in the block. The difficulty of this work is adjusted so as to limit the rate at which new blocks can be generated by the network to one every 10 minutes. Due to the very low probability of successful generation, this makes it unpredictable which worker computer in the network will be able to generate the next block.

For a block to be valid it must hash to a value less than the current target; this means that each block indicates that work has been done generating it. Each block contains the hash of the preceding block, thus each block has a chain of blocks that together contain a large amount of work. Changing a block (which can only be done by making a new block containing the same predecessor) requires regenerating all successors and redoing the work they contain. This protects the block chain from tampering.

The most widely used proof-of-work scheme is based on SHA-256 and was introduced as a part of Bitcoin. Some other hashing algorithms that are used for proof-of-work include Scrypt, Blake-256, CryptoNight, HEFTY1, Quark, SHA-3, scrypt-jane, scrypt-n, and combinations thereof.

A hash algorithm turns an arbitrarily-large amount of data into a fixed-length hash. The same hash will always result from the same data, but modifying the data by even one bit will completely change the hash. Like all computer data, hashes are large numbers, and are usually written as hexadecimal.

BitCoin uses the SHA-256 hash algorithm to generate verifiably "random" numbers in a way that requires a predictable amount of CPU effort. Generating a SHA-256 hash with a value less than the current target solves a block and wins you some coins.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!