LearnBitcoin

Bitcoin Dev Archive 2013

Testnet DNS seed

5 messages, 24 to 27 Jan 2013. Started by Peter Todd.

Peter Todd (2), Jeff Garzik (2), Pieter Wuille

Permalink Original thread on gnusha.org

Peter Todd permalink original

I setup a testnet DNS seed using Pieter Wuille's bitcoin-seeder, with some simple modifications for testnet. It's at testnet-seed.bitcoin.petertodd.org I also created static-testnet-seed.bitcoin.petertodd.org which currently has a single A record pointing to a testnet node I'm running to bootstrap the seeder itself.

Everything is running on a dedicated Amazon EC2 micro instance. Just IPv4 is supported right now as EC2 doesn't support IPv6; even tunnels are broken. I also haven't setup tor yet. I can do both if there is demand.

I guess the next step is to create a new strTestNetDNSSeed in the satoshi client, although it'd be better if at least one more person had a testnet seed to include in the list. Probably best to leave IRC enabled too.

Also, FWIW, it looks like the pnSeed list is way out of date...

Pieter: Have you written any start/stop/monitoring scripts for the seeder? My mods are at git://github.com/petertodd/bitcoin-seeder.git in the "testnet" branch. I'll send you a pull request once it's had some testing.

Jeff Garzik in reply to Peter Todd permalink original

On Thu, Jan 24, 2013 at 2:01 AM, Peter Todd <pete@petertodd•org> wrote:

Quoted text (4 lines)
> Everything is running on a dedicated Amazon EC2 micro instance. Just
> IPv4 is supported right now as EC2 doesn't support IPv6; even tunnels
> are broken. I also haven't setup tor yet. I can do both if there is
> demand.

How long do you plan to run this? Indefinitely [presuming there is interest and users]?

Quoted text (2 lines)
> I guess the next step is to create a new strTestNetDNSSeed in the
> satoshi client, although it'd be better if at least one more person had

No objection

Quoted text (2 lines)
> a testnet seed to include in the list. Probably best to leave IRC
> enabled too.

Yes, IRC must remain enabled

Quoted text (1 line)
> Also, FWIW, it looks like the pnSeed list is way out of date...

Yes. Usually nanotube does the update when poked. That can happen, or something different.

A nice alternative might be a simple script that transforms Pieter's seeds.txt into pnSeed[]

Peter Todd in reply to Jeff Garzik permalink original

On Fri, Jan 25, 2013 at 09:23:28PM -0500, Jeff Garzik wrote:

Quoted text (8 lines)
> On Thu, Jan 24, 2013 at 2:01 AM, Peter Todd <pete@petertodd•org> wrote:
> > Everything is running on a dedicated Amazon EC2 micro instance. Just
> > IPv4 is supported right now as EC2 doesn't support IPv6; even tunnels
> > are broken. I also haven't setup tor yet. I can do both if there is
> > demand.
>
> How long do you plan to run this?  Indefinitely [presuming there is
> interest and users]?

Indefinitely. It's a pretty cheap thing to run, about $7.5/month. If anyone else wants I can give them a machine image copy easily too.

Quoted text (7 lines)
> > Also, FWIW, it looks like the pnSeed list is way out of date...
>
> Yes.  Usually nanotube does the update when poked.  That can happen,
> or something different.
>
> A nice alternative might be a simple script that transforms Pieter's
> seeds.txt into pnSeed[]

seed.txt? You mean the dumpfile produced by bitcoin-seeder? That has uptime info, although only a months worth if I understand it correctly.

pnSeed probably should be filtered with SORB's dynamic ip list or similar too, and additionally add an expiry time. (1 year?)

Jeff Garzik in reply to Peter Todd permalink original

On Sun, Jan 27, 2013 at 5:27 AM, Peter Todd <pete@petertodd•org> wrote:

Quoted text (12 lines)
> On Fri, Jan 25, 2013 at 09:23:28PM -0500, Jeff Garzik wrote:
>> On Thu, Jan 24, 2013 at 2:01 AM, Peter Todd <pete@petertodd•org> wrote:
>> > Everything is running on a dedicated Amazon EC2 micro instance. Just
>> > IPv4 is supported right now as EC2 doesn't support IPv6; even tunnels
>> > are broken. I also haven't setup tor yet. I can do both if there is
>> > demand.
>>
>> How long do you plan to run this?  Indefinitely [presuming there is
>> interest and users]?
>
> Indefinitely. It's a pretty cheap thing to run, about $7.5/month. If
> anyone else wants I can give them a machine image copy easily too.

Cool. ACK on adding your seed to the ref client.

Quoted text (9 lines)
>> > Also, FWIW, it looks like the pnSeed list is way out of date...
>>
>> Yes.  Usually nanotube does the update when poked.  That can happen,
>> or something different.
>>
>> A nice alternative might be a simple script that transforms Pieter's
>> seeds.txt into pnSeed[]
>
> seed.txt? You mean the dumpfile produced by bitcoin-seeder? That has

Correct.

Quoted text (4 lines)
> uptime info, although only a months worth if I understand it correctly.
>
> pnSeed probably should be filtered with SORB's dynamic ip list or
> similar too, and additionally add an expiry time. (1 year?)

That's fine. The main point was to create something scripted and repeatable. Then pnSeed[] becomes easier to maintain _and_ easier to audit. Right now it is a bit opaque with a list of hex constants. A script or makefile rule could do

     cd src
     ../contrib/gen-seeds.py > seeds.h

and seeds might look like

  #ifndef __SEEDS_AUTOGEN_H__ etc.
  unsigned int pnSeed[] = {
    0xABCD1234, /* IP addr 12.34.56.78 */
  };

I think Satoshi liked them opaque and not easily searchable, so printing the readable IP address in a comment may not be desired. Anyway, that output would make updating the list more transparent and easy to maintain.

Pieter Wuille in reply to Peter Todd permalink original

On Sun, Jan 27, 2013 at 05:27:52AM -0500, Peter Todd wrote:

Quoted text (2 lines)
> seed.txt? You mean the dumpfile produced by bitcoin-seeder? That has
> uptime info, although only a months worth if I understand it correctly.

It has information about all non-banned IPs that were ever connected to succesfully. The connectability% is a decaying average, with a time constant of up to a month, though.

I have a script ready which combines one or more seeds.txt's data into a pnSeed[] array C source code, by the way. I'll add it to the repository.