GithubHelp home page GithubHelp logo

Testnet fixed seeds don't work about bitcoin HOT 6 OPEN

fanquake avatar fanquake commented on May 19, 2024
Testnet fixed seeds don't work

from bitcoin.

Comments (6)

achow101 avatar achow101 commented on May 19, 2024 2

I'm currently working on a new DNS seeder and crawler that we'd be able to use for generating the fixed seeds for all networks. This will also include onion, i2p, and cjdns nodes so they don't have to be done manually as we are doing now.

from bitcoin.

mzumsande avatar mzumsande commented on May 19, 2024 1

I'm not sure why we'd only want to ship onion seeds for testnet, as that only makes it, if anything, slightly less usable.

I think the reason is that we have working dns seeds for testnet, but since these don't provide onion addresses, we needed some mechanism to find peers to make it possible to bootstrap with -onlynet=onion. If we added fixed IPv4 and IPv6 seeds for testnet, they would just have the role of a backup mechanism anyway. This is obviously important for mainnet, but maybe not really necessary for testnet?

from bitcoin.

willcl-ark avatar willcl-ark commented on May 19, 2024

This is because all the seeds we have for testnet are NET_ONION: https://paste.256k1.dev/xosamodiga.log and so get filtered by the predicate in ThreadOpenConnections:

seed_addrs.erase(std::remove_if(seed_addrs.begin(), seed_addrs.end(),
                                [&fixed_seed_networks](const CAddress& addr) { return fixed_seed_networks.count(addr.GetNetwork()) == 0; }),
                 seed_addrs.end());
>>> p fixed_seed_networks
$3 = std::unordered_set with 2 elements = {
  [0] = NET_IPV6,
  [1] = NET_IPV4
}

In fact, as far as I can tell it doesn't appear that we have ever had ipv4 seeds for testnet? So perhaps this is a (historical and) purposeful decision. It appears this has been the case since 2014 when this file was introduced. I roughly checked a few version previous and only found references to mainnet seeds. This would seem like an odd decision to me though, so perhaps I'm missing something here.

For mainnet we have nodes_main.txt which includes auto-fetched addresses from a dns seeder, and nodes_main_manual.txt which adds onion and I2P seeds.
By contrast for testnet nodes_test.txt is not in fact ipv4 addresses, but manually-added tor v3 addresses.

If we want testnet nodes to be able to sync without relying on dns seeds then we should consider adding some testnet IPV4 addresses.

from bitcoin.

fanquake avatar fanquake commented on May 19, 2024

This would seem like an odd decision to me though, so perhaps I'm missing something here.

I agree. I'm not sure why we'd only want to ship onion seeds for testnet, as that only makes it, if anything, slightly less usable. Maybe they can be added, and the test in feature_config_args extended to cover testnet.

from bitcoin.

fanquake avatar fanquake commented on May 19, 2024

This is obviously important for mainnet, but maybe not really necessary for testnet?

Possibly, but it seems to just slightly reduce usability for no real benefit? I guess we were also inconsistently not shipping fixed i2p or cjdns seeds for testnet either, but with the current update i2p will now be shipped.

from bitcoin.

willcl-ark avatar willcl-ark commented on May 19, 2024

See #30008

from bitcoin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.