Bitcoin Forum
June 17, 2024, 07:22:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Poll
Question: No Active Poll
  n/a - 0 (0%)
N/A - 0 (0%)
Total Voters: 0

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 [14] 15 16 17 18 19 20 21 22 »  All
  Print  
Author Topic: CryptoCoin Explorer - Coin Block Explorers.  (Read 30756 times)
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
May 29, 2013, 01:18:39 AM
 #261

Anyone know of  a good way, in PHP to parse out the current network hash per second from CryptoCoin Explorer (thru the API)?


Almost all the daemons have a rpc call for that now (getnetworkhashps).

I know your site and many other sites that use CCE for information do not run daemons.

However, on the surface it seems trivial to add an API command to grab that information, especially since the newer versions of ABE can directly access the daemon RPC to get the memory pool.

I will look into it and get back to you.  Smiley
sal002
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
May 29, 2013, 01:24:37 AM
 #262



I know your site and many other sites that use CCE for information do not run daemons.


Thanks!  FYI - you still don't have all the coins I run on your explorer Smiley
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
May 29, 2013, 02:22:23 AM
 #263



I know your site and many other sites that use CCE for information do not run daemons.


Thanks!  FYI - you still don't have all the coins I run on your explorer Smiley

OK, I have the new API command coded and running on the JKC explorer:

http://jkc.cryptocoinexplorer.com/chain/JKC/q/getnetworkhash

I work on patching the others.. Smiley
sal002
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
May 29, 2013, 02:33:22 AM
 #264

Awesome! - donation sent again!
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
May 29, 2013, 04:26:27 AM
 #265



I know your site and many other sites that use CCE for information do not run daemons.


Thanks!  FYI - you still don't have all the coins I run on your explorer Smiley

OK, I have the new API command coded and running on the JKC explorer:

http://jkc.cryptocoinexplorer.com/chain/JKC/q/getnetworkhash

I work on patching the others.. Smiley

Well, the patch has been apllied to all the explorers, execpt there is a snag.

Not all the daemons support the "getnetworkhashps" function.  Sad

Namely: PPC,TRC,FRC,BTE,NVC and BTB.

However, I will look into patching those daemons, and give a report in a bit.
sal002
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
May 29, 2013, 11:47:09 AM
 #266

Is the same derived from getmininginfo?
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
May 29, 2013, 12:28:41 PM
Last edit: May 29, 2013, 12:52:19 PM by dreamwatcher
 #267

Is the same derived from getmininginfo?

Unfortunately not.

There are two issues that I need to deal with:

TRC,FRC and BTE, should be a relatively easy fix. I just need to drop in the getnetworkhashps  RPC command object and adjust for the different difficulty target times.


PPC,NVC and BTB are going to be a bit more complicated.

These coins have POW and POS blocks with different difficulty formulas, though I can get the current blocks POW and POS difficulty with getinfo, I have no way of directly getting what the POW target of a past POS block was. The basic hash rate formula ((Difficulty* pow(2.0, 32)) / timePerBlock), needs at a minimum an accurate average of difficulty in this situation.

The difficulty difference between POW and POS blocks is so great, that an accurate average of POW difficulty without knowing what the POW difficulty on a POS block would have been, makes this calculation using this formula impossible.

I have a couple of ideas to get around it:

1. Every new block triggers an update to the explorer. I could do a getinfo inquiry at that time and record the POW difficulty. Network hash rate could then be calculated from those records.

2.Find or figure out a way to get the POW difficulty from a POS difficulty.



I will continue to work on this today, and hopefully come up with an answer.



 


 
Noitev
Hero Member
*****
Offline Offline

Activity: 812
Merit: 505


The Last NXT Founder


View Profile
May 29, 2013, 01:22:30 PM
 #268

Add TLC!
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
May 29, 2013, 03:53:35 PM
 #269

Update on the network hash rate API.

The way the Network hash rate is calculated between ABE (nethash) and the daemon (getnetworkhashps) are significantly different and will come up with different numbers.

The daemons by default only use the blocks since the last difficulty change.This cannot be used on PPC difficulty based coins, so those are out of this calculation. The number is hard coded and can be changed easily. However, I somewhat question the accuracy as the sample size can be incredibly small until some time has passed since the last change. I have also noticed that getnetworkhashps does not appear in the Bitcoin daemon, perhaps this is why.

ABE (nethash) uses an average difficulty over the interval set in the url. Once I have the POS/POW difficulty issue worked out, this will work great for the PPC based coins. I am also thinking of changing getnetworkhash explorer API I implemented yesterday on some coins, to one using the ABE(nethash) instead of the daemon getnetworkhashps.

What do you think?





sal002
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
May 29, 2013, 04:23:19 PM
 #270

I am more interested in relative hashing and perhaps nethash will get that as well.  For example, I want to see hash rate increases over the hour or so....I already have a PHP script to scrape nethash (as the json output seem to miss the nethash number), so maybe that is the more accurate way to go.
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
May 29, 2013, 05:06:06 PM
 #271

I am more interested in relative hashing and perhaps nethash will get that as well.  For example, I want to see hash rate increases over the hour or so....I already have a PHP script to scrape nethash (as the json output seem to miss the nethash number), so maybe that is the more accurate way to go.

How about if the getnetworkhash API accepts two integers. Both for hours, one for hourly interval and the other for how many total hours.

Output would be a simple list of hash rates with no extra information (unlike nethash).

For example:

getnetworkhash/1/24

would give a list of 24 hash rates, 1 for every hour in the last 24 hours.

223345566
225676778
234455667
221334454
etc...

This gives the option of getting hash rates based on time rather then on number of blocks.

Perhaps a third option to determine if the calculations would be independent or cumulative with the proceeding hours on the list.


Note: Just an FYI to everybody, I have mentioned this before but it should be mentioned again.

Do not use nethash for hash rates on PPC based coins (POW/POS) as it will be highly inaccurate due to the difficulty differences between POW/POS. This is one of the issues I am working on solving in the design of this new API.
weav
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250


- "Bitcore (BTX) - Airdrops every Monday"


View Profile
May 29, 2013, 05:24:06 PM
 #272

Hi dreamwatcher, can you please add PXC?

xchrix
Hero Member
*****
Offline Offline

Activity: 905
Merit: 1001



View Profile
May 29, 2013, 07:57:11 PM
 #273

MNC - MinCoin really has to be added do your list Smiley
which amount of BTC should donate for this coming alive??
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
May 31, 2013, 10:10:17 AM
 #274

Progress on the networkhash api:

For now the improved api is only on the JKC explorer, i want to finish the time option before placing it on all the POW only chains.

Basic description:

Code:
Shows network hash rate every INTERVAL blocks or time in minutes.
/chain/CHAIN/q/getnetworkhash[/INTERVAL/START/?format=[list,json,tlist,tjson]]
All parameters in [] are optional. Default is rate over the last 144 blocks in the list format.
START equals how many blocks or minutes back from current block to start.
list and json use blocks. tlist and tjson use time.
Both list and json order from START to current.

The time function has not been implemented, it is next on the list.

POW/POS operability will be next after the time implementation.

Basically this api makes it easy to just get the network hash rate based on blocks or time.

For example:

http://jkc.cryptocoinexplorer.com/chain/JKC/q/getnetworkhash will return the current hash rate over the last 144 blocks.

http://jkc.cryptocoinexplorer.com/chain/JKC/q/getnetworkhash/100/1000?format=json will return the hash rate every 100 blocks for the last 1000 blocks in json format.


Both list and json are from oldest (START) to newest (current block).






sal002
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
May 31, 2013, 12:24:51 PM
 #275

Thank you!
xchrix
Hero Member
*****
Offline Offline

Activity: 905
Merit: 1001



View Profile
May 31, 2013, 01:27:49 PM
 #276

donated a little bit. thanks for the great service!
energywave
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
June 01, 2013, 10:36:00 PM
 #277

WDC has been removed from CCE.
Why you removed WDC??? Please explain
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
June 02, 2013, 12:12:09 AM
 #278

The 1st patch is being applied tonight.

The time function has been pushed back, as some of the issues I am having could be solved in the same structure that will be needed for POS chains.


Code:
Shows network hash rate every INTERVAL blocks.
/chain/CHAIN/q/getnetworkhash[/INTERVAL/START/?format=[list,json,web]
All parameters in [] are optional. Default is rate over the last 144 blocks in the list format.
START equals how many blocks from current block to start. All formats order from oldest to newest.
Web is formatted in G/H (SHA-256) or M/H (Scrypt) with 2 places after the decimal.
Invalid entries default to the last 144 blocks.

This release will be for POW only chains. I have added a web format for easy web display. At first it was going to just be for the cosmetic changes planned for the explorers, but I thought the public could benefit from it.

Examples:
http://frk.cryptocoinexplorer.com/chain/Franko/q/getnetworkhash?format=web
Code:
17.76 M/H

http://frk.cryptocoinexplorer.com/chain/Franko/q/getnetworkhash/100/1000?format=json

Code:
[["46218698"], ["52446749"], ["52129851"], ["63051086"], ["62593642"], ["64144909"], ["47812886"], ["18733821"], ["16329848"], ["19283847"]]

http://frk.cryptocoinexplorer.com/chain/Franko/q/getnetworkhash/100/1000?format=list

Code:
46218698
52446749
52129851
63051086
62593642
64144909
47812886
18733821
16329848
19283847


Patching will be rolled out throughout the evening. I will post when done. Smiley
dreamwatcher (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1000


View Profile WWW
June 02, 2013, 02:10:13 AM
 #279

All explorers except for POW/POS chains (PPC,NVC,BTB) have been patched with version 1 of the  getnetworkhash API. 
sal002
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
June 02, 2013, 03:46:18 AM
 #280

All explorers except for POW/POS chains (PPC,NVC,BTB) have been patched with version 1 of the  getnetworkhash API. 

Thanks!
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 [14] 15 16 17 18 19 20 21 22 »  All
  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!