This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Conversation
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
mvines
reviewed
Nov 11, 2020
Comment on lines
-74
to
-82
bootstrap_validator_validator_info="$(ssh "${sshOptions[@]}" "${validatorIpList[0]}" '$HOME/.cargo/bin/solana --url http://127.0.0.1:8899 validators | grep "$($HOME/.cargo/bin/solana-keygen pubkey ~/solana/config/bootstrap-validator/identity.json)"')" | ||
bootstrap_validator_stake_percentage="$(echo "$bootstrap_validator_validator_info" | awk '{gsub(/[\(,\),\%]/,""); print $9}')" | ||
|
||
if [[ $(echo "$bootstrap_validator_stake_percentage < $max_stake" | bc) -ne 0 ]]; then | ||
echo "Bootstrap validator stake has fallen below $max_stake to $bootstrap_validator_stake_percentage" | ||
break | ||
fi | ||
echo "Max bootstrap validator stake: $max_stake. Current stake: $bootstrap_validator_stake_percentage. Sleeping 30s for stake to distribute." | ||
sleep 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👢 glad to see this go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same 🎉
Though I thought I replaced that awk/gsub with something more resilient a few weeks ago 🤔
sakridge
force-pushed
the
wait-for-stake
branch
2 times, most recently
from
November 11, 2020 20:18
b2274b7
to
93d6724
Compare
t-nelson
reviewed
Nov 11, 2020
Comment on lines
-74
to
-82
bootstrap_validator_validator_info="$(ssh "${sshOptions[@]}" "${validatorIpList[0]}" '$HOME/.cargo/bin/solana --url http://127.0.0.1:8899 validators | grep "$($HOME/.cargo/bin/solana-keygen pubkey ~/solana/config/bootstrap-validator/identity.json)"')" | ||
bootstrap_validator_stake_percentage="$(echo "$bootstrap_validator_validator_info" | awk '{gsub(/[\(,\),\%]/,""); print $9}')" | ||
|
||
if [[ $(echo "$bootstrap_validator_stake_percentage < $max_stake" | bc) -ne 0 ]]; then | ||
echo "Bootstrap validator stake has fallen below $max_stake to $bootstrap_validator_stake_percentage" | ||
break | ||
fi | ||
echo "Max bootstrap validator stake: $max_stake. Current stake: $bootstrap_validator_stake_percentage. Sleeping 30s for stake to distribute." | ||
sleep 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same 🎉
Though I thought I replaced that awk/gsub with something more resilient a few weeks ago 🤔
sakridge
force-pushed
the
wait-for-stake
branch
6 times, most recently
from
November 11, 2020 21:56
c3e25f9
to
ffa0669
Compare
sakridge
force-pushed
the
wait-for-stake
branch
from
November 11, 2020 22:58
ffa0669
to
7e5a3f3
Compare
Codecov Report
@@ Coverage Diff @@
## master #13532 +/- ##
=========================================
- Coverage 82.1% 82.1% -0.1%
=========================================
Files 378 378
Lines 90604 90641 +37
=========================================
+ Hits 74424 74426 +2
- Misses 16180 16215 +35 |
t-nelson
added a commit
to t-nelson/solana
that referenced
this pull request
Nov 30, 2020
This reverts commit 598e5f5.
mergify bot
pushed a commit
that referenced
this pull request
Dec 15, 2020
(cherry picked from commit 598e5f5)
t-nelson
pushed a commit
that referenced
this pull request
Dec 16, 2020
(cherry picked from commit 598e5f5)
mergify bot
added a commit
that referenced
this pull request
Dec 16, 2020
(cherry picked from commit 598e5f5) Co-authored-by: sakridge <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Bash logic of wait for stake to come down below 66% is broken and causing all the automation tests to fail.
Summary of Changes
Implement wait-for-max-stake as a CLI function and use that for the automation script.
Fixes #