HomePhabricator

[test] Add regression test for D16879

Description

[test] Add regression test for D16879

Summary:
Add a test to show that an attacker cannot clear the download state for other peers by send an invalid mutated block.

This is a partial backport of core#29412
https://github.com/bitcoin/bitcoin/pull/29412/commits/5bf4f5ba32da4627f152b54d266df9b2aa930457

Test Plan:
Run this test before and after D16879, to show that the test failed before and works after this diff

git checkout 2701a514b014122ad024b6d2cf9e0098cd7adc5b
ninja && test/functional/test_runner.py p2p_mutated_blocks

git checkout 5a3dd8183dfc2459aa976deccff2b4f03a737180
ninja && test/functional/test_runner.py p2p_mutated_blocks

A minor patch is required in blocktools.py to make this test work on those old commits: add the txlist argument to create_coinbase (see D17691)

Reviewers: #bitcoin_abc, roqqit

Reviewed By: #bitcoin_abc, roqqit

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18005

Details

Provenance
dergoegge <n.goeggi@gmail.com>Authored on Feb 2 2024, 16:16
PiRKCommitted on Tue, Apr 29, 19:32
PiRKPushed on Tue, Apr 29, 19:32
Reviewer
Restricted Project
Differential Revision
Restricted Differential Revision
Parents
rABC8ebbda579e21: [avalanche] Only re-add contenders to the cache if the remote proof is present
Branches
Unknown
Tags
Unknown

Event Timeline

PiRK added an edge: Restricted Differential Revision.