PPC block explorer

Hi,

Wanted to give back to the community little bit, so I spent some time working on a multi-currency block explorer (PPC being my main target):
http://bkchain.org/ppc

So far it supports PPC, BTC and LTC.
However, BTC might be a little bit slow to browse due to poor VPS performance. Might upgrade to dedicated server if userbase grows.
Also, tx/block display should be efficient, but address display might be quite slow (again, partly due to poor VPS I/O perf, but still could be optimized server-side by caching balances).

Let me know if you find bugs and/or have feature requests. Still need to redesign interface/css.
Also, I was thinking of adding address generator (similar to bitaddress) and longer term I thought API and client-side encrypted wallet services would be nice (but well, that’s a much bigger effort).

Hey takumi_yunokawa,

Really nice work there!! :slight_smile: well done looks a fine block explorer, and great that we now have 3 up and running :slight_smile:

I have a few questions relating to the requests you make to ppcoind that would help me bring new features to my blockexplorer http://blockexplorer.peercointalk.org that would be great if you can help. Your block explorer is making JSON RPC calls right? what call you make to return the results for transaction id? getrawtransactions is not there in PPC as far as i can see?

also requesting by address is done how??

Many thanks and keep up the great work

Fuzzybear

[quote=“FuzzyBear, post:2, topic:1434”]Hey takumi_yunokawa,

Really nice work there!! :slight_smile: well done looks a fine block explorer, and great that we now have 3 up and running :slight_smile:

I have a few questions relating to the requests you make to ppcoind that would help me bring new features to my blockexplorer http://blockexplorer.peercointalk.org that would be great if you can help. Your block explorer is making JSON RPC calls right? what call you make to return the results for transaction id? getrawtransactions is not there in PPC as far as i can see?

also requesting by address is done how??

Many thanks and keep up the great work

Fuzzybear[/quote]

Thanks!

I don’t use RPC (yet) as my main source of data currently because:

  1. it’s much faster to directly tap into blockchain data directly (esp. for Bitcoin blockchain which is really a huge dataset now). I can process it in less than 2 hours instead of much more if it was through RPC (PPC takes about 1 minute, LTC 4 minutes). Note that most of the time is spent resolving tx output (cf explanation later).
  2. Unfortunately wasn’t in PPC yet, and since PPC was really a coin I wanted to support…
  3. I can much more easily get extra info such as orphaned blocks (currently not displayed in index but available if the underlying ppcoind fetched them). BTW address info will display orphaned transactions (striked), etc… Not sure if there was RPC call to get that.

However I plan to add RPC to also provide live data of tx from mempool before they get confirmed into a block.

Everything is stored in a database, and there is an intermediate daemon (useful for precomputing some data, caching, database management, data conversion, little bit of logic, etc…). It should also help to later expose public JSON HTTP API (that’s how the frontend communicate with the daemon already).
This daemon also store appropriate data so that I can display info about a specific address as well.
It also that allows me to link spent tx outputs (if you click on an input tx, you can again jump to its output tx).

Also I think I will definitely need to move it to a faster (dedicated) server, I’m afraid the current VPS won’t support any real charge (processing data is about 10~100 times slower than on my desktop computer…).
Please don’t judge current responsiveness.

This is awesome! It’s great to have a couple of different choices for Peercoin block chain explorers.

One element that I’d love to see (so much so that I was going to set up a local version of ABE to do this), is to have a view that shows solved blocks with an identifier as to whether they were “stake” or “work”. A running total of stake vs. work is useful for a lot of the work that we’re doing in the community to really get to the bottom of how Peercoin works and then best communicate the mechanics.

Ideally, that view would show:

[ul][li]A running total of Peercoin blocks solved, with separate metrics for stake and work (average blocks per day solved via stake/work, average coin-days consumed for a stake block, etc.) [/li]
[li]A list of the blocks solved, with their block type identified (stake or work), and if it was a stake block, an indication of the coin-age consumed and the payout amount.[/li][/ul]

I’m happy to discuss this with you in a separate topic, if you’d like, and will volunteer to beta test it :slight_smile:

And I could have sworn that when I looked at your explorer earlier today, that it included coin-age destroyed in the block report, but now I’m not seeing it… was I imagining things?

Are you going to release the source? What language did you use and what are your plans for the future? I am really interested in a different block chain explorer as I am currently using Abe and I do not like it.

[quote=“Ben, post:5, topic:1434”]This is awesome! It’s great to have a couple of different choices for Peercoin block chain explorers.

One element that I’d love to see (so much so that I was going to set up a local version of ABE to do this), is to have a view that shows solved blocks with an identifier as to whether they were “stake” or “work”. A running total of stake vs. work is useful for a lot of the work that we’re doing in the community to really get to the bottom of how Peercoin works and then best communicate the mechanics.

Ideally, that view would show:

[ul][li]A running total of Peercoin blocks solved, with separate metrics for stake and work (average blocks per day solved via stake/work, average coin-days consumed for a stake block, etc.) [/li]
[li]A list of the blocks solved, with their block type identified (stake or work), and if it was a stake block, an indication of the coin-age consumed and the payout amount.[/li][/ul]

I’m happy to discuss this with you in a separate topic, if you’d like, and will volunteer to beta test it :)[/quote]

Yes, PoS/PoW indicator on front page would be easy to add. Rest shouldn’t be too hard as well

No, there never was one, but that’s a good idea (I was thinking about adding more Peercoin-specific things).

Good question. Not decided on that yet but opensource is definitely a possibility.

It uses python for frontend and C++ for backend (wanted to do something higher-level but for Bitcoin blockchain – really huge! --, I wanted a fast initial scan time when I need to regenerate database with additional data, and better future scalability in terms of tx/sec). Leveldb is used as database backend. Later I might have to do distributed/sharded nodes (for load balancing) if service prove popular, but long way to go before that!

Yes, I have seen that on
http://ppc.cryptocoinexplorer.com/
for a while. Then it disappeared.

Yes, I have seen that on
http://ppc.cryptocoinexplorer.com/
for a while. Then it disappeared.[/quote]
I even mentioned it in a post here: Cryptoblog - notícias sobre bitcoin e criptomoedas!
There was coin days destroyed and average coin age. Very useful. Would be great to have it back somewhere.

Yes, I have seen that on
http://ppc.cryptocoinexplorer.com/
for a while. Then it disappeared.[/quote]
I even mentioned it in a post here: Cryptoblog - notícias sobre bitcoin e criptomoedas!
There was coin days destroyed and average coin age. Very useful. Would be great to have it back somewhere.[/quote]

If I were to display that info, I noticed in peercoin there is a ceiling at STAKE_MIN_AGE (30 days min), otherwise it becomes 0, and floor at STAKE_MAX_AGE (90 days max).
Should I still display info for coinage clamped within that range, or just display it before clamping (maybe more useful)?

BTW, I am currently migrating everything to a dedicated server with 2xSSD, Xeon, etc… More expensive than I expected, but hopefully that should be worth it in terms of responsiveness/speed!
Also, I rewrote the way transactions of a specific address are stored (before it could be slow if many tx on a specific address because it needed everything to compute balance, but now it just fetch what’s necessary for a single page, and it can handle change of longest branch with low complexity). It will be live on new server soon.

C-oinage still accrues, even after 90 days, and is used to calculate the proof of stake reward payout if/when a block is solved. It also gives a view into how many days it took to solve the block, give the current stake.

[quote=“takumi_yunokawa, post:11, topic:1434”]If I were to display that info, I noticed in peercoin there is a ceiling at STAKE_MIN_AGE (30 days min), otherwise it becomes 0, and floor at STAKE_MAX_AGE (90 days max).
Should I still display info for coinage clamped within that range, or just display it before clamping (maybe more useful)?

BTW, I am currently migrating everything to a dedicated server with 2xSSD, Xeon, etc… More expensive than I expected, but hopefully that should be worth it in terms of responsiveness/speed!
Also, I rewrote the way transactions of a specific address are stored (before it could be slow if many tx on a specific address because it needed everything to compute balance, but now it just fetch what’s necessary for a single page, and it can handle change of longest branch with low complexity). It will be live on new server soon.[/quote]

takumi_yunokawa

