Page MenuHomePhabricator

[backport#14862]Declare BlockValidity:HEADER reserved

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


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

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

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