Post
Topic
Board Announcements (Altcoins)
Re: [ANN][KARM] Karma /₭/ NEW! X11 + Time Warp + More (pg.140) SIDECHAIN+ (pg. 143)
by
socoban
on 01/09/2014, 20:40:06 UTC
This all "dumping" situation revealed we need a proper way to identify all the top addresses.
Is it too hard to implement something like this?

http://bitinfocharts.com/top-100-richest-bitcoin-addresses.html

It si very easy thanks to our new insight api.

Simply call: http://explorer.karmacoin.me/api/block/250422ab30233222e31bda3774f388a7972fd4f3aa59b75cf9fa3919bc740c02 , where

250422ab30233222e31bda3774f388a7972fd4f3aa59b75cf9fa3919bc740c02  is hash of latest block/or first block, depending on direction you need. It returns JSON like:
 
Code:
{"hash":"250422ab30233222e31bda3774f388a7972fd4f3aa59b75cf9fa3919bc740c02","confirmations":2,"size":1030,"height":300382,"version":2,"merkleroot":"740f4771da6823bf0aabb1193e5b3debbf5bbb5927238721b9e71e642fed8ecf","tx":["5ea8683cf3f216f55e93e8990f0fc6bde48bc8f00338f69f5c499dca10db1644","3e4e2533ba6985c64a056fc98d2bf7b8b1d3277662040706ae749fef85983354","dd307a531fb0b248549b2cf3ab172ba76a0672291ce6d62680a07fb2dfa8c479","722ee13ce64b9b2ce789597b181978cd6f63c0eabec74a9d527b70d0158b9a74"],"time":1409601200,"nonce":13440165,"bits":"1c0bee83","difficulty":21.45514767,"previousblockhash":"660c6c71dc5dd7b1f9ba418952d3d0a3fd716375877eed00b61d10c1804d41a2","nextblockhash":"c52cc743f0031ad1817d354d0a07aac598fef384c8464c30322f8a4c53f638e3","reward":20000,"isMainChain":true}

"previousblockhash" and "nextblockhash": are previous/next block you need to call and "tx" is array of all transaction at that block.
Than you can call for every transaction something like this http://explorer.karmacoin.me/api/tx/5ea8683cf3f216f55e93e8990f0fc6bde48bc8f00338f69f5c499dca10db1644,

which returns info about transaction, which can be used to count movements on addresses:

Code:

{"txid":"5ea8683cf3f216f55e93e8990f0fc6bde48bc8f00338f69f5c499dca10db1644","version":1,"locktime":0,"vin":[{"coinbase":"035e9504062f503253482f0436cf0454082801d970750000000d2f6e6f64655374726174756d2f","sequence":0,"n":0}],"vout":[{"value":"20000.00000000","n":0,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 d239df11538abd398c50a979eef410f6cbf12eb6 OP_EQUALVERIFY OP_CHECKSIG","reqSigs":1,"type":"pubkeyhash","addresses":["KSNiY9JzAKSuaT6wg42hCtMcfzNEoeWmw3"]}}],"blockhash":"250422ab30233222e31bda3774f388a7972fd4f3aa59b75cf9fa3919bc740c02","confirmations":11,"time":1409601200,"blocktime":1409601200,"isCoinBase":true,"valueOut":20000,"size":124}


Simply save everything into DB and than use selects and display it into fancy GUI:)  Simple as that. Any developer with 6+ month experience in any language can do that.

 

Socoban, since you have the expertise, skills and talents.... Will you be able to add this feature into our blockchain explorer? Since you are quite familiar to the technicalities of this stuff... we beg you in the spirit of Karma Smiley

I am sorry, I am not gonna help with that. I can help with analysis, tutoring, explanation, but I will not do that. I simply do not have time. I come to this forum to relax from programming, since I have my own company where I spend 10+ hours daily developing software. We are working on some BTC services too, so when I emty my head by writing on forum I return to development asap, we are in a hurry to catch the crypto train before it hits moon:)