Author

Topic: What is the math involved in calculating the hash of each block (Read 591 times)

legendary
Activity: 3472
Merit: 4801
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.
legendary
Activity: 1792
Merit: 1111
Please read bitcoin wiki before asking simple factual questions like this

https://en.bitcoin.it/wiki/Main_Page
legendary
Activity: 905
Merit: 1012
sr. member
Activity: 252
Merit: 250
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?
Jump to: