Page MenuHomePhabricator

[backport#14862]Declare BlockValidity:HEADER reserved
ClosedPublic

Authored by PiRK on Oct 15 2020, 08:01.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABCeba575e95d47: [backport#14862]Declare BlockValidity:HEADER reserved
Summary

PR description:

BLOCK_VALID_HEADER was never used and the comment is confusing to me in several ways

  • It claims "version ok". However, without the previous header, it is not possible to check the validity of the version since the height needs to be known (c.f. BIP 90)
  • It claims "hash satisfies claimed PoW". While it is possible to check against the claimed PoW, it is not possible without the previous header to check that the claimed PoW is itself valid.
  • It claims "1 <= vtx count <= max". However, with the header alone and current consensus rules, the number of transactions is unknown.

Comment by @sipa:

The BLOCK_VALID_* values predate headers-first sync, and I probably had the possibility of more granular validation in mind at the time.

Backport of Core PR14862

Test Plan

ninja && ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable