Author

Topic: Leggere il file di log generato dal Wallet in una sessione di Solo Mining (Read 490 times)

legendary
Activity: 1932
Merit: 1042
https://locktrip.com/?refId=40964
legendary
Activity: 1932
Merit: 1042
https://locktrip.com/?refId=40964
..oggi ho provato a minare in solo summercoin fin da subito.
sto cercando di capire il log generato dal wallet nella fase di mining in solo per vedere se le monete accreditate sono corrette..
dunque... minando in solo i casi sono 2:
o trovi un blocco e viene accettato o trovi un blocco e questo va in stale.
Ecco come ho proceduto per cercare di "leggere" il log...
ho preso "ID della transazione" di un blocco minato.
Per esempio 267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5
e l'ho cercato nel log.
ecco cosa ho trovato:
"new proof-of-work block found" sembra il messaggio che logga il wallet quando viene trovato l'hash del nuovo blocco
"CTxOut(nValue=1480.00" e "CTxOut(nValue=20.00" solo il valore accreditato sul mio wallet e 20 sono le monete che per ogni blocco il dev cede in beneficieza.
"AddToWallet 267fa275d8  new" sembra l'istruzione che aggiorna il contatore delle monete nel wallet
"ProcessBlock: ACCEPTED" questo forse è il messaggio che indica che l'operazione è andata a buon fine.

Code:
[b]CheckWork() : new proof-of-work block found  [/b]
  hash: 00000003b0bea6892320a949df37819fd67b0da289d4b506d0c248a1fceda651  
target: 00000003fffc0000000000000000000000000000000000000000000000000000
CBlock(hash=00000003b0bea6892320a949df37819fd67b0da289d4b506d0c248a1fceda651, ver=6, hashPrevBlock=0000000176dd1ea7c0466de395696c442975405b5e6c9b63265e87924e7aab08, hashMerkleRoot=267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5, nTime=1398708216, nBits=1d03fffc, nNonce=526045, vtx=1, vchBlockSig=)
  Coinbase(hash=267fa275d8, nTime=1398708216, ver=1, vin.size=1, vout.size=2, nLockTime=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 022e010108)
    CTxOut[b](nValue=1480.00[/b], scriptPubKey=OP_DUP OP_HASH160 1db90e7e0f31294f0309328572b3d8dc1fbf098a OP_EQUALVERIFY OP_CHECKSIG)
    CTxOut([b]nValue=20.00[/b], scriptPubKey=OP_DUP OP_HASH160 9d12999dad778a2ac107abc6f76b924062858eaa OP_EQUALVERIFY OP_CHECKSIG)
  vMerkleTree: 267fa275d8
[b]generated 1500.00[/b]
[b]AddToWallet 267fa275d8  new[/b]
NotifyTransactionChanged 267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5 status=1
NotifyTransactionChanged 267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5 status=0
updateWallet 267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5 1
SetBestChain: new best=00000003b0bea6892320  height=302  trust=21152193924  blocktrust=1073758208  date=04/28/14 18:03:36
ProcessBlock: ACCEPTED
   inWallet=1 inModel=0 Index=0-0 showTransaction=1 derivedStatus=0
updateWallet 267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5 0
   inWallet=1 inModel=1 Index=0-1 showTransaction=1 derivedStatus=0
Warning: updateWallet: Got CT_NEW, but transaction is already in model
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
IRC got join
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
received getdata for: block 00000003b0bea6892320
accepted connection 70.176.73.232:60464
IRC got join
send version message: version 60013, blocks=302, us=79.56.0.98:11110, them=70.176.73.232:60464, peer=70.176.73.232:60464
Added time data, samples 67, offset -6 (+0 minutes)
nTimeOffset = -1  (+0 minutes)
Moving 70.176.73.232:11110 to tried
receive version message: version 60013, blocks=301, us=79.56.0.98:11110, them=70.176.73.232:11110, peer=70.176.73.232:60464
received block 0000000825a680abbfbb
ProcessBlock: ACCEPTED
Flushing wallet.dat
Flushed wallet.dat 7ms
getblocks 248 to 00000007fca9e9ab3967 limit 500
  getblocks stopping at 251 00000007fca9e9ab3967
received block 000000033e451005664c
SetBestChain: new best=000000033e451005664c  height=303  trust=22225952132  blocktrust=1073758208  date=04/28/14 18:03:37
NotifyTransactionChanged 267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5 status=1
ProcessBlock: ACCEPTED
updateWallet 267fa275d80d8e7929f47e373f3d96953aada23255fbaa34cab95d22d22b04a5 1
   inWallet=1 inModel=1 Index=0-1 showTransaction=1 derivedStatus=1

altro caso quando il blocco minato va in stale
anche quì abbiamo il messagio "CheckWork() : new proof-of-work block found" che indica che un blocco è stato risolto.
Prova ad accreditare i 1480 coins e 20 sui 2 indirizzi.
ma il checkWork da errore "ERROR: CheckWork() : generated block is stale"
il processo si conclude con "ProcessBlock: ACCEPTED"

Code:
[b]CheckWork() : new proof-of-work block found[/b]
  hash: 0000014926625b19de3470ee0ff64dd533ae9a3e208cd0d778983d5369f9108e  
target: 00000fffff000000000000000000000000000000000000000000000000000000
CBlock(hash=0000014926625b19de3470ee0ff64dd533ae9a3e208cd0d778983d5369f9108e, ver=6, hashPrevBlock=000008d9fd3630515f6f9d6f7e8f677b2c10527313508a609bc5291b0313e0d5, hashMerkleRoot=de9634270757be3a37b40fbaa152273027be5bee0fdf286ecb9e078354bc9761, nTime=1398708030, nBits=1e0fffff, nNonce=354861, vtx=1, vchBlockSig=)
  Coinbase(hash=de96342707, nTime=1398708030, ver=1, vin.size=1, vout.size=2, nLockTime=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 01120101)
    CTxOut[b](nValue=1480.00[/b], scriptPubKey=OP_DUP OP_HASH160 1db90e7e0f31294f0309328572b3d8dc1fbf098a OP_EQUALVERIFY OP_CHECKSIG)
    CTxOut([b]nValue=20.00[/b], scriptPubKey=OP_DUP OP_HASH160 9d12999dad778a2ac107abc6f76b924062858eaa OP_EQUALVERIFY OP_CHECKSIG)
  vMerkleTree: de96342707
generated 1500.00
[b]ERROR: CheckWork() : generated block is stale[/b]
getblocks 8 to 00000000000000000000 limit 500
received block 0000009594cfd72f055d
SetBestChain: new best=0000009594cfd72f055d  height=20  trust=22020117  blocktrust=1048577  date=04/28/14 18:00:29
[b]ProcessBlock: ACCEPTED[/b]

quindi io mi aspettavo di trovarmi N blocchi minati per quanti messaggi
generated 1500.00
AddToWallet 267fa275d8  new
mi trovo nel log del wallet...

ma così non è.
Il dubbio mi è venuto perchè i pop up in basso a destra, dei blocchi trovati erano molti di più di quanti poi effettivamente me ne ritrovo nel wallet che sono solo 3.
Sicuramente non c'ho capito una mazza.. e volevo una spiegazione da chi ne capisce più di me....

potrei vedere il codice c++ del wallet su github, ma purtroppo non ho competenze su c++...
quindi mi affido a chi ne capisce più di me per avere una "lezione" su come si legge il log generato dal wallet...

inoltre penso che sia cosa gradita per la comunità!!!!  Grin Grin Grin Grin

CIAO BBBBELLII!!!
Jump to: