Bitcoin Forum
June 18, 2024, 04:54:07 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: New algo implementation + some wired issue ! Help  (Read 676 times)
XaiZou (OP)
Member
**
Offline Offline

Activity: 80
Merit: 10


View Profile
August 26, 2015, 10:21:04 PM
Last edit: August 27, 2015, 12:27:46 AM by XaiZou
 #1

Hi,

I implemented a new Hard memory algo, everything works perfectly , genesis block, nTime, etc are set and all good!

Code:
bnProofOfWorkLimit = CBigNum(~uint256(0) >> 8); // low diff for very slow algo

[color=blue]genesis.nBits[/color]    = 0x2000ffff; // i tried this

genesis.nBits    = bnProofOfWorkLimit.GetCompact(); // and tried this and i believe its same as above

tow clients(wallets) working on 2 PCs, one is solo mining ~500 Hashes/s

Block are being generated on PC one and PC tow is also accepting them.


BUT after each block found i get the lines in red WHY  Huh  Shocked?:

hashmeter    532 hash/s
CheckWork() : new proof-of-work block found  
  proof hash: 007e776d95475f275c91dec26312e28045b3315f6ee3b7b4dc310def89db8468  
target: 00ffff0000000000000000000000000000000000000000000000000000000000
CBlock(hash=007e776d95475f275c91dec26312e28045b3315f6ee3b7b4dc310def89db8468, ver=7, hashPrevBlock=00c5c963dcbadb709800f65bda61711afbbfaa2a588581ac20aae3b3d389c3ea, hashMerkleRoot=31a680a8caf767566266c184c733d807005f9242534900f51fea15c017613fa3, nTime=1440627052, nBits=2000ffff, nNonce=246, vtx=1, vchBlockSig=)
  Coinbase(hash=31a680a8caf767566266c184c733d807005f9242534900f51fea15c017613fa3, nTime=1440626603, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 530101)
    CTxOut(nValue=3.00, scriptPubKey=OP_DUP OP_HASH160 cad38bd917f84bfb078f9a8d5536cc8c462a06f4 OP_EQUALVERIFY OP_CHECKSIG)

  vMerkleTree:  31a680a8caf767566266c184c733d807005f9242534900f51fea15c017613fa3

generated 3.00
keypool keep 5

AddToWallet 31a680a8caf767566266c184c733d807005f9242534900f51fea15c017613fa3  new
SetBestChain: new best=007e776d95475f275c91dec26312e28045b3315f6ee3b7b4dc310def89db8468  height=3  trust=1024  blocktrust=256  date=08/26/15 22:10:52
ProcessBlock: ACCEPTED
keypool added key 106, size=101
keypool reserve 6
Running Miner with 1 transactions in block (174 bytes)

hashmeter    524 hash/s
ERROR: CheckProofOfWork() : hash doesn't match nBits
ERROR: CBlock::ReadFromDisk() : errors in block header


achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6709


Just writing some code


View Profile WWW
August 26, 2015, 10:33:11 PM
 #2

That means there is something in your code for verifying blocks that is not properly verifying the blocks.

XaiZou (OP)
Member
**
Offline Offline

Activity: 80
Merit: 10


View Profile
August 26, 2015, 11:33:06 PM
 #3

That means there is something in your code for verifying blocks that is not properly verifying the blocks.

This is really wired, i didn't touch anything in the code yet , what i did is just change the values in chainparams.cpp and hashblock.h + added the algo files.

I noticed once a block is found the wallet freeze for like 10 sec before it shows in the transaction list, and the other PC wallet also freeze 20 sec before accepting the block.

also before changing the algo it was whirlpool and was good with no problem.

any more ideas ?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3430
Merit: 6709


Just writing some code


View Profile WWW
August 26, 2015, 11:45:28 PM
 #4

That means there is something in your code for verifying blocks that is not properly verifying the blocks.

This is really wired, i didn't touch anything in the code yet , what i did is just change the values in chainparams.cpp and hashblock.h + added the algo files.

I noticed once a block is found the wallet freeze for like 10 sec before it shows in the transaction list, and the other PC wallet also freeze 20 sec before accepting the block.

also before changing the algo it was whirlpool and was good with no problem.

any more ideas ?
Well you should probably go and check out the code for block verification. There might be something there that is causing your problems. It might just be something that needs to be changed to match your algo.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!