Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support stats using Block/BlockStat table #107

Merged
merged 11 commits into from
May 22, 2018

Conversation

hackmod
Copy link
Contributor

@hackmod hackmod commented Apr 18, 2018

WARNING

this is a experimental fix to serve statistics without external apis (http://drawpie.com/etc_hash_rate_api is currently broken)

Please do not merge it, execpt for testing.


prepare & run

  • node tools/stats.js : initialize BlockStat table to show the network hashrate chart
    • you can rescan after drop the BlockStat table like as following
    • RESCAN=10000:1000000 node tools/stats.js (interval:steps)
  • npm start

screenshot

image

image

image

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@hackmod hackmod force-pushed the stats-fixes branch 3 times, most recently from 769204d to d18d571 Compare April 18, 2018 13:51
@ghost
Copy link

ghost commented Apr 18, 2018

Epic commit! Will update https://classic.chainkorea.kr when we merge this one 😄

@pyskell
Copy link
Member

pyskell commented Apr 18, 2018

Excellent work!

Here's my initial comments:

  1. Mining hashrate appears accurate and in line with what we see on other explorers (ex. gastracker.io)
  2. Can we do labeling of miners? I'm thinking an addition to config.json that ties an address to a string (miner name).
  3. Is the bomb chart needed for any Ethereum-based blockchains?
  4. The hashrate chart isn't rendering for me at the moment but it looks like it may need to a minimal amount of data first in order to display. Is this correct?

image

@ghost
Copy link

ghost commented Apr 18, 2018

@hackmod @pyskell Since Classic defuses the difficulty bomb on block 5900000, I think using the ECIP-1010 chart is useless for now & the future ( also the alt-chains ). Instead, we can change them to the gaslimit chart or block time chart ( if we have them on our database ).

@hackmod
Copy link
Contributor Author

hackmod commented Apr 18, 2018

Can we do labeling of miners? I'm thinking an addition to config.json that ties an address to a string (miner name).

yes. l have already made some fix, push it later soon.

image

Is the bomb chart needed for any Ethereum-based blockchains?

nope. anyway it is easy to make it configurable in config.json.

The hashrate chart isn't rendering for me at the moment but it looks like it may need to a minimal amount of data first in order to display. Is this correct?

correct.
simply you could run node tools/stats.js or RESCAN=1000:1000000 node tools/stats.js to make hashrate chart work.

@hackmod hackmod changed the base branch from dev to master April 25, 2018 15:02
@hackmod
Copy link
Contributor Author

hackmod commented Apr 25, 2018

rebased onto the master
rebased onto the dev again

 * plugins/moment/*.js added
 * FIXME The bome chart does not work correctly
 * aggregate() with proper match options
 * verify range/days req params
 * fixed tools/stats.js to support rescan with a custom interval.
 * show percent at a tooltip
@hackmod hackmod changed the base branch from master to dev May 5, 2018 02:42
@hackmod
Copy link
Contributor Author

hackmod commented May 11, 2018

  • support mobile layout
  • show high rank miners first. hide low rank miners.

image

@ghost
Copy link

ghost commented May 11, 2018

@hackmod show high rank miners first. hide low rank miners. - This part was pretty annoying until it solved now 😄

@pyskell pyskell merged commit 8cd9126 into ethereumclassic:dev May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants