Page MenuHomePhabricator

test: p2p: remove tests for header messages that are oversized due to the MAX_HEADERS_RESULTS limit
ClosedPublic

Authored by PiRK on Wed, Apr 30, 12:19.

Details

Summary

The headers message has a size limit, determined by the number of headers, which is triggered at approximately 160,000 bytes (80 bytes × 2,000 headers), about one order of magnitude below the tested message sizes. Logs show the node rejecting these messages, as indicated by the following lines:

Misbehaving: peer=0 (0 -> 20): too-many-headers: headers message size = 2097146
Misbehaving: peer=0 (0 -> 20): too-many-headers: headers message size = 1999996
Misbehaving: peer=0 (0 -> 20): too-many-headers: headers message size = 999996

So contrary to the intent of the test, the tested network messages are no in fact "not_oversized_msg".

In a future diff the misbehavior score increment will be bumped from 20 to 100, and the peer will actually be disconnected, which would cause the removed tests to fail on conn.send_and_ping.

See D16343 for why these tests where added.

Depends on D18025

Test Plan

test/functional/test_runner.py p2p_invalid_messages

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Wed, Apr 30, 12:19
PiRK retitled this revision from test: p2p: remove test_not_oversized_msg_boundaries in test_oversized_headers_msg to test: p2p: remove tests for header messages that are oversized due to the MAX_HEADERS_RESULTS limit.Wed, Apr 30, 12:25
PiRK edited the summary of this revision. (Show Details)
PiRK edited the summary of this revision. (Show Details)
roqqit added a subscriber: roqqit.
roqqit added inline comments.
test/functional/p2p_invalid_messages.py
343 ↗(On Diff #53783)

best to document this so it is obvious going forward

This revision is now accepted and ready to land.Wed, Apr 30, 16:28