I am very impressed with your technical ability. Thank You for your high level efforts. Concerning what information to display, it is understandable that you might not want things to get too crowded with info that most people normally don’t want to see. On the other hand I think many of us would like to be able to see a lot! What about a “Details” button? So that the initial display is limited in information, but someone pressing the button for more Details gets very comprehensive and complete information.

Also noted is that you have invested in a “More expensive than I expected” dedicated server. Would you please consider posting a PPC or BTC address so that we can help you with your dedicated server costs? Would that be acceptable?

I am trying to learn about the PoS protocol and your most complete blockchain explorer could help me to understand by way of real example.

Please, also don’t hesitate to comment as completely as possible about everything you observe about the Peercoin protocol.

Thank You

[quote=“NewMoneyEra, post:13, topic:1434”][quote=“takumi_yunokawa, post:11, topic:1434”]If I were to display that info, I noticed in peercoin there is a ceiling at STAKE_MIN_AGE (30 days min), otherwise it becomes 0, and floor at STAKE_MAX_AGE (90 days max).
Should I still display info for coinage clamped within that range, or just display it before clamping (maybe more useful)?

BTW, I am currently migrating everything to a dedicated server with 2xSSD, Xeon, etc… More expensive than I expected, but hopefully that should be worth it in terms of responsiveness/speed!
Also, I rewrote the way transactions of a specific address are stored (before it could be slow if many tx on a specific address because it needed everything to compute balance, but now it just fetch what’s necessary for a single page, and it can handle change of longest branch with low complexity). It will be live on new server soon.[/quote]

takumi_yunokawa

I am very impressed with your technical ability. Thank You for your high level efforts. Concerning what information to display, it is understandable that you might not want things to get too crowded with info that most people normally don’t want to see. On the other hand I think many of us would like to be able to see a lot! What about a “Details” button? So that the initial display is limited in information, but someone pressing the button for more Details gets very comprehensive and complete information.

Also noted is that you have invested in a “More expensive than I expected” dedicated server. Would you please consider posting a PPC or BTC address so that we can help you with your dedicated server costs? Would that be acceptable?

I am trying to learn about the PoS protocol and your most complete blockchain explorer could help me to understand by way of real example.

Please, also don’t hesitate to comment as completely as possible about everything you observe about the Peercoin protocol.

Thank You[/quote]

Thanks for the feedback! Simple/Details switch is definitely a good idea.
If you’re willing to donate, there is BTC/PPC address at the bottom you can donate to. Appreciated!

Moved to new dedicated server!
Took me more time than expected (lot of manual setup to do), but it was also because I took some time to add new features:

[ul][li]Live transactions! (I think it is the first PPC blockexplorer featuring that)
And you can of course check transaction by ID before they are in a block.[/li]
[li]Addresses with many transactions should load smoothly now (no need to scan all of them to compute balance).[/li]
[li]Improved some other backend stuff.[/li][/ul]

Enjoy!

Note: BTC database is still building so you can see live TX only for PPC/LTC now.
Next steps: API and coin-age, and (longer-term) hopefully some web wallet services? (however I recently noticed coinpunk, have to check into that)

[quote=“takumi_yunokawa, post:15, topic:1434”]Moved to new dedicated server!
Took me more time than expected (lot of manual setup to do), but it was also because I took some time to add new features:

[ul][li]Live transactions! (I think it is the first PPC blockexplorer featuring that)
And you can of course check transaction by ID before they are in a block.[/li]
[li]Addresses with many transactions should load smoothly now (no need to scan all of them to compute balance).[/li]
[li]Improved some other backend stuff.[/li][/ul]

Enjoy!

Note: BTC database is still building so you can see live TX only for PPC/LTC now.
Next steps: API and coin-age, and (longer-term) hopefully some web wallet services? (however I recently noticed coinpunk, have to check into that)[/quote]

Note: live tx don’t show up yet on address balances, and transaction status is “Orphaned” instead of “Unconfirmed/Pending”. This will be fixed soon.

Haha I was looking for the addresses at the bottom of your post and almost asked for it again! Then fortunately saw at the bottom of your blockchain explorer.

And, Thank You for your excellent blockchain explorer. I look forward to trying to educate myself in-part with it. Please include somewhere as much info as possible regarding the unique parts of Peercoin (i.e. PoS, coinage timestamp, coinage destroyed, interest paid, transaction fees destroyed, etc. etc).

Wow! Just looking at it now - really for the first time - nicely laid out!

Actually, I’m watching it hoping to see the donation I just sent you come thru. I sent you 200 PPC because I know your dedicated server was expensive. I can possibly send more in the future because I can see you are talented and accomplished in this important field.

Been flipping back and forth tabs between this msg and your block explorer, and …

There it is!!! In real time!!! http://bkchain.org/ppc/tx/a96791658c9f9f661d24cb281755e0ab2b439914e1fcfb4d3f5a501b4e50457f

Hahahahaha…!!!
Thank You! Thank You! Thank You!!!

Haha I was looking for the addresses at the bottom of your post and almost asked for it again! Then fortunately saw at the bottom of your blockchain explorer.

And, Thank You for your excellent blockchain explorer. I look forward to trying to educate myself in-part with it. Please include somewhere as much info as possible regarding the unique parts of Peercoin (i.e. PoS, coinage timestamp, coinage destroyed, interest paid, transaction fees destroyed, etc. etc).

Wow! Just looking at it now - really for the first time - nicely laid out!

Actually, I’m watching it hoping to see the donation I just sent you come thru. I sent you 200 PPC because I know your dedicated server was expensive. I can possibly send more in the future because I can see you are talented and accomplished in this important field.

Been flipping back and forth tabs between this msg and your block explorer, and …

There it is!!! In real time!!! http://bkchain.org/ppc/tx/a96791658c9f9f661d24cb281755e0ab2b439914e1fcfb4d3f5a501b4e50457f

Hahahahaha…!!!
Thank You! Thank You! Thank You!!![/quote]

Thank you very much for your support! Should cover server for quite some time :slight_smile:

I think coin-age stuff should be available in 1 or 2 days (currently working on it).
Talking about that, I was wondering if I should display block average coin age and destroyed coin age only inside “block” page, or also in front page in some column?
(I doubt I can fit both columns, but if you think one is really important, I can rearrange some stuff maybe…)

Haha I was looking for the addresses at the bottom of your post and almost asked for it again! Then fortunately saw at the bottom of your blockchain explorer.

And, Thank You for your excellent blockchain explorer. I look forward to trying to educate myself in-part with it. Please include somewhere as much info as possible regarding the unique parts of Peercoin (i.e. PoS, coinage timestamp, coinage destroyed, interest paid, transaction fees destroyed, etc. etc).

Wow! Just looking at it now - really for the first time - nicely laid out!

Actually, I’m watching it hoping to see the donation I just sent you come thru. I sent you 200 PPC because I know your dedicated server was expensive. I can possibly send more in the future because I can see you are talented and accomplished in this important field.

Been flipping back and forth tabs between this msg and your block explorer, and …

There it is!!! In real time!!! http://bkchain.org/ppc/tx/a96791658c9f9f661d24cb281755e0ab2b439914e1fcfb4d3f5a501b4e50457f

Hahahahaha…!!!
Thank You! Thank You! Thank You!!![/quote]

Thank you very much for your support! Should cover server for quite some time :slight_smile:

I think coin-age stuff should be available in 1 or 2 days (currently working on it).
Talking about that, I was wondering if I should display block average coin age and destroyed coin age only inside “block” page, or also in front page in some column?
(I doubt I can fit both columns, but if you think one is really important, I can rearrange some stuff maybe…)[/quote]

I think you have laid things out beautifully so far. My only emphasis is that you should include/display ALL information that could possibly be informative. When in doubt - include it - somehow. Hide it behind a Details button or however and in any way you think is best. I think many guys who are not expert-level coders are very interested in the nuts and bolts of PoS, so including somewhere ALL POSSIBLY RELEVENT INFO is best in my opinion. I don’t know what I need to know, so I don’t know what to ask you to display. Rule-of-thumb from my point of view: if in doubt, Include It - somewhere, somehow.

And, thanks again for your efforts.

Love your work takumi_yunokawa.

I have updated most if not all my post for block explorers to mention yours first… can you please start an “Official” thread or something for your block explorer in the “Services” section here as well please to help as many people find it as possible please :slight_smile: happy to leave this thread here for the continual development you are putting in!!

http://www.peercointalk.org/index.php?board=60.0

Fuzzybear