Relay ancestors of transactions #14318

pull sdaftuar wants to merge 5 commits into bitcoin:master from sdaftuar:2018-09-txrelay-ancestors changing 6 files +265 −7
  1. sdaftuar commented at 12:46 pm on September 25, 2018: member

    Respond to getdata requests for transactions that are ancestors of newly-announced transactions. Currently, our software will request the parents of an orphan transaction from the peer who announced the orphan, but if our peer is running a recent Bitcoin Core version, the request would typically be dropped. So this should improve propagation for transaction chains, particularly for nodes that are just starting up.

    (continued from #14220, which is now just a bugfix PR)

    Depends on:

  2. Don't relay tx data to peers until after tx announcement
    Prior to this commit, we'd respond with tx data for anything in mapRelay,
    regardless of whether the requesting peer was one that we'd sent an INV to
    for the transaction in question.
    
    Close this privacy leak by maintaining a set of peers to which we've
    relayed each transaction in mapRelay.
    0c433faf3d
  3. [qa] Test inter-bucket privacy leakage 736462c26d
  4. Add ancestors of announced transactions to mapRelay
    If we announce a transaction T to a peer, then we should also be willing to
    provide T's parents to that peer (in case our peer is missing those parents).
    This should improve propagation of transaction chains.
    6952b7b46b
  5. [qa] Add test for orphan tx/chain relay ae5320cdbb
  6. [qa] Add p2p_txchain_relay.py to test_runner.py 6b661802eb
  7. DrahtBot commented at 12:50 pm on September 25, 2018: member
    • #14305 (Tests: enforce critical class instance attributes in functional tests, fix segwit test specificity by JustinTArthur)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  8. fanquake added the label P2P on Sep 25, 2018
  9. in test/functional/test_framework/mininode.py:330 in 6b661802eb
    326@@ -295,6 +327,7 @@ def on_getdata(self, message): pass
    327     def on_getheaders(self, message): pass
    328     def on_headers(self, message): pass
    329     def on_mempool(self, message): pass
    330+    def on_notfound(self, message): pass
    


    practicalswift commented at 7:25 pm on September 25, 2018:
    Not used? :-)


    practicalswift commented at 2:29 pm on September 27, 2018:
    Ah, makes sense!
  10. jamesob approved
  11. jamesob commented at 8:15 pm on September 26, 2018: member

    utACK https://github.com/bitcoin/bitcoin/pull/14318/commits/6b661802eb2baa206b3ba0f192be39c2b304cc00

    For future reviewers: the INV for missing parents (which we currently expect may not be answered if relay interval on the remote node has lapsed) happens here: https://github.com/bitcoin/bitcoin/blob/d799efe21432ad55c41d5315f24c002bc8b3d119/src/net_processing.cpp#L2303-L2309

    This PR is dependent on #14220 and probably shouldn’t be merged before that.

  12. in test/functional/test_framework/messages.py:1173 in 6b661802eb
    1168+        if vec is None:
    1169+            self.vec = []
    1170+        else:
    1171+            self.vec = vec
    1172+
    1173+    def deserialize(self, f):
    


    practicalswift commented at 9:44 pm on September 26, 2018:
    Could use a better variable name than f? :-)

    jamesob commented at 2:15 pm on September 27, 2018:
    This maintains consistency with existing methods in similar classes (and it’s a one-line usage: not considerably different from, say, a list comprehension) so I think this is fine.

    practicalswift commented at 2:30 pm on September 27, 2018:
    Now I see that f is used consistently. Makes sense to follow that.
  13. DrahtBot added the label Needs rebase on Sep 27, 2018
  14. DrahtBot commented at 3:34 pm on September 27, 2018: member
  15. sdaftuar closed this on Nov 6, 2018

  16. laanwj commented at 1:40 pm on November 6, 2018: member
    @sdaftuar do you have any specific reason for closing?
  17. sdaftuar commented at 1:43 pm on November 6, 2018: member
    @laanwj This builds on a PR that I closed because it needed rework, so I just didn’t want to leave this open when it wasn’t ready for review.
  18. laanwj commented at 1:44 pm on November 6, 2018: member
    @sdaftuar thanks for the explanation, makes sense
  19. laanwj removed the label Needs rebase on Oct 24, 2019
  20. MarcoFalke locked this on Dec 16, 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-12-19 00:12 UTC

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