Skip to content

Commit 37720d2

Browse files
authored
Merge pull request #21 from cloudstruct/feat/support-rts-opts
feat: support setting RTS using CARDANO_RTS_OPTS
2 parents d10e1b6 + 3bade3a commit 37720d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/run-node

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ CARDANO_CONFIG=${CARDANO_CONFIG:-${CARDANO_CONFIG_BASE}/mainnet-config.json}
3838
CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH:-/opt/cardano/data}
3939
CARDANO_LOG_DIR=${CARDANO_LOG_DIR:-/opt/cardano/logs}
4040
CARDANO_PORT=${CARDANO_PORT:-3001}
41+
CARDANO_RTS_OPTS=${CARDANO_RTS_OPTS:--N2 -A64m -I0 -qg -qb --disable-delayed-os-memory-return}
4142
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH:-/opt/cardano/ipc/socket}
4243
CARDANO_TOPOLOGY=${CARDANO_TOPOLOGY:-${CARDANO_CONFIG_BASE}/mainnet-topology.json}
4344

@@ -47,6 +48,7 @@ echo CARDANO_CONFIG=${CARDANO_CONFIG}
4748
echo CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH}
4849
echo CARDANO_LOG_DIR=${CARDANO_LOG_DIR}
4950
echo CARDANO_PORT=${CARDANO_PORT}
51+
echo CARDANO_RTS_OPTS=${CARDANO_RTS_OPTS}
5052
echo CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH}
5153
echo CARDANO_TOPOLOGY=${CARDANO_TOPOLOGY}
5254

@@ -72,6 +74,7 @@ CARDANO_DATABASE_PATH=${CARDANO_DATABASE_PATH}
7274
CARDANO_LOG_DIR=${CARDANO_LOG_DIR}
7375
CARDANO_PORT=${CARDANO_PORT}
7476
CARDANO_PUBLIC_IP=${CARDANO_PUBLIC_IP}
77+
CARDANO_RTS_OPTS=${CARDANO_RTS_OPTS}
7578
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH}
7679
CARDANO_TOPOLOGY=${CARDANO_TOPOLOGY}
7780
@@ -105,5 +108,8 @@ else
105108
--topology ${CARDANO_TOPOLOGY})
106109
fi
107110
effopts+=(${options[@]})
111+
# RTS support
112+
read -ra rtsopts <<< ${CARDANO_RTS_OPTS}
113+
effopts+=("+RTS" ${rtsopts[@]} "-RTS")
108114
echo cardano-node run ${effopts[@]}
109115
exec /usr/local/bin/cardano-node run ${effopts[@]}

0 commit comments

Comments
 (0)