Bitcoin Forum
May 09, 2024, 12:22:33 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Explain the concept of "hash" "hashing" and "hashrate" like I'm five.  (Read 1082 times)
ThrillHou (OP)
Member
**
Offline Offline

Activity: 73
Merit: 15



View Profile
June 05, 2013, 06:17:35 PM
 #1

Where I come from, hash is something you eat for breakfast, or smoke on a breezy summer afternoon.

Can someone explain the hash concept to me? Also, I've seen/heard that people desire an "even distribution of hashing" across miners, and I wonder what that means/why.

"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Kaepora
Newbie
*
Offline Offline

Activity: 42
Merit: 0



View Profile
June 05, 2013, 07:09:53 PM
 #2

Where I come from, hash is something you eat for breakfast, or smoke on a breezy summer afternoon.

Can someone explain the hash concept to me? Also, I've seen/heard that people desire an "even distribution of hashing" across miners, and I wonder what that means/why.



Simply hashing is solving math problems, hash rate is how many math problems are being solved in a particular period of time, say 1 sec.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
June 05, 2013, 07:40:26 PM
 #3

A "hash" is a type of mathematical equation.

You start with a set of data (which is represented as a number or numbers), then you perform the hash calculation.  When you are done, you generally end up with a different number than you started with.

There are various hash functions that exist.  For most of what bitcoin does it uses a hash that is known as SHA-256.  This hash calculation is designed in such a way that the resulting number will ALWAYS be between 0 and 115,792,100,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000.  No matter how big or small the starting data is, when you are done with the hash calculation you will get a number in that range.

The calculation is designed such that every time you calculate the hash against the exact same starting data, you will always end up with the exact same resulting number.  If you change anything at all in the starting data, then the resulting number will be different and it will be different in a way that is not predictable.

Another feature of hash calculations is that they are designed to only be possible to calculate in one direction.  If someone gives you the resulting number, there is no way to do the calculation the other way and determine what the starting data was.

This means that you can give a computer a set of data and have it perform the calculation.  As long as the resulting hash is the same as the last time someone calculated it, you can know with confidence that the data you are working with is unchanged.

"Hashing" simply means performing this calculation on a set of data.

A "hash rate" is a number that indicates how many times the computer is capable of computing the hash calculation in one second.  With bitcoin this is typically referring to the act of performing the SHA-256 hash calculation on 80 bytes of data (the 80 bytes that make up a blockchain block header).  So a miner that has a hashrate of 100 Mhash/sec is capable of computing the SHA-256 hash calculation on 80 bytes of data 100,000,000 times per second.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
June 05, 2013, 07:46:19 PM
 #4

I've seen/heard that people desire an "even distribution of hashing" across miners, and I wonder what that means/why.

Bitcoin uses hashes to prove that the transactions in the blockchain have not been altered.  If anyone were to alter any transaction, the hash of the data in the blockchain would change.  Bitcoin links multiple blocks of transactions together by using the hash of the previous block in the header of the current block.  If someone wanted to alter the transaction history, they would have to modify the hash not just of the block they are attempting to change, but of EVERY block that has been added to the blockchain since then.  Bitcoin is also designed to refuse to accept a hash value unless it is less than a specific target.  Since there is no way for the attacker to know what changes they have to make to the block of data to get a low enough hash value, they have to keep trying hashes over and over with slight changes to the data each time until the find a set of modified data that results in a low enough hash value.  While they are doing this, the rest of the network is continuing to add new blocks to the blockchain.  This means that the attacker would have to be able to calculate hashes faster than the entire combined network in order to find hashes with a low enough value fast enough to catch up to the end of the blockchain.
r.freeman
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
June 05, 2013, 08:02:21 PM
 #5

Where I come from, hash is something you eat for breakfast, or smoke on a breezy summer afternoon.

Can someone explain the hash concept to me?

Hash is a shortcut.

Example of trivial hash would be to count number of letters A,E and R.

"Cat jumped over blue river"  = 1A, 3E, 2R - or 132.

132 is shortcut of that text.
After just seeing "132" you can not recreate the same text.

And real hashes like sha-256 are so complex, that after seeing their shortcut numer it is almost impossible to find out ANY text that has same shortcut.


   
Grous1987
Newbie
*
Offline Offline

Activity: 17
Merit: 0



View Profile
June 05, 2013, 08:07:15 PM
 #6

Thanks for the info Danny! Pretty helpful since I wasn't clear on the details before.
ThrillHou (OP)
Member
**
Offline Offline

Activity: 73
Merit: 15



View Profile
June 06, 2013, 03:28:26 AM
 #7

Great answers  Smiley I feel like the blind men and the elephant here, but I think I'm starting to get it. When you talk about attackers " catching up to the end of a blockchain", is this related to the 51% attack(another concept which I am not exactly 100% on), or is this an unrelated attack method on BTC with different consequences.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
June 06, 2013, 03:43:43 AM
 #8

When you talk about attackers " catching up to the end of a blockchain", is this related to the 51% attack

Exactly.

The only way you can catch up with the blockchain that the rest of the network keeps adding to is if you have more hashing power than all of them combined.  Otherwise the network adds new blocks faster than you can replace old ones.

If you have the same amount of something as everyone else, then you have 50% (think of holding 50 apples, while the other 50 apples are shared among a dozen people, you have 50% of the apples). Therefore as a way of saying "more than the rest of the network" the number 51% is often used when discussing this attack.
eduffield
Legendary
*
Offline Offline

Activity: 1176
Merit: 1036


Dash Developer


View Profile WWW
June 06, 2013, 03:57:56 AM
 #9

A "hash" is a type of mathematical equation.

That bout sums it up

Dash - Digital Cash | dash.org | dashfoundation.io | dashgo.io
Eva Braun
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
June 06, 2013, 04:11:40 PM
 #10

Hash is cannibis resin used to get you really really high,.. JK! Grin
miffman
Legendary
*
Offline Offline

Activity: 1904
Merit: 1005


PGP ID: 78B7B84D


View Profile
June 06, 2013, 04:18:04 PM
 #11

This is great thanks   Smiley














 

 

█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
BitBlender 

 













 















 












 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
█ 
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!