Fix and improve relay from whitelisted peers #7106

pull sipa wants to merge 1 commits into bitcoin:master from sipa:realwhiterelay changing 1 files +14 −11
  1. sipa commented at 9:10 pm on November 26, 2015: member

    This makes sure that retransmits by a whitelisted peer also actually result in a retransmit. This was a bug introduced in 9524c4d3 (which is in 0.11.1).

    Further, this changes the logic to never relay in case we would assign a DoS score, as we expect to get DoS banned ourselves as a result. This part may be acceptable as an alternative to #7099.

  2. gmaxwell commented at 9:24 pm on November 26, 2015: contributor

    utACK-we-should-do-this-over-nothing. I will test too.

    I still think that whitelist drastically changing our P2P behavior (instead of merely bypassing resource limits/banning/eviction) is highly surprising, and undermines the utility of whitelisting if we’re unable to unlink them; so I’d rebase 7099 on top of this and be open to making it default to on.

    I think long term we should have another p2p message type which means “force relay this transaction” which we ignore the force part for non-whitelisted peers. … we we don’t manage to get initial transaction broadcast out of the basic p2p relaying mechanism first.

  3. gmaxwell commented at 9:45 pm on November 26, 2015: contributor

    Would you oppose adding a non-debug log to this every time it does a forced relay and any time it fails to do one (due to DOS)?

    Having it logged would help a lot with someone putting whitelisting things they shouldn’t while this behavior exists (like mining software) and spamming the network.

  4. sipa force-pushed on Nov 26, 2015
  5. sipa commented at 9:53 pm on November 26, 2015: member
    @gmaxwell Done.
  6. Fix and improve relay from whitelisted peers
    This makes sure that retransmits by a whitelisted peer also actually
    result in a retransmit.
    
    Further, this changes the logic to never relay in case we would assign
    a DoS score, as we expect to get DoS banned ourselves as a result.
    a9f3d3db5c
  7. sipa force-pushed on Nov 26, 2015
  8. jonasschnelli added the label P2P on Nov 27, 2015
  9. gmaxwell added this to the milestone 0.11.0 on Nov 27, 2015
  10. gmaxwell added this to the milestone 0.12.0 on Nov 27, 2015
  11. gmaxwell removed this from the milestone 0.11.0 on Nov 27, 2015
  12. gmaxwell commented at 8:56 pm on November 27, 2015: contributor
    ACK
  13. gmaxwell merged this on Nov 29, 2015
  14. gmaxwell closed this on Nov 29, 2015

  15. gmaxwell referenced this in commit c894fbbb1d on Nov 29, 2015
  16. sdaftuar commented at 11:30 am on November 29, 2015: member
    Just curious, if we’re willing to relay rejected transactions from whitelisted peers, why not also relay their orphan transactions? The only reason I can think of is it would result in duplicate announcements, but only if the whitelisted peer is sending them out of order; and there might well be use cases where a transaction that is an orphan for you would not be an orphan for your peers (eg if you’re running with a small mempool).
  17. luke-jr referenced this in commit e70844386f on Nov 30, 2015
  18. zkbot referenced this in commit 976479f824 on Sep 20, 2016
  19. MarcoFalke locked this on Sep 8, 2021


sipa gmaxwell sdaftuar

Labels
P2P

Milestone
0.12.0


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-16 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me