Jump to content
buzzkillb

Generic-Seeder DNS Seeds

Recommended Posts

267

420 posts
24 BF$

A really nice fork of sipa dns seeder that makes everything easy for basically any bitcoin fork (altcoin) like a Denarius. https://github.com/team-exor/generic-seeder

Clone and make the binary

sudo apt-get install build-essential libboost-all-dev libssl-dev libcurl4-openssl-dev libconfig++-dev
git clone https://github.com/team-exor/generic-seeder
cd generic-seeder
make

settings.conf

protocol_version="33900"
init_proto_version="33900"
min_peer_proto_version="33900"
caddr_time_version="33900"
pchMessageStart_0 = "0xfa"
pchMessageStart_1 = "0xf2"
pchMessageStart_2 = "0xef"
pchMessageStart_3 = "0xb4"
wallet_port="33369"
explorer_url="https://chainz.cryptoid.info/d/api.dws?q=getblockcount"
second_explorer_url=""
explorer_requery_seconds="60"
block_count="3272984"
seed_1="dnsseed.denarius.guide"
seed_2="dnsseed.denarius.pro"
seed_3="mseed.denarius.guide"
seed_4=""
seed_5=""
seed_6=""
seed_7=""
seed_8=""
seed_9=""
seed_10=""
cf_domain=""
cf_domain_prefix=""
cf_username="[email protected]"
cf_api_key=""
cf_seed_dump="dnsseed.dump"

Using bseed.denarius.guide as the sample seeder that's in Denarius wallet already.

A record setup

image.png.eafa944d0824eb44e6b6ae69e2260b71.png

NS setup

image.png.223d12f554d48da185d1afa30deeaf0c.png

Give that a few minutes to propagate and then run the seeder like this which matches the above.

./dnsseed -h bseed.denarius.guide -n vps.denarius.guide -m buzz.denarius.guide

Wait to get some seeds.

image.thumb.png.b791d9548e0b1ead77506850040343e9.png

Then check propagation from https://www.whatsmydns.net/#A/vps.denarius.guide

 image.png.3dfb5ca8ce0427bd75212bd48d3d10af.png

Then check your seeder is working https://www.whatsmydns.net/#A/bseed.denarius.guide

image.png.3adb0631f5e268332dbe2f28eb90fddf.png

Then spinup a linux vm and type

nslookup bseed.denarius.guide

and you should see

Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	bseed.denarius.guide
Address: 95.111.245.53
Name:	bseed.denarius.guide
Address: 67.172.231.51
Name:	bseed.denarius.guide
Address: 77.56.152.58
Name:	bseed.denarius.guide
Address: 92.106.177.110

And your seeder is setup. huge thanks to @joeuhren for getting this to work on Denarius extremely easy.

To exit and leave screen session open type

ctrl a+d

to get back in type

screen -ls

will show 

There is a screen on:
	13441.generic-seeder	(05/18/2020 06:36:18 AM)	(Detached)

type

screen -r 13441.generic-seeder

to get back in. example: screen -r number then push tab to autocomplete the rest and push enter

  • Like 1

If you enjoy my content please consider donating to the Denarius creator - https://www.patreon.com/carsenk
Join Denarius Discord - https://discord.gg/JQEmXwb

Share this post


Link to post
Share on other sites
joeuhren    joeuhren
9

7 posts
0 BF$

Awesome guide! I'm looking forward to further simplifying and improving the seeder process in the future.

Also, I figure I should move any further correspondence about the generic-seeder over to this thread since I sort of hijacked the Duct Tape DNS Seeder thread earlier.

In response to your last question from the other thread:

Quote

Does this handle onion nodes?

I haven't actually played much with tor and onion nodes before, so I can't give a definite YES, but the original sipa bitcoin-seeder has a single onion seed listed (kjy2eqzk4zwi5zd3.onion) and seems to have the necessary plumbing to handle onion nodes, I'm just not sure exactly how to use it. There is a cmd line argument that looks like it may help:

-o <ip:port>    Tor proxy IP/Port

So I assume you need to setup and run a tor instance that is outside of the seeder - something like this https://www.linux.com/topic/networking/beginners-guide-tor-ubuntu/, and then you can run the seeder as per normal with the extra -o argument to pass your tor proxy ip and port so that the seeder can communicate with onion nodes. In theory I think that should be it. Someone please correct me if I am wrong because I'm assuming all of this just from a quick glance.

  • Like 2

Share this post


Link to post
Share on other sites
267

420 posts
24 BF$

Going to try this out, more since I am running a daemon on the seeder vps, and want to see if the seeder grabs any of the onion nodes I am currently running. I am running fortunastake on port 9999, but typical person would switch out 9999 to 33369. Also denarius uses tor=127.0.0.1:9050 in denarius.conf. Again don't need to run a daemon on the seeder itself, just like an all in one vps, and curious if this will only pick up port 33369 onions or also port 9999.

install tor quickly

sudo apt install tor

sudo nano /etc/tor/torrc

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServiceVersion 2
HiddenServicePort 9999 127.0.0.1:9999
HiddenServicePort 33369 127.0.0.1:9999

restart tor

sudo service tor restart

get the new onion address

sudo cat /var/lib/tor/hidden_service/hostname

add these lines to denarius.conf

tor=127.0.0.1:9050
externalip=xnbolpbtb6hjgz67.onion

restart daemon, then restart seeder with the option

-o 127.0.0.1:9050

Don't actually need to do any of that except install tor.

and the final generic-seeder line is

./dnsseed -h dnsseed.denarius.pro -n vps.denarius.pro -m buzz.denarius.io -o 127.0.0.1:9050

already picking other onion nodes up and both ports =], good enough for now.

37gfwk6647pdqxci.onion:33369                        0   1589841222   24.29%   6.72%   2.29%   0.33%   0.08%  3276995  0000001f  33900 "/Denarii:3.3.9.7/"
ylyw4ttjkbws3yj4.onion:9999                         0   1589841238   23.77%   6.56%   2.24%   0.32%   0.08%  3276995  00000001  33900 "/Denarii:3.3.9.7/"

 


If you enjoy my content please consider donating to the Denarius creator - https://www.patreon.com/carsenk
Join Denarius Discord - https://discord.gg/JQEmXwb

Share this post


Link to post
Share on other sites
267

420 posts
24 BF$

Attempting a docker just because, but not sure if there is an easy way to pass the settings.conf file through to keep it generic using variables or something.

Dockerfile

FROM alpine:3.11 as builder

RUN apk update && apk add \
    g++ \
    gcc \
    libc-dev \
    make \
    git \
    openssl-dev \
    curl-dev \
    libconfig-dev \
    boost-dev && \
    git clone https://github.com/team-exor/generic-seeder.git && \
    cd generic-seeder && \
    make

FROM alpine:3.11

RUN apk --no-cache add    \
      libgcc              \
      libstdc++ \
      libconfig-dev \
      curl-dev

RUN mkdir -p /data

VOLUME ["/data"]

COPY --from=builder /generic-seeder/dnsseed /usr/local/bin/

EXPOSE 53

ENTRYPOINT ["dnsseed"]
CMD ["--help"]

I built locally as seeder:1.0 in a ~/docker/seeder folder

docker build --tag seeder:1.0 .

A simple run of the above after building to make sure the commands pass through.

docker run -it -v ~/docker/seeder/settings.conf:/settings.conf seeder:1.0 -o 127.0.0.1:9050

The image comes out to about 10megs, haven't tested connecting or anything, and probably exposing port 53 isn't the best for something generic. Unclear if building in debian:buster-slim is better than alpine, or even some ubuntu slimmed down version. Eventually combine into a daemon, electrumx, tor, and seeder docker-compose.yml.


If you enjoy my content please consider donating to the Denarius creator - https://www.patreon.com/carsenk
Join Denarius Discord - https://discord.gg/JQEmXwb

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...