Skip to content

Conversation

@furszy
Copy link

@furszy furszy commented Jan 11, 2021

Adapted from bitcoin#11583, following the same rationale:

We have to be much more conservative when using LogPrintf/error or other things which unconditionally log to debug.log, It should not be the case that an inbound peer can fill up a users disk with debug.log entries (DoS).

This rule should be applied in many other areas of the sources as well (not only on the net area). But well, step by step.

@furszy furszy self-assigned this Jan 11, 2021
We should generally avoid writing to debug.log unconditionally for
inbound peers which misbehave (the peer being about to be banned
being an exception, since they cannot do this twice).

To avoid removing logs for outbound peers, a new log is added to
notify users when a new outbound peer is connected which mimics
the version print.
@furszy furszy force-pushed the 2020_backport_11583 branch from bc8c1b8 to 4801464 Compare January 11, 2021 15:29
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 4801464

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 4801464

@random-zebra random-zebra added the Needs Backport Placeholder tag for anything needing a backport to prior version branches label Jan 13, 2021
@random-zebra random-zebra merged commit faa5290 into PIVX-Project:master Jan 13, 2021
Fuzzbawls pushed a commit to Fuzzbawls/PIVX that referenced this pull request Jan 14, 2021
We should generally avoid writing to debug.log unconditionally for
inbound peers which misbehave (the peer being about to be banned
being an exception, since they cannot do this twice).

To avoid removing logs for outbound peers, a new log is added to
notify users when a new outbound peer is connected which mimics
the version print.

Github-Pull: PIVX-Project#2130
Rebased-From: 4801464
furszy added a commit that referenced this pull request Jan 14, 2021
40a66b6 [Net] Add new mainnet checkpoint for main net block 2678402 (random-zebra)
e3ce162 [Consensus] Bump active protocol to 70921 (random-zebra)
5b9592b Tests: Add block value test to budget_tests.cpp (random-zebra)
6f0e0a8 Consensus: Fix IsBlockValueValid for superblocks (random-zebra)
570f038 [Masternodes] Don't ban invalid pings before enforcement (random-zebra)
3e86266 [DB] Don't check file contents when dumping budgets/mnodes/payments (random-zebra)
30f41fe [DB] Add database version to the cache files for tiertwo managers (random-zebra)
b9800ef Check interruptNet during dnsseed lookups (Matt Corallo)
a0184d2 [Cleanup] Remove unused CInv string-ctr, make GetCommand private (random-zebra)
66018c7 [P2P] Proper order of ppszTypeName and allNetMessageTypes (random-zebra)
0a235b6 Do not make it trivial for inbound peers to generate log entries (Matt Corallo)
910f83f [Net] Remove unused RecvLine function. (furszy)
ed1d377 [GUI] Receive screen, fix missing "Add label" text. (furszy)

Pull request description:

  backport the following PRs to the `5.0` branch:

  #2128
  #2133
  #2130
  #2134
  #2129
  #2136
  #2137

ACKs for top commit:
  furszy:
    ACK 40a66b6
  random-zebra:
    ACK 40a66b6

Tree-SHA512: b7c149645c935838bdcfb82c66e8522815f48e8c4e9354af889fba8d6e9c50fad178e2de6b28ac72174e0d513d9ff484a517b6fa036d3478e410e447df73d847
@random-zebra random-zebra removed the Needs Backport Placeholder tag for anything needing a backport to prior version branches label Jan 17, 2021
@random-zebra random-zebra added this to the 5.0.1 milestone Jan 17, 2021
@furszy furszy deleted the 2020_backport_11583 branch November 29, 2022 14:09
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.

4 participants