adhere to -whitelist for outbound connection #10051

pull rubensayshi wants to merge 1 commits into bitcoin:master from rubensayshi:whitelist-outbound changing 1 files +1 −0
  1. rubensayshi commented at 8:55 am on March 22, 2017: contributor

    unsure why this wasn’t already being done, seems sensible to me that you also want to be able to whitelist nodes that you make an outgoing connection to?

    trying to figure if there should be any tests added but I can’t seem to find tests that really cover ConnectNode specifically at all?

  2. whitelist outbound connection 8bdf651b03
  3. gmaxwell commented at 8:57 am on March 22, 2017: contributor
    Outbound connections are already privileged in a number of ways, and the white-listing by default has strange effects on transaction propagation that you probably don’t want for outbound connections.
  4. fanquake added the label P2P on Mar 22, 2017
  5. rubensayshi commented at 8:24 am on March 23, 2017: contributor

    the reason for wanting to whitelist the outbound connection is cuz I’m using connect to connect only to 1 specific node.
    without whitelisting the trickling mechanism can cause transactions to take several seconds before being relayed.

    I think you might have misunderstood as well based on the title, the PR Is to adhere to the whitelist options when making outbound connections, not whitelist them by default.
    though if you don’t mind I’d love to learn what you mean by “strange effects” (if not here maybe on IRC ;-) ?)

  6. rubensayshi renamed this:
    whitelist outbound connection
    adhere to `-whitelist` for outbound connection
    on Mar 23, 2017
  7. laanwj commented at 11:46 am on March 24, 2017: member
    I agree this would be useful. There should be some mechanism for whitelisting outgoing connections. Closing because this is a duplicate of #9923
  8. laanwj closed this on Mar 24, 2017

  9. laanwj reopened this on Mar 24, 2017

  10. laanwj commented at 11:48 am on March 24, 2017: member

    Oops, missed that this was a PR, not an issue. This happens to be exactly what I need for my tests, thanks!

    We might consider using a different option for outgoing network ranges to whitelist, though. It can be unexpected to users if this is merged as-is, as it widens the meaning of an (arguably ill-defined) existing option.

  11. theuni commented at 6:54 pm on March 24, 2017: member

    @laanwj Agreed on all points. I’ve hacked this in for myself a few times for addnode=/connect= nodes. But as you said, tacking it on to whitelist is moving in the wrong direction.

    I’d much prefer to get rid of whitelist and replace it with explicit privileges, generated at connection time based on inbound/outbound, config options, etc. That way there’s less guessing in the later code, and there’s a single place for the logic.

    I can whip that up if you agree.

  12. gmaxwell commented at 5:19 pm on March 28, 2017: contributor

    without whitelisting the trickling mechanism can cause transactions to take several seconds before being relayed.

    Whitelisting isn’t really the correct fix for single outbound connect=1 resulting in slower relay.

  13. laanwj commented at 5:51 am on March 31, 2017: member

    I’d much prefer to get rid of whitelist and replace it with explicit privileges, generated at connection time based on inbound/outbound, config options, etc. That way there’s less guessing in the later code, and there’s a single place for the logic.

    I’d prefer that too. Something like, say, a bit field. The current whitelist is both too fine-grained and too course-grained. It’s just vague what it does and different people want different things from it, and we can’t change it without breaking other people’s use cases.

  14. rubensayshi commented at 8:15 am on April 3, 2017: contributor
    hmm, for me the whitelist makes sense cuz I can easily ensure it covers my local servers without too much ufss
  15. laanwj commented at 12:14 pm on December 21, 2017: member
    There seems to be no agreement to do this, and quite a lot of time elapsed without new discussion, so I’m closing. Looking forward to alternative solutions as were discussed in this PR.
  16. laanwj closed this on Dec 21, 2017

  17. DrahtBot locked this on Sep 8, 2021

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: 2024-07-03 10:13 UTC

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