Bitcoin Forum
July 01, 2024, 10:16:49 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Bitcoin blocks real date: time vs median time on: September 10, 2021, 12:14:30 PM
Makes perfect sense, thank you very much!
2  Bitcoin / Development & Technical Discussion / Re: Bitcoin blocks real date: time vs median time on: September 09, 2021, 10:09:42 AM
Thanks for the answers.
The goal of this classification is to see how many blocks arrive on any given day on average.
I know it's a block every 10 minutes but sometimes more, sometimes less.

The timestamp is closer to reality, the median time gives a time of about an hour prior.
My problem really is because sometimes a block would give a time that is in the next calendar day, and a subsequent block would give a time that is in the day prior...
So a few consecutive blocks can have dates like so: 23/06-23/06-24/06-23/06...

I'm leaning towards using the timestamp as it's closer to reality, although I find it annoying that some blocks will end up being counted towards another day because miners are setting the time too far in advance. Undecided
3  Bitcoin / Development & Technical Discussion / Bitcoin blocks real date: time vs median time on: September 08, 2021, 11:12:12 PM
Hi all,
I'm compiling some statistics about the arrival time and I was surprised to find that the timestamp included in block n+1 can sometimes be earlier than that of the preceding block n.

The wiki in https://en.bitcoin.it/wiki/Block_timestamp says it's ok:
Quote
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.

So we have 2 times in a block: the miner timestamp, and the median time.
I want to classify these blocks by date, but depending on whether I choose the timestamp or the median time, the dates can be different (see below) Tongue

Height   Timestamp                   Median time 
17898   23/06/2009 23:19:42    23/06/2009 20:34:45
17899   23/06/2009 23:32:39    23/06/2009 21:05:33
17900   24/06/2009 00:12:58    23/06/2009 21:40:41 <--
17901   24/06/2009 00:35:19    23/06/2009 22:25:33 <--
17902   24/06/2009 01:04:59    23/06/2009 22:57:21 <--

My question is: which one would you choose?
If say you wanted to count the number of blocks on the 23rd, would you go with the timestamp or the median time?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!