Page MenuHomePhabricator

net_processing: drop MaybePunishNodeForTx
DraftPublic

Authored by PiRK on Fri, Nov 14, 12:18.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Do not discourage nodes even when they send us consensus invalid
transactions.

Because we do not discourage nodes for transactions we consider
non-standard, we don't get any DoS protection from this check in
adversarial scenarios, so remove the check entirely both to simplify the
code and reduce the risk of splitting the network due to changes in tx
relay policy.

This is a partial backport of core#33050
https://github.com/bitcoin/bitcoin/pull/33050/commits/266dd0e10d08c0bfde63205db15d6c210a021b90
https://github.com/bitcoin/bitcoin/pull/33050/commits/876dbdfb4702410dfd4037614dc9298a0c09c63e

Test Plan

ninja all check-all

Event Timeline

revert accidental squash

@bot build-chronik chronik-client-integration-tests

Failed tests logs:

====== AgoraPartial enforcedLockTime: AgoraPartial enforcedLockTime AgoraPartial enforcedLockTime ======
AssertionError: expected promise to be rejected with an error including 'Failed getting /broadcast-tx: 400: Br…' but got 'Failed getting /broadcast-tx: 400: Br…'

      + expected - actual

      -Failed getting /broadcast-tx: 400: Broadcast failed: Transaction rejected by mempool: mempool-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation), input 2 of f9844a277cfe190f3bc9abe30921d6b1e80f6748249e4c3cc342902f0280df23, spending f7a455f0d2cc521ce071223e7f219155f5c4029ef8a11d1c93128ac6a82bff72:1
      +Failed getting /broadcast-tx: 400: Broadcast failed: Transaction rejected by mempool: mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation)

Each failure log is accessible here:
AgoraPartial enforcedLockTime: AgoraPartial enforcedLockTime AgoraPartial enforcedLockTime

The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.