diff options
author | W. J. van der Laan <laanwj@protonmail.com> | 2021-04-06 10:43:20 +0200 |
---|---|---|
committer | W. J. van der Laan <laanwj@protonmail.com> | 2021-04-06 10:47:51 +0200 |
commit | 9be7fe4849310884294669b019dd8300f69bc334 (patch) | |
tree | 9ce1d21a74dd89fb9a6c2518d173c52f4050c5c7 /src/chainparams.cpp | |
parent | 1a7dec77f610607b1f0c5113bd5b6939b04717df (diff) | |
parent | b2ee8b207de78f03356905bd60b7b00b6f49c252 (diff) |
Merge #21560: net: Add Tor v3 hardcoded seeds
b2ee8b207de78f03356905bd60b7b00b6f49c252 net: Deserialize hardcoded seeds from BIP155 blob (W. J. van der Laan)
9b29d5df7fc555eaea42029f334f2995c6ccde3d contrib: Add explicit port numbers for testnet seeds (W. J. van der Laan)
2a257de113fd31539b68c28c47ef94f257b6e427 contrib: Add a few TorV3 seed nodes (W. J. van der Laan)
06030f7a42dea33c5120504dcd99d1714883f271 contrib: generate-seeds.py generates output in BIP155 format (W. J. van der Laan)
Pull request description:
Closes #20239 and mitigates my node's problem in #21351.
- Add a few hardcoded seeds for TorV3
- As the [bitcoin-seeder](https://github.com/sipa/bitcoin-seeder) doesn't collect TorV3 addresses yet, I have extracted these from my own node using [a script](https://gist.github.com/laanwj/b3d7b01ef61ce07c2eff0a72a6b90183) 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.
A follow-up to this PR could do the same for I2P.
ACKs for top commit:
jonatack:
ACK b2ee8b207de78f03356905bd60b7b00b6f49c252
Tree-SHA512: 11a6b54f9fb0192560f2bd7b218f798f86c1abe01d1bf37f734cb88b91848124beb2de801ca4e6f856e9946aea5dc3ee16b0dbb9863799e42eec1b239d40d59d
Diffstat (limited to 'src/chainparams.cpp')
-rw-r--r-- | src/chainparams.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 28b64ee7ff..163d234f80 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -134,7 +134,7 @@ public: bech32_hrp = "bc"; - vFixedSeeds = std::vector<SeedSpec6>(std::begin(pnSeed6_main), std::end(pnSeed6_main)); + vFixedSeeds = std::vector<uint8_t>(std::begin(chainparams_seed_main), std::end(chainparams_seed_main)); fDefaultConsistencyChecks = false; fRequireStandard = true; @@ -239,7 +239,7 @@ public: bech32_hrp = "tb"; - vFixedSeeds = std::vector<SeedSpec6>(std::begin(pnSeed6_test), std::end(pnSeed6_test)); + vFixedSeeds = std::vector<uint8_t>(std::begin(chainparams_seed_test), std::end(chainparams_seed_test)); fDefaultConsistencyChecks = false; fRequireStandard = false; |