├── .gitignore ├── fullnode ├── .dockerignore ├── build.sh ├── docker-entrypoint.sh ├── run.sh └── Dockerfile ├── explorer ├── start.sh ├── stop.sh ├── backend │ ├── build.sh │ └── Dockerfile ├── frontend │ ├── build.sh │ └── Dockerfile ├── nginx.default.conf └── docker-compose.yml ├── faucet ├── .dockerignore ├── config.sample.rc ├── build.sh ├── nginx.default.conf ├── run.sh ├── Dockerfile └── docker-compose.yml ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | config.rc 2 | .env 3 | -------------------------------------------------------------------------------- /fullnode/.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | -------------------------------------------------------------------------------- /explorer/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | docker-compose up 3 | -------------------------------------------------------------------------------- /explorer/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | docker-compose down 3 | -------------------------------------------------------------------------------- /faucet/.dockerignore: -------------------------------------------------------------------------------- 1 | Dockerfile 2 | config.sample.rc 3 | config.rc 4 | -------------------------------------------------------------------------------- /faucet/config.sample.rc: -------------------------------------------------------------------------------- 1 | export FAUCET_HOUR_MAX='1.0' 2 | export FAUCET_DAY_MAX='5.0' 3 | export FAUCET_WEEK_MAX='10.0' 4 | export FAUCET_MIN='10' 5 | export FAUCET_HOUR_SPLIT='100' 6 | export FAUCET_PASSWORD='' 7 | -------------------------------------------------------------------------------- /fullnode/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build the bitcoin full node docker image 4 | # Takes image name as first argument, which defaults to 5 | # 6 | # kallewoof/bitcoin:0.21 7 | 8 | imagename="kallewoof/bitcoin:0.21" 9 | 10 | if [ $# -gt 0 ]; then imagename=$1; shift; fi 11 | if [ $# -gt 0 ]; then echo "syntax: $0 []"; exit 1; fi 12 | 13 | docker build -t $imagename . 14 | -------------------------------------------------------------------------------- /explorer/backend/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build the signet explorer backend docker image 4 | # Takes image name as first argument, which defaults to 5 | # 6 | # kallewoof/signet-explorer-backend:0.18 7 | 8 | imagename="kallewoof/signet-explorer-backend:0.18" 9 | 10 | if [ $# -gt 0 ]; then imagename=$1; shift; fi 11 | if [ $# -gt 0 ]; then echo "syntax: $0 []"; exit 1; fi 12 | 13 | docker build -t $imagename . 14 | -------------------------------------------------------------------------------- /explorer/frontend/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build the signet explorer frontend docker image 4 | # Takes image name as first argument, which defaults to 5 | # 6 | # kallewoof/signet-explorer-frontend:0.18 7 | 8 | imagename="kallewoof/signet-explorer-frontend:0.18" 9 | 10 | if [ $# -gt 0 ]; then imagename=$1; shift; fi 11 | if [ $# -gt 0 ]; then echo "syntax: $0 []"; exit 1; fi 12 | 13 | docker build -t $imagename . 14 | -------------------------------------------------------------------------------- /explorer/backend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:latest 2 | 3 | RUN apt-get update \ 4 | && apt-get install -yq \ 5 | clang \ 6 | cmake 7 | 8 | RUN git clone https://github.com/kallewoof/electrs.git --branch 2019-07-signet /workspace/electrs 9 | 10 | WORKDIR /workspace/electrs 11 | 12 | RUN cargo build --release 13 | 14 | RUN cp target/release/electrs /usr/bin 15 | 16 | # Electrum RPC 17 | EXPOSE 50001 18 | 19 | # Prometheus monitoring 20 | EXPOSE 4224 21 | 22 | STOPSIGNAL SIGINT 23 | 24 | CMD ["electrs", "-vvvv", "--timestamp", "--network", "signet"] 25 | -------------------------------------------------------------------------------- /faucet/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build the signet faucet docker image 4 | # Takes image name as first argument, which defaults to 5 | # 6 | # kallewoof/signet-faucet:0.18 7 | 8 | imagename="kallewoof/signet-faucet:0.18" 9 | 10 | if [ $# -gt 0 ]; then imagename=$1; shift; echo "warning: while you can build a custom image, run.sh will use the default; you must update docker-compose.yml to use $imagename instead of the default kallewoof/signet-faucet:0.18 for this to have any effect"; fi 11 | if [ $# -gt 0 ]; then echo "syntax: $0 []"; exit 1; fi 12 | 13 | docker build -t $imagename . 14 | -------------------------------------------------------------------------------- /faucet/nginx.default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | 4 | server_name localhost; 5 | 6 | root /var/www/html; 7 | 8 | # Add index.php to the list if you are using PHP 9 | index index.html index.htm index.nginx-debian.html; 10 | 11 | location / { 12 | proxy_pass http://faucet:8123; 13 | proxy_http_version 1.1; 14 | proxy_set_header Upgrade $http_upgrade; 15 | proxy_set_header Connection 'upgrade'; 16 | proxy_set_header Host $host; 17 | proxy_set_header X-Real-IP $remote_addr; 18 | proxy_cache_bypass $http_upgrade; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /faucet/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # You can optionally build the docker image manually by doing 4 | # 5 | # docker build -t kallewoof/signet-faucet:0.18 . 6 | # 7 | # or 8 | # 9 | # ./build.sh 10 | # 11 | # and then call this script. Note that you cannot customize the image name here. 12 | # If you want custom images, instead edit the docker-compose.yml file! 13 | 14 | set -e 15 | 16 | if [ $# -gt 0 ]; then echo "syntax: $0 takes no arguments; modify docker-compose.yml to your needs"; exit 1; fi 17 | 18 | if [ -e "config.rc" ]; then source config.rc; else source config.sample.rc; fi 19 | 20 | docker-compose up 21 | -------------------------------------------------------------------------------- /fullnode/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Source: https://github.com/ruimarinho/docker-bitcoin-core/blob/master/0.18/docker-entrypoint.sh 3 | 4 | set -e 5 | 6 | if [ ! -e "$BITCOIN_DATA/bitcoin.conf" ]; then 7 | echo "$0: creating $BITCOIN_DATA/bitcoin.conf with signet=1" 8 | echo -e "signet=1\n[signet]\n$BITCOIN_EXTRA_ARGS" > $BITCOIN_DATA/bitcoin.conf 9 | fi 10 | 11 | if [ $(echo "$1" | cut -c1) = "-" ]; then 12 | echo "$0: assuming arguments for bitcoind" 13 | set -- bitcoind "$@" 14 | fi 15 | 16 | if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then 17 | mkdir -p "$BITCOIN_DATA" 18 | chmod 700 "$BITCOIN_DATA" 19 | 20 | echo "$0: setting data directory to $BITCOIN_DATA" 21 | 22 | set -- "$@" -datadir="$BITCOIN_DATA" 23 | fi 24 | 25 | echo 26 | exec "$@" 27 | -------------------------------------------------------------------------------- /fullnode/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # You can optionally build the docker image manually by doing 4 | # 5 | # docker build -t SOMENAME . 6 | # 7 | # or 8 | # 9 | # ./build.sh SOMENAME 10 | # 11 | # and then call this script with SOMENAME as the first argument. 12 | # 13 | # SOMENAME defaults to kallewoof/bitcoin:0.21 in both the build.sh and 14 | # run.sh cases. 15 | # 16 | # You can also choose the directory to map the bitcoin data directory to, 17 | # as the second argument. This defaults to 18 | # 19 | # $HOME/docker-signet 20 | 21 | set -e -a 22 | 23 | imagename="kallewoof/bitcoin:0.21" 24 | datadirmp=$HOME/docker-signet 25 | 26 | if [ $# -gt 0 ]; then imagename=$1; shift; fi 27 | if [ $# -gt 0 ]; then datadirmp=$1; shift; fi 28 | if [ $# -gt 0 ]; then echo "syntax: $0 [ []]"; exit 1; fi 29 | 30 | mkdir -p $datadirmp 31 | docker run -p 38333:38333 -v $datadirmp:/root/.bitcoin $imagename 32 | -------------------------------------------------------------------------------- /explorer/nginx.default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | 4 | server_name localhost; 5 | 6 | root /var/www/html; 7 | 8 | location ~ ^/api(/?)(.*) { 9 | proxy_pass http://172.28.1.3:4000/$2; 10 | proxy_set_header Host $host; 11 | proxy_set_header X-Forwarded-Server $host; 12 | proxy_set_header X-Real-IP $remote_addr; 13 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 14 | proxy_set_header X-Forwarded-Proto $scheme; 15 | port_in_redirect off; 16 | proxy_connect_timeout 300; 17 | } 18 | 19 | location / { 20 | proxy_pass http://172.28.1.4:5000; 21 | proxy_set_header Host $host; 22 | proxy_set_header X-Forwarded-Server $host; 23 | proxy_set_header X-Real-IP $remote_addr; 24 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 25 | proxy_set_header X-Forwarded-Proto $scheme; 26 | port_in_redirect off; 27 | proxy_connect_timeout 300; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /faucet/Dockerfile: -------------------------------------------------------------------------------- 1 | # Based on Blockstream's esplora project 2 | 3 | FROM debian:stretch-slim 4 | 5 | # TODO: weed out unnecessary deps 6 | RUN apt-get -yq update \ 7 | && apt-get -yq install \ 8 | curl \ 9 | git 10 | 11 | RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - 12 | 13 | RUN apt-get install -yq nodejs 14 | 15 | RUN git clone https://github.com/kallewoof/bitcoin-faucet.git /srv/faucet 16 | 17 | WORKDIR /srv/faucet 18 | 19 | ARG COMMIT=master 20 | 21 | RUN git pull \ 22 | && git checkout $COMMIT 23 | 24 | SHELL ["/bin/bash", "-c"] 25 | 26 | # required to run some scripts as root (needed for docker) 27 | RUN npm config set unsafe-perm true \ 28 | && npm install 29 | 30 | # cleanup 31 | RUN apt-get --auto-remove remove -yqq --purge manpages git \ 32 | && apt-get clean \ 33 | && apt-get autoclean \ 34 | && rm -rf /usr/share/doc* /usr/share/man /usr/share/postgresql/*/man /var/lib/apt/lists/* /var/cache/* /tmp/* /root/.cache /*.deb /root/.cargo 35 | 36 | ENV FAUCET_NAME="Signet Faucet" 37 | 38 | RUN cp config.example.js config.js 39 | 40 | EXPOSE 8123 41 | 42 | CMD ["./index.js"] 43 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 kallewoof 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /faucet/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | env_file: 3 | - .env 4 | services: 5 | nginx: 6 | image: nginx:latest 7 | volumes: 8 | - ./nginx.default.conf:/etc/nginx/conf.d/default.conf 9 | ports: 10 | - 80:80 11 | - 443:443 12 | links: 13 | - faucet 14 | 15 | mongo: 16 | image: mongo 17 | expose: 18 | - "27017" # mongo 19 | 20 | signet: 21 | restart: unless-stopped 22 | image: kallewoof/bitcoin:0.21 23 | environment: 24 | BITCOIN_NETWORK: signet 25 | BITCOIN_EXTRA_ARGS: |- 26 | rpcuser=${BTC_RPC_USER} 27 | rpcpassword=${BTC_RPC_PASS} 28 | rpcport=43782 29 | rpcallowip=0.0.0.0/0 30 | rpcbind=0.0.0.0:43782 31 | port=39388 32 | whitelist=0.0.0.0/0 33 | zmqpubrawblock=tcp://0.0.0.0:28332 34 | zmqpubrawtx=tcp://0.0.0.0:28333 35 | ports: 36 | - 43782:43782 37 | expose: 38 | - "43782" # RPC 39 | - "39388" # P2P 40 | - "28332" # ZMQ 41 | - "28333" # ZMQ 42 | volumes: 43 | - $HOME/bitcoin_datadir:/root/.bitcoin 44 | 45 | faucet: 46 | image: kallewoof/signet-faucet:0.18 47 | environment: 48 | MONGODB_HOST: mongo 49 | BITCOIND_HOST: signet 50 | BITCOIND_PORT: 43782 51 | BITCOIND_USER: ${BTC_RPC_USER} 52 | BITCOIND_PASS: ${BTC_RPC_PASS} 53 | FAUCET_HOUR_MAX: ${FAUCET_HOUR_MAX} 54 | FAUCET_DAY_MAX: ${FAUCET_DAY_MAX} 55 | FAUCET_WEEK_MAX: ${FAUCET_WEEK_MAX} 56 | FAUCET_MIN: ${FAUCET_MIN} 57 | FAUCET_HOUR_SPLIT: ${FAUCET_HOUR_SPLIT} 58 | FAUCET_PASSWORD: ${FAUCET_PASSWORD} 59 | expose: 60 | - "8123" # faucet 61 | -------------------------------------------------------------------------------- /fullnode/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stretch-slim as builder 2 | 3 | RUN apt-get update -y \ 4 | && apt-get install -y \ 5 | automake \ 6 | autotools-dev \ 7 | bsdmainutils \ 8 | build-essential \ 9 | git \ 10 | gosu \ 11 | libboost-chrono-dev \ 12 | libboost-filesystem-dev \ 13 | libboost-system-dev \ 14 | libboost-test-dev \ 15 | libboost-thread-dev \ 16 | libevent-dev \ 17 | libminiupnpc-dev \ 18 | libssl-dev \ 19 | libtool \ 20 | libzmq3-dev \ 21 | pkg-config \ 22 | python3 \ 23 | wget \ 24 | && apt-get clean \ 25 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 26 | 27 | RUN git clone https://github.com/bitcoin/bitcoin.git --branch 0.21 /workspace 28 | 29 | WORKDIR /workspace 30 | 31 | RUN ./contrib/install_db4.sh `pwd` 32 | 33 | RUN ./autogen.sh 34 | 35 | ENV BDB_PREFIX='/workspace/db4' 36 | 37 | RUN ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --disable-tests --disable-bench --without-gui --prefix=/workspace/build 38 | 39 | RUN V=1 make clean 40 | 41 | RUN V=1 make -j2 42 | 43 | RUN make install 44 | 45 | FROM debian:stretch-slim 46 | 47 | RUN apt-get update -y \ 48 | && apt-get install -y \ 49 | curl \ 50 | libboost-chrono1.62.0 \ 51 | libboost-filesystem1.62.0 \ 52 | libboost-system1.62.0 \ 53 | libboost-thread1.62.0 \ 54 | libevent-2.0-5 \ 55 | libevent-pthreads-2.0-5 \ 56 | libminiupnpc10 \ 57 | libssl1.1 \ 58 | libzmq5 \ 59 | && apt-get clean \ 60 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 61 | 62 | COPY --from=builder "/workspace/build/bin" /usr/local/bin 63 | 64 | COPY --from=builder /workspace/contrib /workspace/contrib 65 | 66 | ENV BITCOIN_VERSION=0.21.0 67 | ENV BITCOIN_DATA=/root/.bitcoin 68 | ENV PATH=/workspace/contrib/signet:$PATH 69 | 70 | RUN mkdir -p ${BITCOIN_DATA} 71 | 72 | COPY docker-entrypoint.sh /entrypoint.sh 73 | 74 | EXPOSE 8332 8333 18332 18333 18443 18444 38332 38333 75 | 76 | ENTRYPOINT ["/entrypoint.sh"] 77 | 78 | CMD ["bitcoind", "-signet"] 79 | -------------------------------------------------------------------------------- /explorer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | nginx: 5 | image: nginx:latest 6 | volumes: 7 | - ./nginx.default.conf:/etc/nginx/conf.d/default.conf 8 | ports: 9 | - 80:80 10 | - 443:443 11 | links: 12 | - explorer_frontend 13 | networks: 14 | explorer_net: 15 | ipv4_address: 172.28.1.1 16 | 17 | signet: 18 | restart: unless-stopped 19 | image: kallewoof/bitcoin:0.21 20 | environment: 21 | BITCOIN_NETWORK: signet 22 | BITCOIN_EXTRA_ARGS: |- 23 | rpcport=43782 24 | rpcallowip=0.0.0.0/0 25 | rpcbind=0.0.0.0:43782 26 | port=39388 27 | whitelist=0.0.0.0/0 28 | zmqpubrawblock=tcp://0.0.0.0:28332 29 | zmqpubrawtx=tcp://0.0.0.0:28333 30 | ports: 31 | - 43782:43782 32 | expose: 33 | - "43782" # RPC 34 | - "39388" # P2P 35 | - "28332" # ZMQ 36 | - "28333" # ZMQ 37 | volumes: 38 | - $HOME/bitcoin_datadir:/root/.bitcoin 39 | networks: 40 | explorer_net: 41 | ipv4_address: 172.28.1.2 42 | 43 | explorer_backend: 44 | image: kallewoof/signet-explorer-backend:0.18 45 | ports: 46 | - 4000:4000 47 | expose: 48 | - "4000" # electrs API 49 | volumes: 50 | - $HOME/bitcoin_datadir:/root/.bitcoin 51 | command: electrs -vvv --timestamp --daemon-dir /root/.bitcoin --daemon-rpc-addr 172.28.1.2:43782 --network signet --http-addr 0.0.0.0:4000 52 | links: 53 | - signet 54 | networks: 55 | explorer_net: 56 | ipv4_address: 172.28.1.3 57 | 58 | explorer_frontend: 59 | image: kallewoof/signet-explorer-frontend:0.18 60 | ports: 61 | - 5000:5000 62 | expose: 63 | - "5000" # explorer web UI 64 | environment: 65 | PORT: 5000 66 | API_URL: http://localhost/api/ 67 | NATIVE_ASSET_LABEL: sBTC 68 | SITE_TITLE: Signet Block Explorer 69 | SITE_DESC: Esplora Signet Block Explorer 70 | command: npm run dev-server 71 | links: 72 | - explorer_backend 73 | networks: 74 | explorer_net: 75 | ipv4_address: 172.28.1.4 76 | 77 | networks: 78 | explorer_net: 79 | ipam: 80 | driver: default 81 | config: 82 | - subnet: 172.28.0.0/16 83 | -------------------------------------------------------------------------------- /explorer/frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:stretch@sha256:724b0fbbda7fda6372ffed586670573c59e07a48c86d606bab05db118abe0ef5 2 | 3 | RUN apt-get -yqq update \ 4 | && apt-get -yqq upgrade \ 5 | && apt-get -yqq install \ 6 | build-essential \ 7 | curl \ 8 | git \ 9 | libcairo2-dev \ 10 | libgif-dev \ 11 | libjpeg-dev \ 12 | libnginx-mod-http-lua \ 13 | libpixman-1-dev \ 14 | nginx \ 15 | pkg-config \ 16 | procps \ 17 | python \ 18 | runit \ 19 | socat \ 20 | tor 21 | 22 | SHELL ["/bin/bash", "-c"] 23 | 24 | ENV NODE_VERSION 8.11.4 25 | 26 | RUN git clone --quiet --depth 1 --single-branch --branch v0.33.11 https://github.com/creationix/nvm.git /root/.nvm \ 27 | && rm -rf /root/.nvm/.git \ 28 | && source /root/.nvm/nvm.sh \ 29 | && nvm install $NODE_VERSION \ 30 | && nvm alias default $NODE_VERSION \ 31 | && nvm use default 32 | 33 | ENV NODE_PATH /root/.nvm/v$NODE_VERSION/lib/node_modules 34 | ENV PATH /root/.nvm/versions/node/v$NODE_VERSION/bin:$PATH 35 | 36 | RUN mkdir -p /srv/explorer/static 37 | 38 | RUN git clone https://github.com/kallewoof/esplora.git --branch=2019-07-signet /srv/explorer/source 39 | 40 | ARG FOOT_HTML 41 | 42 | WORKDIR /srv/explorer/source 43 | 44 | RUN npm config set unsafe-perm true \ 45 | && npm install && (cd prerender-server && npm run dist) \ 46 | && DEST=/srv/explorer/static/bitcoin-mainnet \ 47 | npm run dist -- bitcoin-mainnet \ 48 | && DEST=/srv/explorer/static/bitcoin-testnet \ 49 | npm run dist -- bitcoin-testnet \ 50 | && DEST=/srv/explorer/static/bitcoin-signet \ 51 | npm run dist -- bitcoin-signet \ 52 | && DEST=/srv/explorer/static/liquid-mainnet \ 53 | npm run dist -- liquid-mainnet \ 54 | && DEST=/srv/explorer/static/bitcoin-mainnet-blockstream \ 55 | npm run dist -- bitcoin-mainnet blockstream \ 56 | && DEST=/srv/explorer/static/bitcoin-testnet-blockstream \ 57 | npm run dist -- bitcoin-testnet blockstream \ 58 | && DEST=/srv/explorer/static/liquid-mainnet-blockstream \ 59 | npm run dist -- liquid-mainnet blockstream 60 | 61 | # configuration 62 | RUN cp /srv/explorer/source/run.sh /srv/explorer/ 63 | 64 | # cleanup 65 | RUN apt-get --auto-remove remove -yq --purge manpages git \ 66 | && apt-get clean \ 67 | && apt-get autoclean \ 68 | && rm -rf /usr/share/doc* /usr/share/man /usr/share/postgresql/*/man /var/lib/apt/lists/* /var/cache/* /tmp/* /root/.cache /*.deb /root/.cargo 69 | 70 | WORKDIR /srv/explorer/source 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Full node 2 | 3 | To get a full node running, do 4 | 5 | ```Bash 6 | $ cd fullnode 7 | $ ./build.sh # optional - takes time and CPU, but means you build it yourself 8 | $ ./run.sh 9 | ``` 10 | 11 | # Faucet 12 | 13 | You can make a personal faucet, which is useful in the classroom when everybody is on the same IP and can't use the default faucet. 14 | 15 | ```Bash 16 | $ cd faucet 17 | $ ./build.sh # optional - same as above, though this is pretty fast so why not? 18 | $ ./run.sh 19 | ``` 20 | 21 | Faucet should appear if you go to http://localhost on your machine. Other people should see the faucet if they go to http://YOURIPNUMBER as well. If they don't, you may need to (temporarily) turn off your firewall. Remember to turn it on again afterwards. 22 | 23 | The faucet will need some balance, so fetch from the global faucet into yours. 24 | 25 | ```Bash 26 | # from a different terminal, without terminating the run.sh call above 27 | $ docker ps 28 | # CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 29 | # 97e1b08651b6 nginx:latest "nginx -g 'daemon of…" 43 seconds ago Up 42 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp faucet_nginx_1 30 | # 255afd0c6172 kallewoof/signet:0.18 "/entrypoint.sh bitc…" About a minute ago Up About a minute 8332-8333/tcp, 18332-18333/tcp, 18443-18444/tcp, 28332-28333/tcp, 38332-38333/tcp, 39388/tcp, 0.0.0.0:43782->43782/tcp faucet_signet_1 31 | # ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ (this is the one we want) 32 | # f087ee46666b mongo "docker-entrypoint.s…" About a minute ago Up About a minute 27017/tcp faucet_mongo_1 33 | # cbfacae62149 kallewoof/signet-faucet:0.18 "./index.js" About a minute ago Up About a minute 8123/tcp faucet_faucet_1 34 | $ docker exec 255afd0c6172 bitcoin-cli getbalance 35 | # 0.00000000 36 | $ docker exec 255afd0c6172 getcoins.sh 37 | # % Total % Received % Xferd Average Speed Time Time Time Current 38 | # Dload Upload Total Spent Left Speed 39 | # 100 156 0 106 100 50 34 16 0:00:03 0:00:03 --:--:-- 34 40 | # Payment of 10.00000000 BTC sent with txid d7d0b234b6cec0029421b71bd4740448a028b3c436a58e1e175d2d2d1a0287a8 41 | $ docker exec 255afd0c6172 bitcoin-cli getunconfirmedbalance 42 | # 10.00000000 43 | ``` 44 | 45 | Faucet will become functional as soon as the next block is mined. It will by default send between 10~100 mBTC. 46 | 47 | # Block explorer 48 | 49 | You can set up your own personal explorer. 50 | 51 | ```Bash 52 | $ cd explorer 53 | $ docker-compose up 54 | ``` 55 | 56 | In a browser, go to http://localhost/ to see the Explorer. 57 | 58 | Note: this only works with localhost, without reverse proxy grokkery. 59 | 60 | # Lightning node 61 | 62 | WIP (help welcome) 63 | 64 | # Mobile wallet 65 | 66 | WIP (help welcome) 67 | --------------------------------------------------------------------------------