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

getaddr over RPC #9463

Closed
chris-belcher opened this issue Jan 3, 2017 · 8 comments
Closed

getaddr over RPC #9463

chris-belcher opened this issue Jan 3, 2017 · 8 comments

Comments

@chris-belcher
Copy link
Contributor

chris-belcher commented Jan 3, 2017

A proposed new feature / RPC call.

A way to get IP addresses of other bitcoin nodes known to your node via RPC.

This would be useful for bitcoin wallets that unlink the source IP address from a transaction by connecting through tor to any bitcoin node out there for a short time. Examples of projects that might do this are JoinMarket (JoinMarket-Org/joinmarket#662), laanwj's submit-tx tool or anything else built on top of Bitcoin Core such as Armory.

Right now these projects might use the DNS seeds instead, which are much less decentralized and which could be shut down to stop the tor-broadcast feature working.

I think this new call would be exactly the same as the getaddr command from the p2p protocol but as an RPC instead.

@sipa
Copy link
Member

sipa commented Jan 3, 2017 via email

@gmaxwell
Copy link
Contributor

gmaxwell commented Jan 4, 2017

Perhaps the RPC could take some filtering arguments, in particular service flags and recentness, maybe flags to use the tried vs not tried results? Not necessary for a first cut but might make them easier. (and even open up a new way of doing a dnsseed server; just proxy to the getaddr result :))

@dcousens
Copy link
Contributor

dcousens commented Jan 4, 2017

getrpcaddr
getrpcinfo

@gmaxwell
Copy link
Contributor

gmaxwell commented Jan 4, 2017

@dcousens I don't understand what 'rpc' is for in those lines.

@dcousens
Copy link
Contributor

dcousens commented Jan 4, 2017

@gmaxwell disregard, I misread the OP.

@laanwj
Copy link
Member

laanwj commented Jan 5, 2017

Agree that this would be useful.

@kvsari
Copy link

kvsari commented Feb 11, 2017

Please check out this WIP and let me know if I'm headed in the right direction.

@sipa
Copy link
Member

sipa commented Feb 11, 2017

@kvsari Looks good codewise, but I think you're solving a different problem. It's already possible to know what IPs you're connected to (use getpeerinfo). The request here is to get IPs your node knows about. Presumably its implementation would be similar to the handling of GETADDR in net_processing.cpp.

maflcko pushed a commit to maflcko/bitcoin-core that referenced this issue Sep 18, 2018
a2eb6f5 [rpc] Add getnodeaddresses RPC command (chris-belcher)

Pull request description:

  Implements issue bitcoin#9463

  New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method.

  Please advise me on the best approach for writing an automated test. By my reading the getaddr p2p method also isn't really tested.

Tree-SHA512: ad03abf518847476495b76a2f5394b8030aa86654429167fa618e21460abb505c10ef9817ec1b80472320d41d0aff5dc94a8efce023aaaaf5e81386aa92b852b
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Feb 12, 2020
Summary:
a2eb6f5405 [rpc] Add getnodeaddresses RPC command (chris-belcher)

Pull request description:

  Implements issue bitcoin/bitcoin#9463

  New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method.

  Please advise me on the best approach for writing an automated test. By my reading the getaddr p2p method also isn't really tested.

Tree-SHA512: ad03abf518847476495b76a2f5394b8030aa86654429167fa618e21460abb505c10ef9817ec1b80472320d41d0aff5dc94a8efce023aaaaf5e81386aa92b852b

Backport of Core [[https://github.com/bitcoin/bitcoin/pull/13152/files | PR13152]]

Test Plan:
  ninja check
  ninja check-functional

  ./bitcoind
  ./bitcoin-cli help getnodeaddresses
Verify help text

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, jasonbcox

Subscribers: jasonbcox, markblundeberg

Differential Revision: https://reviews.bitcoinabc.org/D5214
Munkybooty pushed a commit to Munkybooty/dash that referenced this issue Jul 9, 2021
a2eb6f5 [rpc] Add getnodeaddresses RPC command (chris-belcher)

Pull request description:

  Implements issue bitcoin#9463

  New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method.

  Please advise me on the best approach for writing an automated test. By my reading the getaddr p2p method also isn't really tested.

Tree-SHA512: ad03abf518847476495b76a2f5394b8030aa86654429167fa618e21460abb505c10ef9817ec1b80472320d41d0aff5dc94a8efce023aaaaf5e81386aa92b852b

# Conflicts:
#	src/rpc/client.cpp
#	src/rpc/net.cpp
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jul 19, 2021
a2eb6f5 [rpc] Add getnodeaddresses RPC command (chris-belcher)

Pull request description:

  Implements issue bitcoin#9463

  New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method.

  Please advise me on the best approach for writing an automated test. By my reading the getaddr p2p method also isn't really tested.

Tree-SHA512: ad03abf518847476495b76a2f5394b8030aa86654429167fa618e21460abb505c10ef9817ec1b80472320d41d0aff5dc94a8efce023aaaaf5e81386aa92b852b
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this issue Jul 20, 2021
a2eb6f5 [rpc] Add getnodeaddresses RPC command (chris-belcher)

Pull request description:

  Implements issue bitcoin#9463

  New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method.

  Please advise me on the best approach for writing an automated test. By my reading the getaddr p2p method also isn't really tested.

Tree-SHA512: ad03abf518847476495b76a2f5394b8030aa86654429167fa618e21460abb505c10ef9817ec1b80472320d41d0aff5dc94a8efce023aaaaf5e81386aa92b852b
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this issue Sep 8, 2021
a2eb6f5 [rpc] Add getnodeaddresses RPC command (chris-belcher)

Pull request description:

  Implements issue bitcoin#9463

  New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method.

  Please advise me on the best approach for writing an automated test. By my reading the getaddr p2p method also isn't really tested.

Tree-SHA512: ad03abf518847476495b76a2f5394b8030aa86654429167fa618e21460abb505c10ef9817ec1b80472320d41d0aff5dc94a8efce023aaaaf5e81386aa92b852b
@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.
Projects
None yet
Development

No branches or pull requests

7 participants