Page MenuHomePhabricator

Merge #11737: Document partial validation in ConnectBlock()
ClosedPublic

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

Details

Summary

PR11737 backport https://github.com/bitcoin/bitcoin/pull/11737/files
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

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

Event Timeline

markblundeberg created this revision.Sun, Jul 7, 16:07
Herald added a reviewer: Restricted Project. · View Herald TranscriptSun, Jul 7, 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.Mon, Jul 8, 06:37
This revision is now accepted and ready to land.Mon, Jul 8, 06:37