-
Notifications
You must be signed in to change notification settings - Fork 9
/
_defaults.sh
executable file
·166 lines (140 loc) · 10.1 KB
/
_defaults.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/usr/bin/env bash
# simverse workspace can be located outside this repo checkout
export SIMVERSE_WORKSPACE=${SIMVERSE_WORKSPACE:-_workspace}
# simverse repos can be located outside this repo checkout
export SIMVERSE_REPOS=${SIMVERSE_REPOS:-_repos}
export SIMVERSE_SHELL=${SIMVERSE_SHELL:-$SHELL}
export SIMVERSE_VERBOSE=${SIMVERSE_VERBOSE}
export SIMVERSE_VERBOSE_ALIASES=${SIMVERSE_VERBOSE_ALIASES}
export SIMVERSE_DONT_BEAUTIFY_ALIASES=${SIMVERSE_DONT_BEAUTIFY_ALIASES}
export SIMVERSE_DONT_CHECK_PREREQS=${SIMVERSE_DONT_CHECK_PREREQS}
#############################################################################################################################
# simnet create-time defaults, effective during ./sv create (or other ./sv commands)
export SIMVERSE_DOCKER_IMAGE_PREFIX=${SIMVERSE_DOCKER_IMAGE_PREFIX:-sv_}
export SIMVERSE_DOCKER_NETWORK_PREFIX=${SIMVERSE_DOCKER_NETWORK_PREFIX:-$SIMVERSE_DOCKER_IMAGE_PREFIX}
export SIMVERSE_DOCKER_CONTAINER_PREFIX=${SIMVERSE_DOCKER_CONTAINER_PREFIX}
export SIMVERSE_HOST_UID=${SIMVERSE_HOST_UID:-$(id -u)}
export SIMVERSE_HOST_GID=${SIMVERSE_HOST_GID:-$(id -g)}
export DEFAULT_SIMNET_NAME=${DEFAULT_SIMNET_NAME:-default}
export DEFAULT_RECIPE_NAME=${DEFAULT_RECIPE_NAME:-default}
export DEFAULT_STATE_NAME=${DEFAULT_STATE_NAME:-master}
export SIMVERSE_BTCD_REPO_URL=${SIMVERSE_BTCD_REPO_URL:-https://github.com/btcsuite/btcd.git}
export SIMVERSE_BTCWALLET_REPO_URL=${SIMVERSE_BTCWALLET_REPO_URL:-https://github.com/btcsuite/btcwallet.git}
export SIMVERSE_LND_REPO_URL=${SIMVERSE_LND_REPO_URL:-https://github.com/lightningnetwork/lnd.git}
export SIMVERSE_BITCOIND_REPO_URL=${SIMVERSE_BITCOIND_REPO_URL:-https://github.com/bitcoin/bitcoin.git}
export SIMVERSE_LIGHTNING_REPO_URL=${SIMVERSE_LIGHTNING_REPO_URL:-https://github.com/ElementsProject/lightning.git}
export SIMVERSE_ECLAIR_REPO_URL=${SIMVERSE_ECLAIR_REPO_URL:-https://github.com/ACINQ/eclair.git}
export SIMVERSE_GIT_CLONE_OPTS=${SIMVERSE_GIT_CLONE_OPTS:-"--depth=1 --recursive"}
export SIMVERSE_GIT_REFERENCE_PREFIX=${SIMVERSE_GIT_REFERENCE_PREFIX} # used in tests
export SIMVERSE_GIT_FETCH_OPTS=${SIMVERSE_GIT_FETCH_OPTS:-"--ff-only"}
export SIMVERSE_GIT_PULL_OPTS=${SIMVERSE_GIT_PULL_OPTS:-"--ff-only"}
export FIRST_DLV_PORT_ON_HOST=${FIRST_DLV_PORT_ON_HOST:-41000}
export FIRST_DLV_PORT=${FIRST_DLV_PORT:-41000}
export SERVICE_READY_PORT=${SERVICE_READY_PORT:-31337}
export SERVICE_READY_PORT_ON_HOST=${SERVICE_READY_PORT_ON_HOST:-$SERVICE_READY_PORT}
export CONTAINER_SERVICE_PORT=${CONTAINER_SERVICE_PORT:-32337}
export FIRST_LND_SERVER_PORT_ON_HOST=${FIRST_LND_SERVER_PORT_ON_HOST:-10000}
export FIRST_LND_RPC_PORT_ON_HOST=${FIRST_LND_RPC_PORT_ON_HOST:-10300}
export FIRST_LND_REST_PORT_ON_HOST=${FIRST_LND_REST_PORT_ON_HOST:-10600}
export FIRST_BTCWALLET_RPC_PORT_ON_HOST=${FIRST_BTCWALLET_RPC_PORT_ON_HOST:-12000}
export FIRST_BTCD_SERVER_PORT_ON_HOST=${FIRST_BTCD_SERVER_PORT_ON_HOST:-12300}
export FIRST_BTCD_RPC_PORT_ON_HOST=${FIRST_BTCD_RPC_PORT_ON_HOST:-12600}
export FIRST_BITCOIND_SERVER_PORT_ON_HOST=${FIRST_BITCOIND_SERVER_PORT_ON_HOST:-13000}
export FIRST_BITCOIND_RPC_PORT_ON_HOST=${FIRST_BITCOIND_RPC_PORT_ON_HOST:-13300}
export FIRST_LIGHTNING_SERVER_PORT_ON_HOST=${FIRST_LIGHTNING_SERVER_PORT_ON_HOST:-14000}
export FIRST_LIGHTNING_RPC_PORT_ON_HOST=${FIRST_LIGHTNING_RPC_PORT_ON_HOST:-14300}
export FIRST_LIGHTNING_REST_PORT_ON_HOST=${FIRST_LIGHTNING_REST_PORT_ON_HOST:-14600}
export FIRST_ECLAIR_SERVER_PORT_ON_HOST=${FIRST_ECLAIR_SERVER_PORT_ON_HOST:-15000}
export FIRST_ECLAIR_RPC_PORT_ON_HOST=${FIRST_ECLAIR_RPC_PORT_ON_HOST:-15300}
export LND_AUTO_NAME_PREFIX=${LND_AUTO_NAME_PREFIX:-lnd}
export BTCD_AUTO_NAME_PREFIX=${BTCD_AUTO_NAME_PREFIX:-btcd}
export BITCOIND_AUTO_NAME_PREFIX=${BITCOIND_AUTO_NAME_PREFIX:-bitcoind}
export LIGHTNING_AUTO_NAME_PREFIX=${LIGHTNING_AUTO_NAME_PREFIX:-lightning}
export ECLAIR_AUTO_NAME_PREFIX=${ECLAIR_AUTO_NAME_PREFIX:-eclair}
# ---------------------------------------------------------------------------------------------------------------------------
# you can tweak these on per-node basis in your recipes
# here we define base docker images for individual containers, they should be based on alpine
export DEFAULT_DOCKER_IMAGE=${DEFAULT_DOCKER_IMAGE:-alpine:3.10}
export DEFAULT_DOCKER_BUILDTIME_GO_IMAGE=${DEFAULT_DOCKER_BUILDTIME_GO_IMAGE:-golang:1.13-alpine3.10}
export DEFAULT_DOCKER_BUILDTIME_JAVA_IMAGE=${DEFAULT_DOCKER_BUILDTIME_JAVA_IMAGE:-adoptopenjdk/openjdk11:jdk-11.0.3_7-alpine} # see https://github.com/ACINQ/eclair/blob/master/Dockerfile#L1
export DEFAULT_DOCKER_BUILDTIME_IMAGE=${DEFAULT_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_IMAGE}
export DEFAULT_DOCKER_RUNTIME_IMAGE=${DEFAULT_DOCKER_RUNTIME_IMAGE:-$DEFAULT_DOCKER_IMAGE}
export BITCOIND_DOCKER_BUILDTIME_IMAGE=${BITCOIND_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_BUILDTIME_IMAGE}
export BITCOIND_DOCKER_RUNTIME_IMAGE=${BITCOIND_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_RUNTIME_IMAGE}
export BTCD_DOCKER_BUILDTIME_IMAGE=${BTCD_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_BUILDTIME_GO_IMAGE}
export BTCD_DOCKER_RUNTIME_IMAGE=${BTCD_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_RUNTIME_IMAGE}
export ECLAIR_DOCKER_BUILDTIME_IMAGE=${ECLAIR_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_BUILDTIME_JAVA_IMAGE}
export ECLAIR_DOCKER_RUNTIME_IMAGE=${ECLAIR_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_RUNTIME_IMAGE}
export LIGHTNING_DOCKER_BUILDTIME_IMAGE=${LIGHTNING_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_BUILDTIME_IMAGE}
export LIGHTNING_DOCKER_RUNTIME_IMAGE=${LIGHTNING_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_RUNTIME_IMAGE}
export LND_DOCKER_BUILDTIME_IMAGE=${LND_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_BUILDTIME_GO_IMAGE}
export LND_DOCKER_RUNTIME_IMAGE=${LND_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_RUNTIME_IMAGE}
export PRE_DOCKER_BUILDTIME_IMAGE=${PRE_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_BUILDTIME_IMAGE}
export PRE_DOCKER_RUNTIME_IMAGE=${PRE_DOCKER_BUILDTIME_IMAGE:-$DEFAULT_DOCKER_RUNTIME_IMAGE}
# note: these are relative to docker build context
export DEFAULT_BTCD_REPO_PATH=${DEFAULT_BTCD_REPO_PATH:-repos/btcd}
export DEFAULT_BTCWALLET_REPO_PATH=${DEFAULT_BTCWALLET_REPO_PATH:-repos/btcwallet}
export DEFAULT_LND_REPO_PATH=${DEFAULT_LND_REPO_PATH:-repos/lnd}
export DEFAULT_LIGHTNING_REPO_PATH=${DEFAULT_LIGHTNING_REPO_PATH:-repos/lightning}
export DEFAULT_BITCOIND_REPO_PATH=${DEFAULT_BITCOIND_REPO_PATH:-repos/bitcoin}
export DEFAULT_BTCD_CONF_PATH=${DEFAULT_BTCD_CONF_PATH:-docker/btcd/btcd.conf}
export DEFAULT_BTCWALLET_CONF_PATH=${DEFAULT_BTCWALLET_CONF_PATH:-docker/btcd/btcwallet.conf}
export DEFAULT_LND_CONF_PATH=${DEFAULT_LND_CONF_PATH:-docker/lnd/lnd.conf}
export DEFAULT_LIGHTNING_CONF_PATH=${DEFAULT_LIGHTNING_CONF_PATH:-docker/lightning/config}
export DEFAULT_BITCOIND_CONF_PATH=${DEFAULT_BITCOIND_CONF_PATH:-docker/bitcoind/bitcoin.conf}
export DEFAULT_ECLAIR_REPO_PATH=${DEFAULT_ECLAIR_REPO_PATH:-repos/eclair}
export DEFAULT_ECLAIR_CONF_PATH=${DEFAULT_ECLAIR_CONF_PATH:-docker/eclair/eclair.conf}
export SIMVERSE_HOST_BIND=${SIMVERSE_HOST_BIND:-127.0.0.1:} # note the trailing colon, see https://docs.docker.com/compose/compose-file/#ports
export SIMVERSE_EXTRA_SERVICE_CONFIG=${SIMVERSE_EXTRA_SERVICE_CONFIG}
export SIMVERSE_REPORT_ENV=${SIMVERSE_REPORT_ENV}
export DEBUG=${DEBUG:-info}
export FAUCET_ADDR=${FAUCET_ADDR:-mp76nrashrCCYLy3a8cAc5HufEas11yHbh} # note this is a regtest address
export FAUCET_ADDR_PRIVATE_KEY=${FAUCET_ADDR_PRIVATE_KEY:-cP2SDKHK9PwQyBwRcnCTar4R5iv8HMPNZs6aCNRJ5o736cWcYGsZ} # note this is a regtest key
export RPC_USER=${RPC_USER:-devuser}
export RPC_PASS=${RPC_PASS:-devpass}
export BTCWALLET_USER=${BTCWALLET_USER} # optional, RPC_USER will be used if not given
export BTCWALLET_PASS=${BTCWALLET_PASS} # optional, RPC_PASS will be used if not given
export BITCOIN_P2P_BIND=${BITCOIN_P2P_BIND:-0.0.0.0}
export BITCOIN_P2P_PORT=${BITCOIN_P2P_PORT:-18444} # note: touching this is not flexible, some ports are hardcoded or left default
export BITCOIN_RPC_BIND=${BITCOIN_RPC_BIND:-0.0.0.0}
export BITCOIN_RPC_PORT=${BITCOIN_RPC_PORT:-18334} # note: touching this is not flexible, some ports are hardcoded or left default
export BTCWALLET_RPC_BIND=${BTCWALLET_RPC_BIND:-0.0.0.0}
export BTCWALLET_RPC_PORT=${BTCWALLET_RPC_PORT:-18443} # note: touching this is not flexible, some ports are hardcoded or left default
export LND_CHAIN=${LND_CHAIN:-bitcoin}
export LND_BACKEND=${LND_BACKEND}
export LND_P2P_BIND=${LND_P2P_BIND:-0.0.0.0}
export LND_P2P_PORT=${LND_P2P_PORT:-9735}
export LND_RPC_BIND=${LND_RPC_BIND:-0.0.0.0}
export LND_RPC_PORT=${LND_RPC_PORT:-10009}
export LND_REST_BIND=${LND_REST_BIND:-0.0.0.0}
export LND_REST_PORT=${LND_REST_PORT:-8080}
export LND_BITCOIN_RPC_HOST=${LND_BITCOIN_RPC_HOST}
export ZMQ_BIND=${ZMQ_BIND:-0.0.0.0}
export ZMQ_PUBRAWBLOCK_PORT=${ZMQ_PUBRAWBLOCK_PORT:-28332}
export ZMQ_PUBRAWTX_PORT=${ZMQ_PUBRAWTX_PORT:-28333}
export LIGHTNING_BACKEND=${LIGHTNING_BACKEND}
export LIGHTNING_BITCOIN_RPC_HOST=${LIGHTNING_BITCOIN_RPC_HOST}
export LIGHTNING_P2P_BIND=${LIGHTNING_P2P_BIND:-0.0.0.0}
export LIGHTNING_P2P_PORT=${LIGHTNING_P2P_PORT:-9735}
export LIGHTNING_RPC_BIND=${LIGHTNING_RPC_BIND:-0.0.0.0}
export LIGHTNING_RPC_PORT=${LIGHTNING_RPC_PORT:-9835}
export LIGHTNING_EXPOSE_TCP=${LIGHTNING_EXPOSE_TCP:-true}
export LIGHTNING_VALGRIND_FLAG=${LIGHTNING_VALGRIND_FLAG:-0}
export LIGHTNING_DEVELOPER_FLAG=${LIGHTNING_DEVELOPER_FLAG:-1}
export LIGHTNING_CONFIGURE_OPTS=${LIGHTNING_CONFIGURE_OPTS:-"--enable-developer"}
export ECLAIR_BACKEND=${ECLAIR_BACKEND}
export ECLAIR_BITCOIN_RPC_HOST=${ECLAIR_BITCOIN_RPC_HOST}
export ECLAIR_P2P_BIND=${ECLAIR_P2P_BIND:-0.0.0.0}
export ECLAIR_P2P_PORT=${ECLAIR_P2P_PORT:-9735}
export ECLAIR_RPC_BIND=${ECLAIR_RPC_BIND:-0.0.0.0}
export ECLAIR_RPC_PORT=${ECLAIR_RPC_PORT:-8080}
export BTCD_EXTRA_PARAMS=${BTCD_EXTRA_PARAMS}
export BTCWALLET_EXTRA_PARAMS=${BTCWALLET_EXTRA_PARAMS}
export BTCCTL_EXTRA_PARAMS=${BTCCTL_EXTRA_PARAMS}
export LND_EXTRA_PARAMS=${LND_EXTRA_PARAMS}
export LIGHTNINGD_EXTRA_PARAMS=${LIGHTNINGD_EXTRA_PARAMS}
export LIGHTNING_CLI_EXTRA_PARAMS=${LIGHTNING_CLI_EXTRA_PARAMS}
export BITCOINCLI_EXTRA_PARAMS=${BITCOINCLI_EXTRA_PARAMS}
export BITCOIND_EXTRA_PARAMS=${BITCOIND_EXTRA_PARAMS}
# GO specific
export GCFLAGS=${GCFLAGS:-"all=-N -l"} # compile with no optimizations, for go-delve debugger