Skip to content

Headers bps#6164

Closed
PastaPastaPasta wants to merge 7 commits into
dashpay:developfrom
PastaPastaPasta:headers_bps
Closed

Headers bps#6164
PastaPastaPasta wants to merge 7 commits into
dashpay:developfrom
PastaPastaPasta:headers_bps

Conversation

@PastaPastaPasta
Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Subset of #6097 to see if all issues are addressed by dropping a few commits

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

kwvg added 7 commits July 31, 2024 09:20
…Block

this commit will not work with `--enable-c++20` as c++20 does away with
aggregate initialization when constructors are declared. a partial
backport of bitcoin#24169 will sort that out.
bitcoin#25404 introduces a 10 point penalty for remitting more than
MAX_BLOCKS_TO_ANNOUNCE unconnected block headers. Whether they are
connected or not is determined by taking the first entry and running
its hashPrevBlock through LookupBlockIndex. This new behaviour causes a
test failure in p2p_dos_header_tree.py in Dash.

Bitcoin doesn't face a test failure with this new behaviour as the first
non-fork block in its test data is the dump for block 1 (00000000b873e7
9784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206) but Dash uses block
0 (00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c),
the genesis block.

By definition of a genesis block, it has a hashPrevBlock of 0, which
cannot be looked up. This trips the penalty. This doesn't cause any
problems in the field as nobody is expected to ever broadcast the
genesis block but it does cause a test failure for us.

We need to correct that by getting rid of the genesis block from the
test data.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 9, 2024

This pull request has conflicts, please rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants