scripts: bootstrap add [-e <SLOTS-PER-EPOCH>]
@@ -27,6 +27,7 @@ FEE_CONSTANT=10
FEE_CERTIFICATE=0
FEE_COEFFICIENT=0
SLOT_DURATION=10
+SLOTS_PER_EPOCH=5000
FAUCET_AMOUNT=1000000000000
FIXED_AMOUNT=1000000000000
@@ -37,7 +38,7 @@ SECRET_PATH="."
CONFIG_PATH="."
ADD_STARTUP_SCRIPT=0
-while getopts 'bc:ghk:p:s:xCod:' c
+while getopts 'bc:ghk:p:s:xCod:e:' c
do
case $c in
b) CONSENSUS="bft" ;;
@@ -47,14 +48,15 @@ do
c) CONFIG_PATH="${OPTARG}" ;;
x) ADD_STARTUP_SCRIPT=1 ;;
s) SLOT_DURATION="${OPTARG}" ;;
+ e) SLOTS_PER_EPOCH="${OPTARG}" ;;
C) COLORS=0 ;;
o) CLEAN=1 ;;
d) DPATH="${OPTARG}" ;;
h)
echo "usage: $0"
- echo " [-p <REST_PORT>] [-b] [g]"
+ echo " [-p <REST_PORT>] [-b|-g]"
echo " [-k <SECRET-PATH>] [-c <CONFIG-PATH>]"
- echo " [-s <SLOT-DURATION>]"
+ echo " [-s <SLOT-DURATION>] [-e <SLOTS-PER-EPOCH>]"
echo ""
echo " -p <REST_PORT> REST PORT for the service to listen on"
echo " -b Use BFT consensus mode"
@@ -64,6 +66,7 @@ do
echo " -c <CONFIG-PATH> The path to write config files"
echo " -d <DATA-PATH> The path to write sqlite files"
echo " -s <SLOT-DURATION> Duration of a slot in seconds"
+ echo " -e <SLOTS-PER-EPOCH> Number of slots in each epoch"
echo " -C Disable ansi shell colours in stdout"
echo " -o Overwrite existing sqlite files"
exit 0
@@ -124,6 +127,7 @@ echo ""
echo "* Consensus : ${RED}${CONSENSUS}${WHITE}"
echo "* REST Port : ${RED}${REST_PORT}${WHITE}"
echo "* Slot duration : ${RED}${SLOT_DURATION}${WHITE}"
+echo "* Slots per epoch: ${RED}${SLOTS_PER_EPOCH}${WHITE}"
echo ""
echo "########################################################"
echo ""
@@ -198,7 +202,7 @@ cat << EOF > ${CONFIG_PATH}/genesis.yaml
blockchain_configuration:
block0_date: $(date +%s)
discrimination: test
- slots_per_epoch: 5000
+ slots_per_epoch: ${SLOTS_PER_EPOCH}
slot_duration: ${SLOT_DURATION}
epoch_stability_depth: 10
consensus_genesis_praos_active_slot_coeff: 0.1
