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

Don't reject version 1 blocks. #7

Merged
merged 1 commit into from
Jun 20, 2015
Merged

Don't reject version 1 blocks. #7

merged 1 commit into from
Jun 20, 2015

Conversation

glv2
Copy link

@glv2 glv2 commented Jun 20, 2015

I tried to download the testnet blockchain from scratch with ppcd, and after block 114569, all the blocks were considered as orphans.

Apparently it happened because there are some blocks with version=2 in the blockchain, and there is a test in the code rejecting blocks with version=1 if there are enough blocks with version=2.

This test is in btcd to comply with BIP0034 on the Bitcoin network, but I don't think version 1 blocks have been obsoleted on the Peercoin network (all the new blocks I saw have version=1).

So this PR disables the version 1 blocks rejection, which allows ppcd to download the blockchain completely.

@mably
Copy link

mably commented Jun 20, 2015

Are you sure of that? I've downloaded the testnet blockchain from scratch several times without any problems. Will give it another try.

@mably
Copy link

mably commented Jun 20, 2015

Got hit by same problem for block at height 114570:

Rejected block 06dd8294d2603965ef6f1f5a19e380d4a312c10c938235b8a81c6bce64ac9fed from 212.83.172.152:9903 (outbound): new blocks with version 1 are no longer valid

This wasn't happening before, something has probably changed in the code that causes this bug.

@mably
Copy link

mably commented Jun 20, 2015

@glv2 could you confirm that there is really 75 over the last 100 prev blocks before block 114570 on testnet that are at version 2? That would mean that some people minted with the develop branch around that time. It's a bit strange because they should have been hit by the same problem.

@glv2
Copy link
Author

glv2 commented Jun 20, 2015

I made a little script checking the block version for testnet blocks 114470 to 114569, and there are 25 version 1 blocks and 75 version 2 blocks.

I also checked the next 100 blocks, from 114570 to 114669, and there are 100 version 1 blocks and 0 version 2 blocks.

So it seems that someone minted with the development version (up to block 114569), then someone else minted a version 1 block (114570), which blocked the development version because of the block version check (75% version 2 blocks in the last 100 blocks => all new version 1 blocks are orphaned).

Then only the official software versions were able to continue the chain (because they don't check the block version, for them only version 1 is supposed to exist).

@mably
Copy link

mably commented Jun 20, 2015

Asked the core devs about the develop branch status: https://www.peercointalk.org/index.php?topic=4165

@mably mably merged commit 307e06d into ppcsuite:master Jun 20, 2015
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