Status Report
I haven't spent hours in a row on the block explorer today. Got back to work: meetings & stuff >> late at home.
To have a check everything is correct, I wanted to look for a POS block with more than 2 transactions and got one with five transactions. It's like searching for a needle in a haystack: there are currently over 500000 blocks and counting, but for testing, I have loaded the first 290000 blocks.
So it's time to compare this to what the actual block looks like.
Let's start with the wallet data. I queried Block N° 52855 by issuing the command:
~/Wallets/Minerals/Mineralsd getblock 82b31e41cff8016ae0b5dff2ec4b855a776c43c994b9785cc8f084ed89dfc2edThe data my query returned is this:
{
"hash" : "82b31e41cff8016ae0b5dff2ec4b855a776c43c994b9785cc8f084ed89dfc2ed",
"confirmations" : 223081,
"size" : 1235,
"height" : 52855,
"version" : 6,
"merkleroot" : "de6eb3060082101c5b44c2565e17635c5c9712adaa53ea5543e5fc54d6da8861",
"mint" : 0.27414167,
"time" : 1403983515,
"nonce" : 0,
"bits" : "1d5023cc",
"difficulty" : 0.01247800,
"blocktrust" : "331c547",
"chaintrust" : "1de5887ba500b8",
"previousblockhash" : "bd204633cee3b3db7fcecb225f06a53f6974a78080a88316321682e17f55478a",
"nextblockhash" : "1c56453a637b894cf706e8e51bf7590865eb23c61994ad0a5f13ca2320bf4168",
"flags" : "proof-of-stake",
"proofhash" : "00006405c8cbbcf0434732d1157ba7006ecac41fb2ae3fbd39e94e7ab4b1b052",
"entropybit" : 1,
"modifier" : "bea0d591cefe4188",
"modifierchecksum" : "d1fab31b",
"tx" : [
"67d084892eda4e0d6e4a98446a8c9fd80175106f9d92fde2b37381c140505bf1",
"e42d4e3607c929db4bb4bbf6e131bda10e103ac9ea8c9d0e11f44035cbf38959",
"4fe0591dbe459c408bb72934bc1f1e3b60649dd54bd2fdf54c7e6f80aba91f27",
"e3b996388e726ecd059ff3956634a4a8065e1d50420bb1826ec063a05cb60d47",
"04bb6573b3035d3d099e291b379b3a35556bbab39f29081ca6d1aeaf471ab877"
],
"signature" : "30440220769282ac17a1822a56ee9e1c3b45bbee2f09c10537da2f2320f803b37e351c690220455fc0fcad68bc2a4cf61ebb7efed309bd24aa53330a9a167c823c7caf6a4237"
}
As you can see, the data shown by the block explorer corresponds to the data returned by querying the wallet.
However, a few thing are not clear yet and it needs some modifications to the python code for improved understanding:
- Clearly show the type of block: Proof-Of-Work or Proof-Of-Stake
- Clearly show the amount of mined or minted minerals. This is currently shown as value out, but it is the sum of everything.
In this case, the amount of minted Minerals is 0.27414167 MIN. It is the sum of the the transaction fee of 0.27411167 MIN and the transaction fees of 0.00001 MIN, equaling the amount of the "mint"-field.
I think this is not clear what exactly is the the stake you earned and what is part of other transaction that do not neccessarily belong to your addresses in the current version of ABE, especially when it's only transactions with fractions of a Mineral.
At this moment, I do not know yet if it is just a matter of a few python statements with the data returned by the SQL query run against the DB or if it's stored this way in the DB.
Whatever it is, it needs some work to be done, with taking care of not destroying functionality for other currencies.
If you run:
~/Wallets/Minerals/Mineralsd getblock 82b31e41cff8016ae0b5dff2ec4b855a776c43c994b9785cc8f084ed89dfc2ed trueYou will get a detailed report of the block, where each individual transaction is reported with its value, pubKey, sequence, checksig, etc...
Another example of a less complex PoS Block N° 66666:
{
"hash" : "6a9c6b57a11754b45785c8803ba68fc57b162b385aa17d8200c85de82c7a5589",
"confirmations" : 209270,
"size" : 444,
"height" : 66666,
"version" : 6,
"merkleroot" : "c3182ca67f0d98a8f711a65770f1b8ab3d0bc3f082e2253a7b8de05dcee3815a",
"mint" : 0.19776375,
"time" : 1404361681,
"nonce" : 0,
"bits" : "1e008c13",
"difficulty" : 0.00713896,
"blocktrust" : "1d3ddc2",
"chaintrust" : "1de610f2ff5927",
"previousblockhash" : "4df7baee846ee3592f2397bc165a8d8681e21ca08202b3cbb93ef24b3572bc04",
"nextblockhash" : "6d1b1df951520020f65abb23c76f2daa838fa6b5edcfdf01650837c8bccc8bd6",
"flags" : "proof-of-stake",
"proofhash" : "0000966a553d6f2ad59e406c3bcb5c04bce22bcb70da17b069aa5d77e84716f7",
"entropybit" : 1,
"modifier" : "1694610e309c0d17",
"modifierchecksum" : "eb932dde",
"tx" : [
"760b082666bbe09a0bb6c21752c1a30363f53ca5bf4c9652f20ff8303a307f18",
"72bffff3b652b3d563d198a5f24e6e36230b813f7daac86cf51a4c51017117ee"
],
"signature" : "3044022075931f06c075b11011b9db103c7a77b293aced676e47dc10dd66857bbd469aa302200b56b4974496595e39878c1e42d59e017222aaed58fd8ec3d026a8999a7aab44"
}
The fee is the amount corresponding to the amount in the "mint"-field.
And a PoW Block N° 7777:
{
"hash" : "00000000015ba0e4d68479a77a2cd3197137fb524e9a1755dc3ca32a6e9c78f1",
"confirmations" : 268159,
"size" : 225,
"height" : 7777,
"version" : 6,
"merkleroot" : "055b71deebb46554394cf584d2485f87e31e1a4c5963910c7892bcbd4ba89437",
"mint" : 1500.00000000,
"time" : 1402823369,
"nonce" : 35211134,
"bits" : "1c031282",
"difficulty" : 83.32402928,
"blocktrust" : "535346e88c",
"chaintrust" : "fc6d677cfeea0",
"previousblockhash" : "0000000001ff2e7214eae45e187edf929cad1075279687b410352dedaa862dd3",
"nextblockhash" : "000000000298b5a296b18881e236f61895bcd7632bca8d52ab4fc30f84e2351c",
"flags" : "proof-of-work",
"proofhash" : "00000000015ba0e4d68479a77a2cd3197137fb524e9a1755dc3ca32a6e9c78f1",
"entropybit" : 1,
"modifier" : "29c2e5810fc8ae18",
"modifierchecksum" : "696ac327",
"tx" : [
"055b71deebb46554394cf584d2485f87e31e1a4c5963910c7892bcbd4ba89437"
]
}
The "mint"-field reports the block reward for PoW-mining: 1500 MIN.
I will build Minerals-qt too, to check certain of my own transactions and verify the correct amount of interest/stake you mint received and reported by wallet.
Good...
Do you think it's workable if I already deploy this as our first basic block explorer?I hope to be able to improve it over time.