Bitcoin Forum
May 28, 2017, 08:50:52 AM *
News: Latest stable version of Bitcoin Core: 0.14.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: when calculating blocks does bitcoin remember previous history of tried blocks ?  (Read 972 times)
neotrino
Member
**
Offline Offline

Activity: 60


View Profile
May 24, 2011, 07:51:59 PM
 #1

Hello,

I have looking at the source code in the function CreateNewBlock() trying to answer myself but I am unable to understand it, looks quite complicated, so I hope anyone can answer my doubts.


How bitcoin chooses the new blocks to calculate the hashes?.

it generates a random block of data and calculate the hash without taking into account if this block was previously calculated in the past?

or it generates a random block and checks if this block was never calculated before calculating the hash for it?

If I turn off my computer, could be bitcoin tomorrow calculating the same blocks than today?


Thanks!
Creating a Bitcoin client that fully implements the network protocol is extremely difficult. Bitcoin-Qt is the only known safe implementation of a full node. Some other projects attempt to compete, but it is not recommended to use such software for anything serious. (Lightweight clients like Electrum and MultiBit are OK.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1495961452
Hero Member
*
Offline Offline

Posts: 1495961452

View Profile Personal Message (Offline)

Ignore
1495961452
Reply with quote  #2

1495961452
Report to moderator
1495961452
Hero Member
*
Offline Offline

Posts: 1495961452

View Profile Personal Message (Offline)

Ignore
1495961452
Reply with quote  #2

1495961452
Report to moderator
kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
May 25, 2011, 03:01:18 AM
 #2

What gets hashed?

The block is not random.  It has useful information in it, that changes often.  Every node starts over from scratch quite often.

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!