mirror of
https://github.com/getumbrel/umbrel-apps.git
synced 2024-11-11 16:09:18 +00:00
Update tdex to v1.0.0 (#754)
Co-authored-by: nmfretz <nmfretz@gmail.com>
This commit is contained in:
parent
6089066639
commit
67a8d8c293
|
@ -1,6 +1,6 @@
|
||||||
:8080 {
|
:8080 {
|
||||||
handle_path /api/* {
|
handle_path /api/* {
|
||||||
reverse_proxy tdex_tdexd_1:9090
|
reverse_proxy tdex_tdexd_1:9092
|
||||||
}
|
}
|
||||||
reverse_proxy tdex_dashboard_1:8080
|
reverse_proxy tdex_dashboard_1:8080
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,18 +6,37 @@ services:
|
||||||
APP_HOST: tdex_caddy_1
|
APP_HOST: tdex_caddy_1
|
||||||
APP_PORT: 8080
|
APP_PORT: 8080
|
||||||
|
|
||||||
tdexd:
|
oceand:
|
||||||
image: ghcr.io/tdex-network/tdexd:v0.9.1@sha256:5078897b9a505fc3dfac5b3d51537150941c075f5279ae81de1c6b1c21112544
|
image: ghcr.io/vulpemventures/oceand:v0.1.17@sha256:37b813b43b068e32d918b9f42539c33287308cc81d00909c742b7164dfefc0c4
|
||||||
tty: true
|
tty: true
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
stop_grace_period: 1m
|
stop_grace_period: 1m
|
||||||
volumes:
|
volumes:
|
||||||
- ${APP_DATA_DIR}/tdex-data:/home/tdex/.tdex-daemon
|
- ${APP_DATA_DIR}/ocean-data:/home/ocean/.oceand
|
||||||
|
environment:
|
||||||
|
OCEAN_LOG_LEVEL: 5
|
||||||
|
OCEAN_DB_TYPE: "badger"
|
||||||
|
OCEAN_NO_TLS: "true"
|
||||||
|
OCEAN_NO_PROFILER: "true"
|
||||||
|
OCEAN_UTXO_EXPIRY_DURATION_IN_SECONDS: 240
|
||||||
|
|
||||||
|
tdexd:
|
||||||
|
image: ghcr.io/tdex-network/tdexd:v1.0.1@sha256:eef1f31e98208e9a35ddf308317bc1df71065e189fa0915c769c7a01394ef79a
|
||||||
|
tty: true
|
||||||
|
restart: on-failure
|
||||||
|
depends_on:
|
||||||
|
- oceand
|
||||||
|
stop_grace_period: 1m
|
||||||
|
volumes:
|
||||||
|
- ${APP_DATA_DIR}/tdexd:/home/tdex/.tdex-daemon
|
||||||
|
ports:
|
||||||
|
- ${APP_TDEX_PORT}:${APP_TDEX_PORT}
|
||||||
environment:
|
environment:
|
||||||
TDEX_LOG_LEVEL: 5
|
TDEX_LOG_LEVEL: 5
|
||||||
TDEX_OPERATOR_LISTENING_PORT: "${APP_TDEX_PORT}"
|
TDEX_OPERATOR_LISTENING_PORT: "${APP_TDEX_PORT}"
|
||||||
TDEX_TRADE_LISTENING_PORT: "${APP_TDEX_PORT}"
|
TDEX_TRADE_LISTENING_PORT: "${APP_TDEX_PORT}"
|
||||||
TDEX_NO_OPERATOR_TLS: "true"
|
TDEX_NO_OPERATOR_TLS: "true"
|
||||||
|
TDEX_WALLET_ADDR: oceand:18000
|
||||||
# these vars are used to generate the connect URL
|
# these vars are used to generate the connect URL
|
||||||
# we assume to always show the external endpoint
|
# we assume to always show the external endpoint
|
||||||
# reachable remotely by other dashboards via Tor
|
# reachable remotely by other dashboards via Tor
|
||||||
|
@ -25,12 +44,12 @@ services:
|
||||||
TDEX_CONNECT_PROTO: http
|
TDEX_CONNECT_PROTO: http
|
||||||
|
|
||||||
dashboard:
|
dashboard:
|
||||||
image: ghcr.io/tdex-network/dashboard:v0.1.55@sha256:dfa7cdb75117c97e671285fc9754a6cabafc7f74760c314e6625c33067509beb
|
image: ghcr.io/tdex-network/dashboard:v1.0.2@sha256:71d598afb0d5ec9966306f4ef0d5f6839a9d7dc50726a935f3d0bb38f1925d78
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
environment:
|
environment:
|
||||||
USE_PROXY: "false"
|
USE_PROXY: "false"
|
||||||
IS_PACKAGED: "true"
|
IS_PACKAGED: "true"
|
||||||
TRADER_HIDDEN_SERVICE: "${APP_TDEX_DAEMON_HIDDEN_SERVICE}"
|
TRADER_HIDDEN_SERVICE: "${APP_TDEX_DAEMON_HIDDEN_SERVICE}"
|
||||||
|
|
||||||
caddy:
|
caddy:
|
||||||
image: caddy:2.6.4-alpine@sha256:4dfec6c3b22c36b63ea4a3633c7cdbdaa9926d1324c27db2b0e2b70ef9cd105a
|
image: caddy:2.6.4-alpine@sha256:4dfec6c3b22c36b63ea4a3633c7cdbdaa9926d1324c27db2b0e2b70ef9cd105a
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export APP_TDEX_PORT="9090"
|
export APP_TDEX_PORT="9092"
|
||||||
|
|
||||||
daemon_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-daemon/hostname"
|
daemon_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-daemon/hostname"
|
||||||
export APP_TDEX_DAEMON_HIDDEN_SERVICE="$(cat "${daemon_hidden_service_file}" 2>/dev/null || echo "daemon_not_yet_set.onion")"
|
export APP_TDEX_DAEMON_HIDDEN_SERVICE="$(cat "${daemon_hidden_service_file}" 2>/dev/null || echo "daemon_not_yet_set.onion")"
|
||||||
|
|
|
@ -1,13 +1,32 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)"
|
||||||
|
|
||||||
|
# Update the Caddyfile with newer tdexd port
|
||||||
|
CADDYFILE_PATH="${APP_DATA_DIR}/caddy-data/Caddyfile"
|
||||||
|
sed -i 's/tdex_tdexd_1:9090/tdex_tdexd_1:9092/g' "${CADDYFILE_PATH}"
|
||||||
|
|
||||||
|
# Ensure the ocean-data directory exists for apps updating from the old version that didn't have it
|
||||||
|
OCEAN_DATA_DIR="${APP_DATA_DIR}/ocean-data"
|
||||||
|
|
||||||
|
[ ! -d "${OCEAN_DATA_DIR}" ] && mkdir -p "${OCEAN_DATA_DIR}" && chown 1000:1000 "${OCEAN_DATA_DIR}"
|
||||||
|
|
||||||
|
# Ensure the new tdexd directory exists for apps that are updating from the old tdex-data directory structure
|
||||||
|
TDEXD_DATA_DIR="${APP_DATA_DIR}/tdexd"
|
||||||
|
|
||||||
|
[ ! -d "${TDEXD_DATA_DIR}" ] && mkdir -p "${TDEXD_DATA_DIR}" && chown 1000:1000 "${TDEXD_DATA_DIR}"
|
||||||
|
|
||||||
# Delay booting TDEX until the Tor Hidden Service is ready
|
# Delay booting TDEX until the Tor Hidden Service is ready
|
||||||
HIDDEN_SERVICE_FILE="${TOR_DATA_DIR}/app-${APP_ID}-daemon/hostname"
|
HIDDEN_SERVICE_FILE="${TOR_DATA_DIR}/app-${APP_ID}-daemon/hostname"
|
||||||
if [[ -f "${HIDDEN_SERVICE_FILE}" ]]; then
|
if [[ -f "${HIDDEN_SERVICE_FILE}" ]]; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach tdexd
|
|
||||||
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach tor
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach tor
|
||||||
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach oceand
|
||||||
|
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach tdexd
|
||||||
|
|
||||||
echo "App: ${APP_ID} - Generating Tor Hidden Service..."
|
echo "App: ${APP_ID} - Generating Tor Hidden Service..."
|
||||||
for attempt in $(seq 1 100); do
|
for attempt in $(seq 1 100); do
|
||||||
|
|
0
tdex/tdexd/.gitkeep
Executable file
0
tdex/tdexd/.gitkeep
Executable file
|
@ -2,7 +2,7 @@ manifestVersion: 1.1
|
||||||
id: tdex
|
id: tdex
|
||||||
category: bitcoin
|
category: bitcoin
|
||||||
name: TDEX Provider
|
name: TDEX Provider
|
||||||
version: "0.9.1"
|
version: "1.0.1"
|
||||||
tagline: Provide liquidity on the TDEX Network, an open protocol to trade Liquid Network assets
|
tagline: Provide liquidity on the TDEX Network, an open protocol to trade Liquid Network assets
|
||||||
description: >-
|
description: >-
|
||||||
A liquidity provider holds Liquid reserves of both a BASE_ASSET-QUOTE_ASSET in his non-custodial Liquid hot-wallet,
|
A liquidity provider holds Liquid reserves of both a BASE_ASSET-QUOTE_ASSET in his non-custodial Liquid hot-wallet,
|
||||||
|
@ -16,6 +16,23 @@ description: >-
|
||||||
by the trader, without the need to connect to an external price feed. The default strategy of the alpha daemond is the
|
by the trader, without the need to connect to an external price feed. The default strategy of the alpha daemond is the
|
||||||
constant product market-making. In short, this model generates a full order-book based on an initial price for the market.
|
constant product market-making. In short, this model generates a full order-book based on an initial price for the market.
|
||||||
Every transaction that occurs on this market will adjust the prices of the market accordingly.
|
Every transaction that occurs on this market will adjust the prices of the market accordingly.
|
||||||
|
releaseNotes: >-
|
||||||
|
🚨 IMPORTANT: Please ensure you have your 24-word recovery phrase written down BEFORE updating.
|
||||||
|
This update will require you to restore your wallet from the 24-word recovery phrase.
|
||||||
|
|
||||||
|
|
||||||
|
This is a major update of the TDEX daemon that contains several changes, including:
|
||||||
|
|
||||||
|
- Update to TDEXv2: the daemon's Trade interface implements the specs of the new TDEX v2 protocol. With this update the daemon makes
|
||||||
|
use of PSETv2 as a way for describing and build transactions (instead of the old PSETv0), and, also, exposes some new endpoint according
|
||||||
|
to the spec.
|
||||||
|
|
||||||
|
- Wallet detachment: the daemon now requires a connection to an Ocean wallet that is fully responsible of deriving new key pairs
|
||||||
|
and scan the chain for them. The wallet produces events consumed by the daemon for confirmed/unconfirmed txs and utxos.
|
||||||
|
This drastically improves the overall perfomances of the service.
|
||||||
|
You don't need to manually claim the funds deposited to the dameon anymore.
|
||||||
|
|
||||||
|
- Embedded price feeder: the daemon allows you to set up price feeds for your pluggable-strategy markets to keep their price always up-to-date.
|
||||||
dependencies: []
|
dependencies: []
|
||||||
developer: TDEX Network
|
developer: TDEX Network
|
||||||
website: https://dev.tdex.network
|
website: https://dev.tdex.network
|
||||||
|
@ -31,5 +48,4 @@ gallery:
|
||||||
- 3.jpg
|
- 3.jpg
|
||||||
path: ""
|
path: ""
|
||||||
defaultUsername: ""
|
defaultUsername: ""
|
||||||
defaultPassword: ""
|
defaultPassword: ""
|
||||||
releaseNotes: ""
|
|
Loading…
Reference in New Issue
Block a user