Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Official block explorer

Discussion in 'Official Announcements' started by eltito, Jul 4, 2014.

  1. eltito

    eltito Active Member

    Joined:
    Apr 21, 2014
    Messages:
    157
    Likes Received:
    185
    Trophy Points:
    103
    • Like Like x 9
  2. nmarley

    nmarley Active Member

    Joined:
    Jun 28, 2014
    Messages:
    366
    Likes Received:
    424
    Trophy Points:
    133
    Is the code for this on github? The "AGPL source" link, which points to [redacted because new user], just gives "A server error occurred. Please contact the administrator."

    It seems like it would be easier all-around to just point users to github.
     
    • Like Like x 1
  3. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
    Yes, code is on github at https://github.com/darkcoinproject/darkcoin-abe - will change the link accordingly - thanks for the feedback.
     
    • Like Like x 1
  4. MangledBlue

    MangledBlue Well-known Member

    Joined:
    Jun 28, 2014
    Messages:
    1,246
    Likes Received:
    678
    Trophy Points:
    183
    Thank you :)
     
  5. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    Will set one up on my web too. :)
     
    • Like Like x 2
  6. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    flare, thanks for the code.
    I think you should update the logo to the correct "new" one (you can get the one I created for my explorer): http://explorer.darkcoin.fr/static/darkcoin-logo.png
    Also I though the coin was named Darkcoin and not DarkCoin (no capital C).
    That's all. :) Small cosmetic remarks. :D
    The block indexing is done but the explorer keeps showing me Quarkcoin (don't know why as the conf file has no mention of Quark)... Any hint on what I need to do would be appreciated.

    Edit: I only see block 0, which is not the block 0 from Darkcoin... In the database I clearly see all the blocks indexed. No idea why it isn't showing it...

    Edit 2: Ok I found out that there are 2 Abe codes on the Github, the old one not ready for Darkcoin (which is installed by make install) and the correct one that is in the build sub-directory. Will try to rebuild with the correct one now.
     
    #6 elbereth, Jul 5, 2014
    Last edited by a moderator: Jul 5, 2014
  7. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
    I never used 'make install' on this code, just followed the readme-mysql :-D

    For the changes: yes, there is some legacy stuff in this code (DarkCoin, logo, outdated abe codebase) and i already planned to update this, but was busy with other stuff :)

    Thanks for the heads up :)
     
  8. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    • Like Like x 1
  9. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    Hmm getting exceptions... :/ almost there :D
     
  10. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    Even after a rescan it still fails:
    Code:
    Exception at 106730706854732992
    Failed to catch up {'blkfile_offset': 78885005, 'blkfile_number': 100001, 'chain_id': 2, 'loader': 'blkfile', 'dirname': '/home/darkcoind/.darkcoin', 'id': Decimal('1')}
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2620, in catch_up
        store.catch_up_dir(dircfg)
      File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 2884, in catch_up_dir
        store.import_blkdat(dircfg, ds, blkfile['name'])
      File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 3011, in import_blkdat
        b = store.parse_block(ds, chain_id, magic, length)
      File "/usr/local/lib/python2.7/dist-packages/Abe/DataStore.py", line 3044, in parse_block
        d['transactions'].append(deserialize.parse_Transaction(ds))
      File "/usr/local/lib/python2.7/dist-packages/Abe/deserialize.py", line 92, in parse_Transaction
        d['txOut'].append(parse_TxOut(vds))
      File "/usr/local/lib/python2.7/dist-packages/Abe/deserialize.py", line 67, in parse_TxOut
        d['value'] = vds.read_int64()
      File "/usr/local/lib/python2.7/dist-packages/Abe/BCDataStream.py", line 72, in read_int64
        def read_int64  (self): return self._read_num('<q')
      File "/usr/local/lib/python2.7/dist-packages/Abe/BCDataStream.py", line 110, in _read_num
        (i,) = struct.unpack_from(format, self.input, self.read_cursor)
    error: unpack_from requires a buffer of at least 8 bytes
     
  11. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,573
    Likes Received:
    1,652
    Trophy Points:
    1,283
    Why are darkcoin addresses encoded with the wrong prefix? (Looks like testnet addresses.)
    I've been wondering about that since the beginning...
     
    • Like Like x 1
  12. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    Vertoe, the software apparently stores the pubkey hash and convert it for display only. Maybe that parts needs to be adapted to display the one with the "X".
     
    • Like Like x 1
  13. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
    Me too - nevertheless the "m...." adresses are obviously identical to their "X..." counterparts. Have to dig deeper in the explorer code to understand how the different encodings work - and how to change the explorer display :)
     
  14. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    flare, does the explorer on io/qa runs by indexing the datadir directly or via RPC call?
     
  15. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
    Indexing datadir yet, but planning to migrate to rpc call. Had the error you encountered too, i think that's because the block format was changed (votes moved from "body" to "header" and the code of explorer does not know how to handle the new data structure. Resolved it by restarting the indexing several times, don't know why it finally picked up again :D

    But as stated: Planning to refurbish the explorer anyway...
     
  16. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    I think it fails when the block on the disk is not complete or something (writing by darkcoind while reading?)...
    I don't think the RPC calls can work with my setup without changing the code. Will try that.
     
  17. iceker

    iceker New Member

    Joined:
    Jun 26, 2014
    Messages:
    9
    Likes Received:
    3
    Trophy Points:
    3
    赶紧更新把
     
    • Like Like x 1
  18. acidburn

    acidburn Active Member

    Joined:
    May 26, 2014
    Messages:
    467
    Likes Received:
    175
    Trophy Points:
    113
    Any chance of an API on this?
     
  19. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
  20. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
    大概下周 :)
     
  21. elbereth

    elbereth Active Member
    Dash Support Group

    Joined:
    Mar 25, 2014
    Messages:
    440
    Likes Received:
    466
    Trophy Points:
    133
    Dash Address:
    XkfkHqMnhvQovo7kXQjvnNiFnQhRNZYCsz
    Ok, if anyone is interested, here is my version (that runs on http://explorer.darkcoin.fr):
    https://github.com/elbereth/darkcoin-abe/
    I fixed RPC catch up (wasn't working), fixed branding and address version, removed junk folders (with obsolete code).
    A pull request was sent towards the original fork.

    To fix the addresses prefix not being "X", if you already have it running (flare ):
    Change in chain table for DRK, the field address_version to "L" (hex 4c).
     
    • Like Like x 4
  22. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,573
    Likes Received:
    1,652
    Trophy Points:
    1,283
    It's using the Bitcoin testnet pubkey hash prefix (111 or 0x6f), it must be hidden somewhere in the code...
    https://en.bitcoin.it/wiki/List_of_address_prefixes

    Edit, didn't see elbereth s post, good work!
     
  23. flare

    flare Administrator
    Dash Core Team Moderator

    Joined:
    May 18, 2014
    Messages:
    2,287
    Likes Received:
    2,406
    Trophy Points:
    1,183
  24. guo

    guo New Member

    Joined:
    Jun 21, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    还以为要跑路了呢
     
  25. drakee

    drakee New Member

    Joined:
    Aug 3, 2014
    Messages:
    25
    Likes Received:
    13
    Trophy Points:
    3
  26. chaeplin

    chaeplin Active Member
    Core Developer

    Joined:
    Mar 29, 2014
    Messages:
    749
    Likes Received:
    356
    Trophy Points:
    133
    • Like Like x 1
  27. drakee

    drakee New Member

    Joined:
    Aug 3, 2014
    Messages:
    25
    Likes Received:
    13
    Trophy Points:
    3
    Ah, Thanks!
     
  28. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,573
    Likes Received:
    1,652
    Trophy Points:
    1,283
  29. iHeartSmartArt

    Joined:
    May 2, 2014
    Messages:
    151
    Likes Received:
    59
    Trophy Points:
    88
    A new Block Explorer came out for multiple coins called Blockr http://btc.blockr.io/ It is maintained by coinbase. No darkcoin yet, I'm afraid.

     
  30. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,573
    Likes Received:
    1,652
    Trophy Points:
    1,283
    Lol they have megacoin and digitalcoin...