Page MenuHomePhabricator

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

Authored by markblundeberg on Jul 7 2019, 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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.

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