Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ prerender-server/node_modules
data_bitcoin_mainnet
data_liquid_mainnet
data_bitcoin_testnet
data_bitcoin_testnet4
data_bitcoin_regtest
data_liquid_regtest
www/libwally
data_liquid_testnet
data_bitcoin_signet
gitlab/
gitlab/
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ docker run -p 50001:50001 -p 8084:80 \
bash -c "/srv/explorer/run.sh bitcoin-testnet explorer"
```

## How to run the explorer for Bitcoin testnet4

```
docker run -p 50001:50001 -p 8084:80 \
--volume $PWD/data_bitcoin_testnet4:/data \
--rm -i -t esplora \
bash -c "/srv/explorer/run.sh bitcoin-testnet4 explorer"
```

## How to run the explorer for Bitcoin signet

```bash
Expand Down
4 changes: 4 additions & 0 deletions contrib/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ RUN source /root/.nvm/nvm.sh \
npm run dist -- bitcoin-mainnet \
&& DEST=/srv/explorer/static/bitcoin-testnet \
npm run dist -- bitcoin-testnet \
&& DEST=/srv/explorer/static/bitcoin-testnet4 \
npm run dist -- bitcoin-testnet4 \
&& DEST=/srv/explorer/static/bitcoin-signet \
npm run dist -- bitcoin-signet \
&& DEST=/srv/explorer/static/bitcoin-regtest \
Expand All @@ -40,6 +42,8 @@ RUN source /root/.nvm/nvm.sh \
npm run dist -- bitcoin-mainnet blockstream \
&& DEST=/srv/explorer/static/bitcoin-testnet-blockstream \
npm run dist -- bitcoin-testnet blockstream \
&& DEST=/srv/explorer/static/bitcoin-testnet4-blockstream \
npm run dist -- bitcoin-testnet4 blockstream \
&& DEST=/srv/explorer/static/bitcoin-signet-blockstream \
npm run dist -- bitcoin-signet blockstream \
&& DEST=/srv/explorer/static/bitcoin-regtest-blockstream \
Expand Down
8 changes: 4 additions & 4 deletions contrib/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ RUN git clone --quiet --depth 1 --single-branch --branch v0.40.1 https://github.
ARG TARGETARCH
ENV SHA256SUM_ELEMENTS_X86_64="86e3061a6cb82ea979954d7b187442b6a104648c26bda2ddf297e513b5d53c51"
ENV SHA256SUM_ELEMENTS_ARM64="e44566fad37cb632fa7b4d288e6e20fb3af26745a20950da8c55997ad427e05c"
ENV SHA256SUM_BITCOINCORE_X86_64="acc223af46c178064c132b235392476f66d486453ddbd6bca6f1f8411547da78"
ENV SHA256SUM_BITCOINCORE_ARM64="154c9b9e6e17136edc8f20fda5d252fb339e727e4a85ef49e7d8facb9085f2d3"
ENV SHA256SUM_BITCOINCORE_X86_64="98add5f220c01b387343b70edeb6273403fe081e22cd85fda132704cdcaa98aa"
ENV SHA256SUM_BITCOINCORE_ARM64="10581b6d4aeb091c08c9e69eb4e4ced000038c009286dc1edb8a876656ccf6df"

ENV VERSION_BITCOINCORE=27.2
ENV VERSION_BITCOINCORE=28.2
RUN if [ "${TARGETARCH}" = "arm64" ]; then \
curl -sL -o bitcoin.tar.gz "https://bitcoincore.org/bin/bitcoin-core-${VERSION_BITCOINCORE}/bitcoin-${VERSION_BITCOINCORE}-aarch64-linux-gnu.tar.gz"; \
echo "${SHA256SUM_BITCOINCORE_ARM64} bitcoin.tar.gz" | sha256sum --check; \
Expand Down Expand Up @@ -65,7 +65,7 @@ RUN source /root/.cargo/env \
&& mkdir -p /srv/explorer/electrs{,_liquid} \
&& git clone --no-checkout https://github.com/blockstream/electrs.git \
&& (cd electrs \
&& git checkout 306f66acf2ab10bcd99b8012e95a0de30b2cc012 \
&& git checkout fee74a0450bc28f50f89d8115c8434844088d469 \
&& cp contrib/popular-scripts.txt /srv/explorer \
&& cargo install --root /srv/explorer/electrs_bitcoin --locked --path . --features electrum-discovery \
&& cargo install --root /srv/explorer/electrs_liquid --locked --path . --features electrum-discovery,liquid \
Expand Down
11 changes: 11 additions & 0 deletions contrib/bitcoin-testnet4-explorer.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
testnet4=1
[testnet4]
server=1
peerbloomfilters=0
enforcenodebloom=1
disablewallet=1
listenonion=1
listen=1
mempoolfullrbf=1
blocknotify=pkill -USR1 electrs
maxmempool=1000
12 changes: 12 additions & 0 deletions flavors/bitcoin-testnet4/config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

export SITE_TITLE='Bitcoin Testnet4 Explorer'
export HOME_TITLE='Bitcoin Testnet4 Explorer'
export NATIVE_ASSET_LABEL=tBTC
export NATIVE_ASSET_NAME='Bitcoin Testnet4'

export MENU_ACTIVE='Bitcoin Testnet4'
export BASE_HREF=${BASE_HREF:-'/testnet4/'}

export CUSTOM_ASSETS="$CUSTOM_ASSETS flavors/bitcoin-testnet4/www/*"
export CUSTOM_CSS="$CUSTOM_CSS flavors/bitcoin-testnet4/extras.css"
71 changes: 71 additions & 0 deletions flavors/bitcoin-testnet4/extras.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#BitcoinTestnet, #LiquidTestnet{
display: block;
}

#Bitcoin, #Liquid{
display: none;
}

.main-nav li.active a{
border: 1px solid rgba(168, 184, 201, 1);
}

.sub-nav .active {
border-bottom: solid 2px rgba(168, 184, 201, 1);
}

.details-btn > div {
color: rgba(168, 184, 201, 1);
border: 1px solid rgba(168, 184, 201, 1);
}

.transaction-box > .footer > div:nth-child(3) {
color: rgba(168, 184, 201, 1);
}

.navbar {
background-image: linear-gradient(-90deg, rgba(84, 103, 124, 1) 0%, rgba(29, 72, 111, 1) 18%, rgba(24, 53, 80, 1) 36%, rgba(29, 37, 48, 1) 58%, rgba(14, 16, 17, 1) 100%);
}

.sub-nav a sup.highlight{
display: none;
}

.main-nav li a{
color: #78838e;
}

.nav-link:hover{
color: white !important;
}

.sub-navbar:before {
content: "Bitcoin Testnet4 is used for testing. Funds have no value!";
width: 100%;
height: 35px;
background: #ba042a;
position: absolute;
margin-top: -10px;
text-align: center;
font-size: 14px;
line-height: 2.4;
}

.sub-nav-container{
margin-top: 25px;
}

.table-title, .block-header-title, .transaction-header-title{
display: flex;
}

.table-title:after, .block-header-title:after, .transaction-header-title:after {
content: "Testnet4";
font-size: 13px;
background-color: rgb(48 59 70);
padding: 3px 12px;
border-radius: 30px;
margin-left: 15px;
display: inline-block;
align-self: center;
}
Binary file added flavors/bitcoin-testnet4/www/img/block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/bitcoin-testnet4/www/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions flavors/bitcoin-testnet4/www/img/icons/menu-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/bitcoin-testnet4/www/img/icons/minus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/bitcoin-testnet4/www/img/icons/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/bitcoin-testnet4/www/img/icons/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added flavors/bitcoin-testnet4/www/img/transaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SYNC_SOURCE=$5
NGINX_GCLB_IP=${NGINX_GCLB_IP:-34.36.36.12} # bs.info

if [ -z "$FLAVOR" ] || [ ! -d /srv/explorer/static/$FLAVOR ]; then
echo "Please provide bitcoin-mainnet, bitcoin-testnet, bitcoin-signet, bitcoin-regtest, liquid-mainnet, liquid-testnet or liquid-regtest as a parameter"
echo "Please provide bitcoin-mainnet, bitcoin-testnet, bitcoin-testnet4, bitcoin-signet, bitcoin-regtest, liquid-mainnet, liquid-testnet or liquid-regtest as a parameter"
echo "For example run.sh bitcoin-mainnet explorer"
exit 1
fi
Expand All @@ -26,7 +26,9 @@ ELECTRS_NETWORK=${NETWORK}

DAEMON_DIR="/data/$DAEMON"
if [ "$DAEMON-$NETWORK" == "bitcoin-testnet" ]; then
DAEMON_DIR="$DAEMON_DIR/testnet3"
DAEMON_DIR="$DAEMON_DIR/testnet"
elif [ "$DAEMON-$NETWORK" == "bitcoin-testnet4" ]; then
DAEMON_DIR="$DAEMON_DIR/testnet4"
elif [ "$DAEMON-$NETWORK" == "bitcoin-signet" ]; then
DAEMON_DIR="$DAEMON_DIR/signet"
elif [ "$DAEMON-$NETWORK" == "liquid-mainnet" ]; then
Expand Down Expand Up @@ -54,7 +56,7 @@ NGINX_REWRITE_NOJS='return 301 " /nojs$uri"'
NGINX_CSP="default-src 'self'; script-src 'self' 'unsafe-eval'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; object-src 'none'"

if [ "${DAEMON}" != "liquid" ]; then
if [ "$NETWORK" == "testnet" ] || [ "$NETWORK" == "signet" ] || [ "$NETWORK" == "regtest" ]; then
if [ "$NETWORK" == "testnet" ] || [ "$NETWORK" == "testnet4" ] || [ "$NETWORK" == "signet" ] || [ "$NETWORK" == "regtest" ]; then
NGINX_PATH="$NETWORK/"
NGINX_NOSLASH_PATH="$NETWORK"
NGINX_REWRITE='rewrite ^/'$NETWORK'(/.*)$ $1 break;'
Expand Down