Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testnet difficulty calculation changes, to take effect Mar 15 2014 #53

Merged
merged 2 commits into from
Mar 14, 2014

Conversation

khalahan
Copy link
Member

@khalahan khalahan commented Mar 2, 2014

No description provided.

@dthorpe
Copy link

dthorpe commented Mar 6, 2014

How to test this prior to 3/15? If I build this and fire up -testnet, will it just find new nodes with the right version and carry on?

@dthorpe
Copy link

dthorpe commented Mar 7, 2014

I've pulled this changeset into my local branch and rebuilt namecoin-qt to version 0.3.73. I deleted \users\userid\appdata\namecoin* to force a fresh start. Running namecoin-qt -testnet on two machines seems to connect to IRC and find peers ok, but the network sync gets stuck at block 2039 on both test machines. Is this expected?

@khalahan
Copy link
Member Author

khalahan commented Mar 7, 2014

No, this isn't expected, how many connections do you have ?

Try adding : -addnode=94.23.252.190
Or even -connect=94.23.252.190
(try also with an empty blockchain if it isn't sufficient)

@dthorpe
Copy link

dthorpe commented Mar 8, 2014

I deleted the testnet blockchain and restarted with your -addnode. Saw 6 peers very quickly, whereas I was only seeing 2 before.

Blocks received raced up to 2015 within a few minutes, then goes quiet. Shut down namecoin, restart, no change - 2015 blocks, 7 connections.

@dthorpe
Copy link

dthorpe commented Mar 8, 2014

This looks suspicious, from the debug.log file:

sending getdata: block 00000001136199e20959
sending getdata: block 00000007d0ac1effeb03
sending: getdata (18003 bytes) 
trying connection 203.219.186.92:18334 lastseen=-1.0hrs lasttry=-387295.6hrs
received: version (85 bytes)
Added time data, samples 3, offset -1 (+0 minutes)
sending: verack (0 bytes) 
sending: getaddr (0 bytes) 
version message: version 32464, blocks=34714
received: verack (0 bytes)
sending: addr (31 bytes) 
AddPortMapping(18334, 18334, 192.168.2.106) failed with code 718 (ConflictInMappingEntry)
received: block (215 bytes)
received block 00000000b9e4132e1a80
  nActualTimespan = 10212459  before bounds
GetNextWorkRequired RETARGET
nTargetTimespan = 1209600    nActualTimespan = 4838400
Before: 1d07fff8  00000007fff80000000000000000000000000000000000000000000000000000
After:  1d1fffe0  0000001fffe00000000000000000000000000000000000000000000000000000
ERROR: AcceptBlock() : incorrect proof of work
ERROR: ProcessBlock() : AcceptBlock FAILED
received: block (215 bytes)
received block 0000000068bbeec63cf2
ProcessBlock: ORPHAN BLOCK, prev=00000000b9e4132e1a80
sending: getblocks (741 bytes) 
received: block (215 bytes)
received block 00000000c44da0632fd7
ProcessBlock: ORPHAN BLOCK, prev=0000000068bbeec63cf2
received: block (215 bytes)
received block 00000000360575869f3b
ProcessBlock: ORPHAN BLOCK, prev=00000000c44da0632fd7

Those ERROR lines about incorrect proof of work... and then a bunch of orphan blocks reported afterwards... is this a fork in the blockchain?

@dthorpe
Copy link

dthorpe commented Mar 11, 2014

Any ideas on this? None of my namecoin instances is successfully sync'ing the blockchain on testnet. Syncing on regular blockchain works fine.

@khalahan
Copy link
Member Author

Thank you for the report dthorpe.
I suspect this is due to this commit : 98d070614bc492ae767112e1c61d368f0abc2440.

Can you try a "git revert 98d070614bc492ae767112e1c61d368f0abc2440" and restart namecoind ?
I'll do some tests on my side too.

Allow mining of min-difficulty blocks if 20 minutes have gone by without mining a regular-difficulty block.
Normal rules apply every 2016 blocks, though, so there may be a very-slow-to-confirm block at the difficulty-adjustment blocks.
@khalahan
Copy link
Member Author

I've tested with "git revert 98d0706" and the blockchain has been downloaded until last block.
I've updated the merge request and removed the commit 98d0706.

khalahan added a commit that referenced this pull request Mar 14, 2014
Testnet difficulty calculation changes, to take effect Mar 15 2014
@khalahan khalahan merged commit 8324841 into namecoin:namecoinq Mar 14, 2014
@dthorpe
Copy link

dthorpe commented Mar 16, 2014

Yes, reverting 98d0706 fixed the testnet sync issue for me.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants