Bitcoin Forum
May 07, 2024, 11:14:14 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the math involved in calculating the hash of each block  (Read 571 times)
Bitcoin Magazine (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
April 08, 2014, 02:36:41 PM
 #1

What is hash and how is it related to the Markel Root, Block number, etc..?

and how is it tested?

if we wanted hashes to begin with lots of 0's couldn't we technically start at all 0's and work up till we found a hash that worked?  are there any better ways to solve a block without hashing?

i am here.
1715080454
Hero Member
*
Offline Offline

Posts: 1715080454

View Profile Personal Message (Offline)

Ignore
1715080454
Reply with quote  #2

1715080454
Report to moderator
1715080454
Hero Member
*
Offline Offline

Posts: 1715080454

View Profile Personal Message (Offline)

Ignore
1715080454
Reply with quote  #2

1715080454
Report to moderator
1715080454
Hero Member
*
Offline Offline

Posts: 1715080454

View Profile Personal Message (Offline)

Ignore
1715080454
Reply with quote  #2

1715080454
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715080454
Hero Member
*
Offline Offline

Posts: 1715080454

View Profile Personal Message (Offline)

Ignore
1715080454
Reply with quote  #2

1715080454
Report to moderator
maaku
Legendary
*
expert
Offline Offline

Activity: 905
Merit: 1011


View Profile
April 08, 2014, 03:19:22 PM
 #2

You might find this helpful:

http://en.wikipedia.org/wiki/SHA-2

I'm an independent developer working on bitcoin-core, making my living off community donations.
If you like my work, please consider donating yourself: 13snZ4ZyCzaL7358SmgvHGC9AxskqumNxP
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1094


View Profile
April 08, 2014, 04:07:16 PM
 #3

Please read bitcoin wiki before asking simple factual questions like this

https://en.bitcoin.it/wiki/Main_Page

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 08, 2014, 04:21:20 PM
 #4

What is hash

http://en.wikipedia.org/wiki/Cryptographic_hash_function

Bitcoin uses SHA-256 has for mining, and RIPEMD-160 hash for generating bitcoin addresses.

and how is it related to the Markel Root,

A Merkle root is the top hash in a tree of hashes performed in a particular order:
http://en.wikipedia.org/wiki/Merkle_tree

Block number, etc..?

Blocks are uniquely identified by their hash value.

and how is it tested?

Calculate the SHA-256 hash of the block header.  If the result is low enough to satisfy the current difficulty, then the block header is "solved".

if we wanted hashes to begin with lots of 0's couldn't we technically start at all 0's and work up till we found a hash that worked?

Hashes can't currently be performed in reverse.  They are a one-way function.  You start with some sort of data, then you perform the hash algorithm on that data.  The result is a has value.

The following is not possible:
  • Start with a hash value
  • Perform an algorithm on the hash value
  • The result is a valid bitcoin header

are there any better ways to solve a block without hashing?

A bitcoin block?  No.  The definition of a "solved" block is a block header that results in a double SHA-256 hash value that is less than a target value.  Therefore, repeatedly hashing while modifying a nonce between each attempt is currently the fastest way known to "solve" a block.
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!