Bitcoin Forum
May 21, 2024, 12:20:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How blocks are linked together  (Read 1325 times)
jubalix (OP)
Legendary
*
Offline Offline

Activity: 2618
Merit: 1022


View Profile WWW
August 20, 2014, 07:09:30 AM
Last edit: September 21, 2014, 08:07:07 AM by jubalix
 #1

Once a block is found, and accepted, what/how is it links it to the previous block...


*I think it is the commonly accepted time stamp and that every one accepts the longest chain, and then is it a hash of very thing before + last block to give new hash that must be then used for the next one....*

I am being a bit lazy by not reading the white paper and code base


if some on could be so kind as to explain to me all the hooks used to link blocks together I would appreciate this.



Admitted Practicing Lawyer::BTC/Crypto Specialist. B.Engineering/B.Laws

https://www.binance.com/?ref=10062065
azeteki
Member
**
Offline Offline

Activity: 96
Merit: 10

esotericnonsense


View Profile WWW
August 20, 2014, 12:45:52 PM
 #2

It's linked to the previous block before the PoW is 'solved', during construction of the unsolved block.

The data hashed for the PoW puzzle includes 'hashPrevBlock'.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
August 20, 2014, 01:33:57 PM
 #3

Once a block is found, and accepted, what/how is it links it to the previous block...

It is not.  It is linked to the previous block BEFORE it is "found and accepted".

*I think it is the commonly accepted time stamp

No.  Timestamps are not used to link blocks.  Timestamps are not even always in order.  The timestamps in a block are not a reliable indication of the exact time that a block is solved, and can be off by more than an hour.

and that every one accepts the longest chain, and then is it a has of very thing before + last block to give new hash that must be then used for the next one....*

I'm having a difficult time making sense of what you are saying there.  As has already been pointed out, before you start trying to "solve" a block, you first build the block header.  The block header includes the hash of the previous block that you are "linking to".  This sets an order for the blocks, each block referencing its previous block all the way back to the origin block.

I am being a bit lazy

Clearly.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
August 20, 2014, 04:32:32 PM
 #4

Quote
Name:    jubalix
Posts:    2830
Activity:    560
Position:    Hero Member
Date Registered:    2013-02-27, 05:39:17

How can you not know about bitcoin? I don't expect you to know exactly how it all works, but the mechanics of the blockchain should have made sense to you a long time ago.

jubalix (OP)
Legendary
*
Offline Offline

Activity: 2618
Merit: 1022


View Profile WWW
September 21, 2014, 08:06:27 AM
 #5

Quote
Name:    jubalix
Posts:    2830
Activity:    560
Position:    Hero Member
Date Registered:    2013-02-27, 05:39:17

How can you not know about bitcoin? I don't expect you to know exactly how it all works, but the mechanics of the blockchain should have made sense to you a long time ago.

yeah i have not gone over the code base, nor hung round in the dev part much, I did figure it out though, its a hash of the last block combined with the next block if you read above.

I thought however there maybe more hooks in the code base, as redundancy or something, which is why I said *all* the hooks

Admitted Practicing Lawyer::BTC/Crypto Specialist. B.Engineering/B.Laws

https://www.binance.com/?ref=10062065
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
September 21, 2014, 02:14:11 PM
 #6

- snip -
I thought however there maybe more hooks in the code base, as redundancy or something

Nope.  That's all there is.
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!