Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delegation information in Devnet #408

Merged
merged 1 commit into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion mithril-test-lab/mithril-devnet/devnet-mkfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,11 @@ echo

cat >> delegate.sh <<EOF
#!/bin/bash


CURRENT_EPOCH=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock ./cardano-cli query tip \\
--cardano-mode \\
--testnet-magic ${NETWORK_MAGIC} | jq .epoch)
echo ">>>> Current Epoch: \${CURRENT_EPOCH}"
EOF

# Prepare transactions for activating stake pools
Expand All @@ -616,6 +620,7 @@ for N in ${POOL_NODES_N}; do
# We'll register certs to:
# 1. delegate from the user1 stake address to the stake pool
cat >> delegate.sh <<EOF

AMOUNT_STAKED=\$(( $N*1000000 + DELEGATION_ROUND*1 ))

CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock ./cardano-cli transaction build \\
Expand Down
2 changes: 1 addition & 1 deletion mithril-test-lab/mithril-devnet/devnet-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ DELEGATION_ROUND=0
echo ">> Begin scheduled delegation"
while true
do
echo ">> Wait ${DELEGATE_PERIOD}s until next delegation round..."
echo ">> $(date +"%T"): Wait ${DELEGATE_PERIOD}s until next delegation round..."
sleep ${DELEGATE_PERIOD}
DELEGATION_ROUND=$(( $DELEGATION_ROUND + 1 ))
echo ">> Run delegation round #${DELEGATION_ROUND}!"
Expand Down