Author

Topic: How blocks are linked together (Read 1341 times)

legendary
Activity: 3472
Merit: 4801
September 21, 2014, 09:14:11 AM
#6
- snip -
I thought however there maybe more hooks in the code base, as redundancy or something

Nope.  That's all there is.
legendary
Activity: 2632
Merit: 1023
September 21, 2014, 03: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
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
August 20, 2014, 11:32:32 AM
#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.
legendary
Activity: 3472
Merit: 4801
August 20, 2014, 08:33:57 AM
#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.
member
Activity: 96
Merit: 10
esotericnonsense
August 20, 2014, 07:45:52 AM
#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'.
legendary
Activity: 2632
Merit: 1023
August 20, 2014, 02:09:30 AM
#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.


Jump to: