Skip to content

Commit

Permalink
Chore/catch up to base (#1)
Browse files Browse the repository at this point in the history
* chore: remove autostart handling

* chore: remove max fee settings

Jam will randomize these values on every start

* chore: remove supervisord adaptions

supervisord has been replaced by dinit

* chore: let jam create datadir

Co-authored-by: theborakompanioni <[email protected]>
  • Loading branch information
islandbitcoin and theborakompanioni authored Oct 21, 2022
1 parent 51d1200 commit 51b273b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 58 deletions.
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ USER root
ENV DATADIR /root/.joinmarket
ENV CONFIG ${DATADIR}/joinmarket.cfg
ENV DEFAULT_CONFIG /default.cfg
ENV DEFAULT_AUTO_START /autostart
ENV AUTO_START ${DATADIR}/autostart
ENV JM_RPC_HOST="bitcoind.embassy"
ENV JM_RPC_PORT="8332"
ENV JM_RPC_USER="bitcoin"
Expand All @@ -20,15 +18,11 @@ ENV ENSURE_WALLET true
ENV JM_NETWORK mainnet
ENV REMOVE_LOCK_FILES true
ENV RESTORE_DEFAULT_CONFIG true
ENV jm_max_cj_fee_abs 300000
ENV jm_max_cj_fee_rel 0.0003

ADD jam-docker/standalone/supervisor-conf/ /supervisor-conf/
ADD jam-docker/standalone/nginx/ /nginx/
ADD jam-docker/standalone/autostart /
ADD jam-docker/standalone/default.cfg /
ADD jam-docker/standalone/torrc /
RUN chmod a+x /autostart

RUN chmod a+x /default.cfg
RUN chmod a+x /torrc

Expand Down
4 changes: 0 additions & 4 deletions autostart

This file was deleted.

21 changes: 1 addition & 20 deletions docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ _term() {
}

# Setting env-vars
mkdir -p /root/.joinmarket
echo "Setting environment variables..."
export APP_USER=$(yq e '.username' /root/start9/config.yaml)
export APP_PASSWORD=$(yq e '.password' /root/start9/config.yaml)
Expand All @@ -24,8 +23,7 @@ export JM_HOST="jam.embassy"
export JM_WALLET_RPC_USER=$(yq e '.wallet-rpc-user' /root/start9/config.yaml)
export JM_WALLET_RPC_PASSWORD=$(yq e '.wallet-rpc-password' /root/start9/config.yaml)
export JM_WALLET_RPC_HOST="bitcoind.embassy"
export MAX_CJ_FEE_ABS=$(yq e '.advanced.fee-abs' /root/start9/config.yaml)
export MAX_CJ_FEE_REL=$(yq e '.advanced.fee-rel' /root/start9/config.yaml)

if [ "$RPC_TYPE" = "internal-proxy" ]; then
export JM_RPC_HOST="btc-rpc-proxy.embassy"
echo "Running on Bitcoin Proxy..."
Expand All @@ -47,9 +45,6 @@ sed -i "s/rpc_user =.*/rpc_user = $JM_RPC_USER/" /default.cfg
sed -i "s/rpc_port =.*/rpc_port = $JM_RPC_PORT/" /default.cfg
sed -i "s/rpc_password =.*/rpc_password = $JM_RPC_PASSWORD/" /default.cfg
sed -i "s/rpc_wallet_file =.*/rpc_wallet_file = $JM_WALLET/" /default.cfg
sed -i "s/max_cj_fee_abs =.*/max_cj_fee_abs = $MAX_CJ_FEE_ABS/" /default.cfg
sed -i "s/max_cj_fee_rel =.*/max_cj_fee_rel = $MAX_CJ_FEE_REL/" /default.cfg
sed -i "s/exec supervisord.*/exec supervisord -c \/etc\/supervisor\/supervisord\.conf/" /jam-entrypoint.sh
sed -i "s/jm_webui_default/$JM_WALLET/" /jam-entrypoint.sh

# Properties Page showing password to be used for login
Expand All @@ -69,20 +64,6 @@ sed -i "s/jm_webui_default/$JM_WALLET/" /jam-entrypoint.sh
echo ' copyable: true' >> /root/start9/stats.yaml
echo ' masked: true' >> /root/start9/stats.yaml
echo ' qr: false' >> /root/start9/stats.yaml
echo ' Maximum Absolute CoinJoin Fee in Satoshis: ' >> /root/start9/stats.yaml
echo ' type: string' >> /root/start9/stats.yaml
echo " value: \"$MAX_CJ_FEE_ABS\"" >> /root/start9/stats.yaml
echo ' description: Maximum absolute coinjoin fee in satoshi to pay to a single market maker for a transaction' >> /root/start9/stats.yaml
echo ' copyable: false' >> /root/start9/stats.yaml
echo ' masked: false' >> /root/start9/stats.yaml
echo ' qr: false' >> /root/start9/stats.yaml
echo ' Maximum Relative CoinJoin Fee Rate: ' >> /root/start9/stats.yaml
echo ' type: string' >> /root/start9/stats.yaml
echo " value: \"$MAX_CJ_FEE_REL\"" >> /root/start9/stats.yaml
echo ' description: Maximum relative coinjoin fee, in fractions of the coinjoin value' >> /root/start9/stats.yaml
echo ' copyable: false' >> /root/start9/stats.yaml
echo ' masked: false' >> /root/start9/stats.yaml
echo ' qr: false' >> /root/start9/stats.yaml

# Starting JoinMarket API
echo "Starting JoinMarket..."
Expand Down
27 changes: 0 additions & 27 deletions scripts/services/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,32 +120,5 @@ export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
},
}
}
},
"advanced": {
"type": "object",
"name": "Advanced",
"description": "Advanced settings for JAM",
"spec": {
"fee-abs": {
"type": "number",
"name": "Absolute Fee Limit",
"description": "Maximum amount in satoshis you will pay for a collaborative transaction.\n",
"nullable": false,
"range": "[0,100000000]",
"integral": true,
"units": "satoshis",
"default": 3000000
},
"fee-rel": {
"type": "number",
"name": "Relative Fee Limit",
"description": "Maximum percentage of the total you will pay for a collaborative transaction\"\n",
"nullable": false,
"range": "[0,1]",
"integral": false,
"units": "percent (0 - 1)",
"default": 0.0003
}
}
}
});

0 comments on commit 51b273b

Please sign in to comment.