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

Add fixed node IP addresses to initial seed peer config #2274

Closed
2 tasks
Tracked by #3247
teor2345 opened this issue Jun 10, 2021 · 2 comments
Closed
2 tasks
Tracked by #3247

Add fixed node IP addresses to initial seed peer config #2274

teor2345 opened this issue Jun 10, 2021 · 2 comments
Labels
A-network Area: Network protocol updates or fixes C-audit Category: Issues arising from audit findings C-security Category: Security issues I-hang A Zebra component stops responding to requests I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data I-lose-funds Zebra loses user funds

Comments

@teor2345
Copy link
Contributor

teor2345 commented Jun 10, 2021

Motivation

If a Zebra node is launched from a network where the Zcash DNS seeders are blocked, it won't be able to connect to any peers. If the network provides malicious DNS responses, the node could be compromised with bad peers.

Zebra's checkpoints and the Zcash proof of work help resist this attack.

Specifications

Both Bitcoin Core and BitcoinJ also include a hardcoded list of IP addresses and port numbers to several dozen nodes which were active around the time that particular version of the software was first released. Bitcoin Core will start attempting to connect to these nodes if none of the DNS seed servers have responded to a query within 60 seconds, providing an automatic fallback option.

https://developer.bitcoin.org/devguide/p2p_network.html#peer-discovery

Designs

zcashd has a fixed seed generation script:
https://github.com/zcash/zcash/tree/master/contrib/seeds

But it doesn't currently have any fixed seed peers:
https://github.com/zcash/zcash/blob/master/src/chainparamsseeds.h

Solution

  • Select fixed seed peers using zcashd's scripts or a zebra-network-based tool
  • Add them to Zebra's default mainnet and testnet configs

Alternatives

We might want to talk with the zcashd team before making this change, to understand why they don't have fixed seed peers.

Related Work

A persistent local list of peers would help resist this attack after first launch #1956

@teor2345 teor2345 added A-rust Area: Updates to Rust code S-needs-triage Status: A bug report needs triage C-security Category: Security issues I-usability Zebra is hard to understand or use I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data A-network Area: Network protocol updates or fixes labels Jun 10, 2021
@teor2345 teor2345 changed the title Add node IP addresses to initial seeds Add fixed node IP addresses to initial seed peer config Jun 10, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Jun 21, 2021
@teor2345
Copy link
Contributor Author

teor2345 commented Jun 2, 2022

We'll do this if it becomes a problem.

@teor2345 teor2345 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
@teor2345
Copy link
Contributor Author

This is related to the audit, but we decided not to do it at this time, because it's hard to choose good stable peer IP addresses, and we'd have to ask the operators for permission.

@teor2345 teor2345 added I-hang A Zebra component stops responding to requests I-lose-funds Zebra loses user funds C-audit Category: Issues arising from audit findings and removed A-rust Area: Updates to Rust code I-usability Zebra is hard to understand or use labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes C-audit Category: Issues arising from audit findings C-security Category: Security issues I-hang A Zebra component stops responding to requests I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data I-lose-funds Zebra loses user funds
Projects
None yet
Development

No branches or pull requests

2 participants