Author

Topic: Get amount of blocks found last hour (Read 980 times)

sr. member
Activity: 410
Merit: 250
May 20, 2015, 11:38:16 AM
#9
I am New!!!! Please help me how to earn bitcoins!!!
So please helpp meeeeeeeeee!!!!!!!
go there and read the posts
https://bitcointalk.org/index.php?board=39.0

a good place to start from for newbies
legendary
Activity: 3472
Merit: 4801
May 18, 2015, 05:15:51 AM
#8
On Blockcahin.info I see this realtime "block found" list, and a history of found blocks as well. This information I assume is a db solution which is updated with every block that is found?

Do you know if an API is available for this list?

Just keep in mind that this is a list is updated when blockchain.info's peer nodes first hear about a block, and not when they are actually found.  Under normal circumstances the delay between when a block is found and when blockchain.info hears about it is very small (probably less than a second).  However, there can be circumstances (and have been in the past) when blockchain.info may not report a found block for several minutes or even a few hours.
sr. member
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
May 18, 2015, 04:48:55 AM
#7
Yes, there is one. Just click the link labeled API on the blockchain.info homepage  Smiley
full member
Activity: 221
Merit: 100
May 18, 2015, 12:36:25 AM
#6
On Blockcahin.info I see this realtime "block found" list, and a history of found blocks as well. This information I assume is a db solution which is updated with every block that is found?

Do you know if an API is available for this list?
legendary
Activity: 3472
Merit: 4801
May 17, 2015, 07:36:42 PM
#5
I am looking for a simple way to count the number of blocks found in the bitcoin network during the last hour at any given time.

What I can think of is to "getinfo" extract block and insert time, and block number in a Sql, this could be done once every hour and do a php calc, but is there a more simple way to do this?

You can't know for certain how many blocks have been found in the past hour, or when any particular block was found.

Blocks do have a timestamp, but miners are allowed to fill that timestamp with a time in the near past or near future when building the block.  Therefore, that timestamp is only accurate to a time within a few hours.

The only other reliable time you have is the time that your wallet first hears about a block from a peer.  There is a possibility of a delay between when the block is solved and when your wallet first hears about the block.

For a well-connected peer this should only be off by a few seconds, no?

Generally?  Sure.

It all depends on your use case and how specifically you wish to know the number of blocks found in the last hour.

If your node should loose connectivity for a few hours any reason, then all those blocks would appear to have occurred in the same few minutes when connectivity returns.  There could be other reasons that you don't hear about a block right away as well (for instance forks and orphan blocks).



sr. member
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
May 17, 2015, 07:10:32 PM
#4
I am looking for a simple way to count the number of blocks found in the bitcoin network during the last hour at any given time.

What I can think of is to "getinfo" extract block and insert time, and block number in a Sql, this could be done once every hour and do a php calc, but is there a more simple way to do this?

You can't know for certain how many blocks have been found in the past hour, or when any particular block was found.

Blocks do have a timestamp, but miners are allowed to fill that timestamp with a time in the near past or near future when building the block.  Therefore, that timestamp is only accurate to a time within a few hours.

The only other reliable time you have is the time that your wallet first hears about a block from a peer.  There is a possibility of a delay between when the block is solved and when your wallet first hears about the block.

For a well-connected peer this should only be off by a few seconds, no?
legendary
Activity: 3472
Merit: 4801
May 17, 2015, 05:57:18 PM
#3
I am looking for a simple way to count the number of blocks found in the bitcoin network during the last hour at any given time.

What I can think of is to "getinfo" extract block and insert time, and block number in a Sql, this could be done once every hour and do a php calc, but is there a more simple way to do this?

You can't know for certain how many blocks have been found in the past hour, or when any particular block was found.

Blocks do have a timestamp, but miners are allowed to fill that timestamp with a time in the near past or near future when building the block.  Therefore, that timestamp is only accurate to a time within a few hours.

The only other reliable time you have is the time that your wallet first hears about a block from a peer.  There is a possibility of a delay between when the block is solved and when your wallet first hears about the block.
full member
Activity: 221
Merit: 100
May 17, 2015, 03:10:05 PM
#2
As a followup question regarding the getinfo and jsonrpc can I extract the blocks information like this, or how should this be done?

$btcinfo = $bitcoin->getinfo->blocks;
full member
Activity: 221
Merit: 100
May 17, 2015, 03:03:48 PM
#1
I am looking for a simple way to count the number of blocks found in the bitcoin network during the last hour at any given time.

What I can think of is to "getinfo" extract block and insert time, and block number in a Sql, this could be done once every hour and do a php calc, but is there a more simple way to do this?
Jump to: