For the decentralized blockexplorer to work perfectly, we are going to need to create a unique
coin identification system.
Every coin hosted is going to need a
coinID.
Much like the internet needs domain URLs to be able to give meaningless IPs a more recognizable identifier, our decentralized explorer will need a way to tie the
blockchain of a coin to the
design of a coin.
And much like the internet could work even if we didn't have URLs and typed in only IPs into the browser, the decentralized blockexplorer
will work without coinIDs, it will just not look that good and require that the user has some additional knowledge.
With "design of a coin" we specifically mean things like logo or name (which both might change over time), and the problem we are trying to solve arises since the decentralized blockexplorer
only analyzes the blockchain data itself, it has no clue whatsoever what the actual name and logo of a coin is. (or if suddenly the coin goes by a different name.)
There is no way to derive a coin's name or its logo or even its official P2P port just by looking at the blockchain.
Therefor we need a system that creates a bridge between the blockchain of a coin (that the UBA dissects completely) and the design of a coin (which the decentralized blockexplore wants to use within the wallet).
Since the decentralized explorer must be capable of showing a coin's name / logo, as demonstrated here...
...or here...
...we are going to need an external feed of all the data that can give us this extra knowledge about the design of all available coins.
For the spreadcoin wallet this will be solved by using an external folder with lots of 16x16 pixel logo icons and a JSON file that lists relevant coin design data (like name, abbreviation, official port, etc..)
Finally the subsequent question is:
what is the best format for such an identifier?Can't it be just the name of a coin?
No, we have for example two different coins which are both called bytecoin, which is hilarious.
Also as mentioned earlier a coin name can change at any time, and its blockchain couldn't care less.
So for the coinID we need something that is much more stable and fixed, and that we can expect will
never ever change.Currently, for our project, we are going to use a combination of the
4 magic bytes of a coin's blockchain and the
4 bytes of the timecode of the genesis block's creation.
This leads for example to the following coinIDs for a few well-known coins:
Spreadcoin = 4f3c5cbb53d75160
Bitcoin = f9beb4d9495fab29
Dash = bf0c6bbd52db2d02
Litecoin = fbc0b6db4e8eaab9
This means, that the wallet can now easily choose the right logos and read out the correct name of a coin from the JSON.(format to be specified)
It can do that, because it will understand what the UBA means when it says "4f3c5cbb53d75160".
The coinID folder will look similar to this:
Now, we are still not 100% sure that this coinID format is
completely collision-free (meaning, no 2 coins have the same ID) that's why we are also considering other genesis block variables.
If you want to take a look at how we are extracting and processing all known coins with the goal to create a system of collision-free coinIDs, you might take a look at the
Genesis-Extractor.Read more about this tool at github:
https://github.com/servicenodes/genesisextractoror in this thread here:
http://spreadcointalk.org/index.php?topic=731.0