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

maflcko
Copy link
Member

@maflcko maflcko 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
Contributor

Concept ACK. Great test.

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

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Entirely correct! This can be removed

@@ -1232,6 +1232,23 @@ def __repr__(self):
return "msg_mempool()"


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

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

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.
@jnewbery
Copy link
Contributor

Tested ACK fa78a2f

1 similar comment
@sanket1729
Copy link
Contributor

Tested ACK fa78a2f

@naumenkogs
Copy link
Member

Tested ACK fa78a2f

@maflcko maflcko merged commit fa78a2f into bitcoin:master Oct 27, 2018
maflcko pushed a commit that referenced this pull request 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
@maflcko maflcko deleted the Mf1810-qaNotfound branch October 27, 2018 11:22
Munkybooty pushed a commit to Munkybooty/dash that referenced this pull request 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 pushed a commit to Munkybooty/dash that referenced this pull request 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 pushed a commit to Munkybooty/dash that referenced this pull request 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 pushed a commit to Munkybooty/dash that referenced this pull request 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 pushed a commit to Munkybooty/dash that referenced this pull request 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 pushed a commit to Munkybooty/dash that referenced this pull request 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 pushed a commit to Munkybooty/dash that referenced this pull request 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
Development

Successfully merging this pull request may close these issues.

None yet

6 participants