Bitcoin Forum
April 26, 2024, 06:22:52 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Where can I find a file with the block number and timestamp validation?  (Read 1059 times)
valiron (OP)
Sr. Member
****
Offline Offline

Activity: 311
Merit: 250


View Profile
September 29, 2014, 07:48:40 PM
 #1


I know that I can get this by parsing the blockchain, but I wonder if this is available somewhere.

Thanks for your help.
BitcoinCleanup.com: Learn why Bitcoin isn't bad for the environment
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714155772
Hero Member
*
Offline Offline

Posts: 1714155772

View Profile Personal Message (Offline)

Ignore
1714155772
Reply with quote  #2

1714155772
Report to moderator
valiron (OP)
Sr. Member
****
Offline Offline

Activity: 311
Merit: 250


View Profile
September 30, 2014, 01:51:18 PM
 #2


Do I really need to parse the blockchain? Nothing available somewhere?
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
September 30, 2014, 03:15:35 PM
 #3

You don't need to parse the blockchain. You can use the RPC JSON API to bitcoin core, electrum, blockchain.info, etc.
"getblock"


valiron (OP)
Sr. Member
****
Offline Offline

Activity: 311
Merit: 250


View Profile
September 30, 2014, 11:27:36 PM
 #4

You don't need to parse the blockchain. You can use the RPC JSON API to bitcoin core, electrum, blockchain.info, etc.
"getblock"



Thank you for your help. Where can I find more about RPC JSON API in order to get a csv file for example?
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
October 01, 2014, 02:17:13 AM
 #5

Here's a PM I wrote someone else with the details of wot to do.

Quote from: deepceleron
I have a CSV of block times: https://bitcointalk.org/index.php?topic=135982.msg1453722#msg1453722

I dumped them on Windows with this "dumptime.cmd" in the bitcoind directory (and then added some more spreadsheet columns to make epoch time readable time), here it dumps times from block 50000-99999:

Code:
@echo off 
setlocal enableextensions
set /a height=50000
rem echo --start > timeout.txt
:beg
for /f "tokens=* delims=:" %%a in (
'bitcoind getblockhash %height%'
) do (
set hash=%%a
)

for /f "tokens=*" %%a in (
'bitcoind getblock %hash% ^| find "time"'
) do (
set blktim=%%a
)
echo %height%: %blktim%
echo %height%: %blktim% >> timeout.txt

set /a height = height + 1
IF %height% LEQ 99999 goto beg

endlocal 



Code:
blocknum,epochtime,blocksec,datetime
0,1231006505,0,2009-01-03T18:15:05Z
1,1231469665,0,2009-01-09T02:54:25Z
2,1231469744,79,2009-01-09T02:55:44Z
3,1231470173,429,2009-01-09T03:02:53Z
4,1231470988,815,2009-01-09T03:16:28Z
5,1231471428,440,2009-01-09T03:23:48Z
6,1231471789,361,2009-01-09T03:29:49Z
7,1231472369,580,2009-01-09T03:39:29Z
8,1231472743,374,2009-01-09T03:45:43Z
9,1231473279,536,2009-01-09T03:54:39Z
10,1231473952,673,2009-01-09T04:05:52Z
11,1231474360,408,2009-01-09T04:12:40Z
12,1231474888,528,2009-01-09T04:21:28Z
13,1231475020,132,2009-01-09T04:23:40Z
14,1231475589,569,2009-01-09T04:33:09Z
valiron (OP)
Sr. Member
****
Offline Offline

Activity: 311
Merit: 250


View Profile
October 01, 2014, 02:47:21 PM
 #6


Great! Thanks for your help. It will save me some time.
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!