Skip to content

CBlock::AcceptBlock() scans almost the entire block chain on every block #32

@haraldg

Description

@haraldg

CBlock::AcceptBlock() in main.cpp calls Checkpoints::CheckSync() which walks the block chain from the current hight back to the last checkpoint. As far as I understand the white paper, NeuCoin doesn't use checkpoints, causing CheckSync() to actually walk (almost) the entire block chain. This is also supported by live data:

harald@hdev:~$ neucoind getcheckpoint
{
    "synccheckpoint" : "0000002116c928d1b212578d6d13ada478bb22cc7f82c38a743ee60,
    "height" : 600,
    "timestamp" : "2015-09-20 11:20:37 UTC"
}

This is not a problem yet (though it consumes some ressources) but it might be abused for DoS attacks. I recommend removing the call to Checkpoints::CheckSync() from CBlock::AcceptBlock() before the next release of neucoin.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions