Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] Test that nodes respond to getdata with notfound #14571

Merged
merged 1 commit into from Oct 27, 2018

Conversation

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Oct 25, 2018

If a node has not announced a tx at all, then it should respond to
getdata messages for that tx with notfound, to avoid leaking tx
origination privacy.

In the future this could be adjusted such that a node responds with
notfound when a tx has not been announced to us, but that seems
to be a more involved change. See e.g.
https://github.com/jnewbery/bitcoin/commits/pr14220.1

@jnewbery
Copy link
Member

@jnewbery jnewbery commented Oct 25, 2018

Concept ACK. Great test.

if vec is None:
self.vec = []
else:
self.vec = vec
Copy link
Member

@jamesob jamesob Oct 25, 2018

nit: more concise (if not exactly equivalent) as self.vec = vec or []

Copy link
Member

@jnewbery jnewbery Oct 25, 2018

I think Marco's version is clearer.

test/functional/p2p_leak_tx.py Show resolved Hide resolved
def run_test(self):
gen_node = self.nodes[0] # The block and tx generating node
gen_node.generate(1)
self.sync_all()
Copy link
Contributor

@sanket1729 sanket1729 Oct 25, 2018

I am new here, but is sync_all() necessary when there is only 1 node?

Copy link
Member

@jnewbery jnewbery Oct 25, 2018

Entirely correct! This can be removed

@MarcoFalke MarcoFalke force-pushed the Mf1810-qaNotfound branch from fa33a6b to fa57d64 Oct 26, 2018
@@ -1232,6 +1232,23 @@ def __repr__(self):
return "msg_mempool()"


class msg_notfound:
__slots__ = ("vec")
Copy link
Contributor

@practicalswift practicalswift Oct 26, 2018

This should be __slots__ = ("vec",) to force tuple instead of str :-)

Copy link
Member Author

@MarcoFalke MarcoFalke Oct 26, 2018

Ugh, I always get this wrong. Thx

If a node has not announced a tx at all, then it should respond to
getdata messages for that tx with notfound, to avoid leaking tx
origination privacy.
@MarcoFalke MarcoFalke force-pushed the Mf1810-qaNotfound branch from fa57d64 to fa78a2f Oct 26, 2018
@jnewbery
Copy link
Member

@jnewbery jnewbery commented Oct 26, 2018

Tested ACK fa78a2f

1 similar comment
@sanket1729
Copy link
Contributor

@sanket1729 sanket1729 commented Oct 26, 2018

Tested ACK fa78a2f

@naumenkogs
Copy link
Member

@naumenkogs naumenkogs commented Oct 26, 2018

Tested ACK fa78a2f

@MarcoFalke MarcoFalke merged commit fa78a2f into bitcoin:master Oct 27, 2018
1 of 2 checks passed
MarcoFalke added a commit that referenced this issue Oct 27, 2018
fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
@MarcoFalke MarcoFalke deleted the Mf1810-qaNotfound branch Oct 27, 2018
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 21, 2021
…notfound

fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 22, 2021
…notfound

fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 22, 2021
…notfound

fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 22, 2021
…notfound

fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 23, 2021
…notfound

fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 23, 2021
…notfound

fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jul 26, 2021
…notfound

fa78a2f [tests] Test that nodes respond to getdata with notfound (MarcoFalke)

Pull request description:

  If a node has not announced a tx at all, then it should respond to
  getdata messages for that tx with notfound, to avoid leaking tx
  origination privacy.

  In the future this could be adjusted such that a node responds with
  notfound when a tx has not been announced to us, but that seems
  to be a more involved change. See e.g.
  https://github.com/jnewbery/bitcoin/commits/pr14220.1

Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants