Skip to content

Conversation

@Fuzzbawls
Copy link
Collaborator

Adapted from bitcoin#21560, this adds support for Tor v3 hardcoded seed nodes.

Upstream PR description:

  • Add a few hardcoded seeds for TorV3
    • As the bitcoin-seeder doesn't collect TorV3 addresses yet, I have extracted these from my own node using a script and added them manually. This is intended to be a temporary stop gap until 22.0's seeds update.
  • Change hardcoded seeds to variable length BIP155 binary format.
    • It is stored as a single serialized blob in a byte array, instead of pseudo-IPv6 address slots. This is more flexible and, assuming most of the list is IPv4, more compact.
    • Only the (networkID, addr, port) subset (CService). Services and time are construed on the fly as before.
  • Change input format for nodes_*.txt.
    • Drop legacy 0xAABBCCDD format for IPv4. It is never generated by makeseeds.py.
    • Stop interpreting lack of port as default port, interpret it as 'no port', to accomodate I2P and other port-less protocols (not handled in this PR). An explicit port is always generated by makeseeds.py so in practice this makes no difference right now.

Marked as WIP for now because we need more Tor v3 nodes on mainnet for this to really be of use to end users, but this is currently testable on testnet as we already have a number of Tor v3 capable nodes there (which have been added to the hardcoded seeds here)

@Fuzzbawls Fuzzbawls added the P2P label Aug 12, 2021
@Fuzzbawls Fuzzbawls added this to the 5.3.0 milestone Aug 12, 2021
@Fuzzbawls Fuzzbawls self-assigned this Aug 12, 2021
random-zebra added a commit that referenced this pull request Aug 12, 2021
e9d28da [Doc] Document getnodeaddresses in release notes (Fuzzbawls)
ebe2a46 test: improve getnodeaddresses coverage, test by network (Fuzzbawls)
91ac5c7 rpc: enable filtering getnodeaddresses by network (Fuzzbawls)
badfc49 p2p: allow CConnman::GetAddresses() by network, add doxygen (Fuzzbawls)
fa78233 p2p: allow CAddrMan::GetAddr() by network, add doxygen (Fuzzbawls)
a4d2733 p2p: pull time call out of loop in CAddrMan::GetAddr_() (Fuzzbawls)
d5c1250 p2p: enable CAddrMan::GetAddr_() by network, add doxygen (Fuzzbawls)
67e2c2f [RPC] add network field to getnodeaddresses (Fuzzbawls)
b4832b2 [Net] Add addpeeraddress RPC method (Fuzzbawls)
1a31b67 [test] Test that getnodeaddresses() can return all known addresses (Fuzzbawls)
e83fd0e [Addrman] Specify max addresses and pct when calling GetAddresses() (Fuzzbawls)
792655d [RPC] Add getnodeaddresses RPC command (chris-belcher)

Pull request description:

  Implement a new RPC command (`getnodeaddresses`) that provides RPC access to the node's addrman. It may be useful for PIVX wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds.

  I've included upstream improvements to this feature here as well, and this RPC command was used to scrape the Tor v3 hardcoded seed nodes added in #2502

  ---------
  Based on the following upstream PRs:
  * bitcoin#13152
  * bitcoin#19658
  * bitcoin#21594
  * bitcoin#21843

ACKs for top commit:
  furszy:
    all good, tested ACK e9d28da.
  random-zebra:
    utACK e9d28da and merging...

Tree-SHA512: 2e50108504ac8e172c2e31eb64813d6aae6b6819cf197eace2e4e15686906708b2f82262909faad00ce64af0f61945089a36b857064d3ce2398b3acb14e4ad7d
@furszy
Copy link

furszy commented Aug 13, 2021

Have set up two nodes to have them as seeds, will leave them running 24/7:

Public onion address in mainnet:
furszycdwjsgeevkwsdg5hsattsvaw4i6y3xkzdvb7zez24uwhjjddid.onion

Public onion address in testnet:
x4ys3tklrydij35o7m7x4f2baoolmew3q45r7dvlpdkzuoogfb3lbfqd.onion

The first address is a bit special ✌️.

Switch from IPv6 slot-based format to more compact and flexible BIP155
format.
@Fuzzbawls Fuzzbawls force-pushed the 2021_torv3-hardcoded-seeds branch from 1a6ba7a to 4aec935 Compare August 16, 2021 10:13
@Fuzzbawls Fuzzbawls changed the title [WIP][Net] Add Tor v3 hardcoded seeds [Net] Add Tor v3 hardcoded seeds Aug 16, 2021
@Fuzzbawls
Copy link
Collaborator Author

Updated with 5 mainnet full time Tor v3 nodes, ready for review

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

ACK 4aec935

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

ACK 4aec935

@furszy furszy merged commit 62e9993 into PIVX-Project:master Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants