-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Support for hostname for relay - Fixed automatic leaderlogs submit - Fixed slow registration of pool certificates
- Loading branch information
Daniel
committed
May 30, 2022
1 parent
cf68a27
commit 427e01d
Showing
9 changed files
with
59 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
source /scripts/init_node_vars | ||
|
||
# Init vars | ||
POOL_ID=$(cat ${NODE_PATH}/staking/POOL_ID) | ||
BYRON_GENESIS=${NODE_PATH}/byron-genesis.json | ||
SHELLEY_GENESIS=${NODE_PATH}/shelley-genesis.json | ||
VRF=${NODE_PATH}/staking/pool-keys/vrf.skey | ||
SNAPSHOT=/tmp/stake-snapshot.json | ||
LSET="${1:-current}" | ||
|
||
case ${LSET} in | ||
prev|current|next) echo "Running leaderlogs for ${LSET} epoch" ;; | ||
*) echo "Invalid argument. Must be either prev|current|next"; exit ;; | ||
esac | ||
|
||
echo "Generating snapshot" | ||
cardano-cli query stake-snapshot --stake-pool-id ${POOL_ID} ${NETWORK_ARGUMENT} > ${SNAPSHOT} | ||
ACTIVE_STAKE=$(cat $SNAPSHOT | jq .activeStakeSet) | ||
POOL_STAKE=$(cat $SNAPSHOT | jq .poolStakeSet) | ||
|
||
# Get leaderlogs | ||
echo "Running leaderlogs" | ||
cncli leaderlog --db ${NODE_PATH}/cncli.db \ | ||
--pool-id ${POOL_ID} \ | ||
--pool-vrf-skey ${VRF} \ | ||
--byron-genesis ${BYRON_GENESIS} \ | ||
--shelley-genesis ${SHELLEY_GENESIS} \ | ||
--active-stake ${ACTIVE_STAKE} \ | ||
--pool-stake ${POOL_STAKE} \ | ||
--ledger-set ${LSET} | tee ${NODE_PATH}/leaderlog_cncli.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/bin/bash | ||
|
||
source /scripts/init_node_vars | ||
|
||
POOL_ID=$(cat ${NODE_PATH}/staking/POOL_ID) | ||
VRF=${NODE_PATH}/staking/pool-keys/vrf.skey | ||
BYRON_GENESIS=${NODE_PATH}/byron-genesis.json | ||
SHELLEY_GENESIS=${NODE_PATH}/shelley-genesis.json | ||
SNAPSHOT=/tmp/stake-snapshot.json | ||
|
||
every_five_days \ | ||
&& cardano-cli query ledger-state --mary-era ${NETWORK_ARGUMENT} > /tmp/ledger-state-mainnet.json \ | ||
&& cncli leaderlog --pool-id ${POOL_ID} --pool-vrf-skey ${VRF} --byron-genesis ${BYRON_GENESIS} --shelley-genesis ${SHELLEY_GENESIS} --ledger-state /tmp/ledger-state-mainnet.json --ledger-set next | tee ${NODE_PATH}/leaderlog.json \ | ||
&& cncli sendslots --byron-genesis ${BYRON_GENESIS} --shelley-genesis ${SHELLEY_GENESIS} --config ${NODE_PATH}/pooltool.json | ||
cncli sendslots --db ${NODE_PATH}/cncli.db --byron-genesis ${BYRON_GENESIS} --shelley-genesis ${SHELLEY_GENESIS} --config ${NODE_PATH}/pooltool.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters