Page MenuHomePhabricator

Merge #11737: Document partial validation in ConnectBlock()

Authored by markblundeberg on Jul 7 2019, 16:07.



PR11737 backport
9d811dc Document partial validation in ConnectBlock() (Suhas Daftuar)

Pull request description:

`ConnectBlock()` relies on validation that happens in `ContextualCheckBlock()` and
`ContextualCheckBlockHeader()`. This has implications for implementing consensus
changes and handling software upgrade to ensure that nodes upgrading their
software end up enforcing all the consensus rules.
Test Plan

make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.Jul 7 2019, 16:07
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 7 2019, 16:07

A rather interesting point brought up by these comments. When SigOps counting is removed, we should think carefully about this stuff (from what I can tell on first glance, it should be fine to move all SigOps counting from CheckBlock to ContextualCheckBlock, but need to think very carefully about this stuff).

That said, this is probably only an issue if you get miners who upgrade too late and happen to start building on invalid blocks.

Fabien accepted this revision.Jul 8 2019, 06:37
This revision is now accepted and ready to land.Jul 8 2019, 06:37