Author

Topic: Bitcoin External Dependencies and Block Generation Time (Read 947 times)

legendary
Activity: 3472
Merit: 4801
Where can I find out more info on the time stamping process?

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

Quote
Each block contains a Unix time timestamp. In addition to serving as a source of variation for the block hash, there are also validity checks, that make it more difficult for an adversary to manipulate the block chain.

A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you.

Whenever a node connects to another node, it gets a UTC timestamp from it, and stores its offset from node-local UTC. The network-adjusted time is then the node-local UTC plus the median offset from all connected nodes. Network time is never adjusted more than 70 minutes from local system time, however.

Bitcoin uses an unsigned integer for the timestamp
hero member
Activity: 906
Merit: 1034
BTC: the beginning of stake-based public resources
You can't adjust difficulty based on blocks alone.   Ok 2016 blocks have been completed does difficulty go up or down?  You need a second factor and that factor is time.  So Bitcoin is dependent on real world timekeeping however Bitcoin does a few things to minimize the influence of time on the security of the network.

Thanks for this. I thought that second factor was that the network could see the total hashrate being applied to it.

Where can I find out more info on the time stamping process?
member
Activity: 96
Merit: 10
esotericnonsense
The aim of the blockchain is to provide ordering of transactions. Transactions are ordered based on height, rather than block timestamp. In a sense the block height _is_ the timestamp of a transaction. It just doesn't have a regular interval.

With a ~10 minute time interval between blocks, blockchain state can be synchronized globally in an effective manner.

If the interval fell very low (i.e. if there were never any diff adjustments), nodes would likely begin to fall out of sync and blocks would be orphaned often, wasting hashpower. Too high, and transactions are included too slowly.

Difficulty adjustment attempts to fix this. It doesn't have to be exactly perfect as long as we remain within sensible bounds. And it can be enforced on a local level (each node rejecting blocks that abuse timestamps too much).
donator
Activity: 1218
Merit: 1079
Gerald Davis
Am I correct in thinking that the Bitcoin difficulty adjustment algorithm which dictates the target hash's difficulty value for blocks, where difficulty is adjusted every 2016 blocks, purely adjusts itself based on the current hashing power on the network?

Am I also therefore correct in guessing it does this so as to avoid having to use any external dependencies and thus any potentially centralised resources which could also be an attack vector such as referring to an external time server?

You can't adjust difficulty based on blocks alone.   Ok 2016 blocks have been completed does difficulty go up or down?  You need a second factor and that factor is time.  So Bitcoin is dependent on real world timekeeping however Bitcoin does a few things to minimize the influence of time on the security of the network.
kjj
legendary
Activity: 1302
Merit: 1026
We still depend on external timekeeping, but in a distributed way.
hero member
Activity: 906
Merit: 1034
BTC: the beginning of stake-based public resources
Am I correct in thinking that the Bitcoin difficulty adjustment algorithm which dictates the target hash's difficulty value for blocks, where difficulty is adjusted every 2016 blocks, purely adjusts itself based on the current hashing power on the network?

Am I also therefore correct in guessing it does this so as to avoid having to use any external dependencies and thus any potentially centralised resources which could also be an attack vector such as referring to an external time server?
Jump to: