-
Notifications
You must be signed in to change notification settings - Fork 23
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
utils: use container based cli #229
Conversation
Codecov Report
@@ Coverage Diff @@
## main #229 +/- ##
===========================================
- Coverage 78.88% 38.76% -40.13%
===========================================
Files 5 45 +40
Lines 270 5167 +4897
Branches 47 47
===========================================
+ Hits 213 2003 +1790
- Misses 56 3163 +3107
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. see 40 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Looks good
Hold on a moment, I need to update this PR for the merge conflict and one additional fix. |
I just fixed the merge conflicts. Sorry, It is your task, I guess. And @CAGS295 needs to review again :-) |
devenv/utils/mine_btc.sh
Outdated
@@ -12,4 +12,4 @@ fi | |||
|
|||
btc_address=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].bitcoin.p2wpkh.address') | |||
|
|||
bitcoin-cli -rpcconnect=localhost -rpcport=18443 -rpcuser=devnet -rpcpassword=devnet generatetoaddress $num_blocks $btc_address | |||
bitcoin-cli -rpcconnect=localhost -rpcport=18443 -rpcuser=devnet -rpcpassword=devnet generatetoaddress $num_blocks $btc_address |
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.
Did we lose the options changes?
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.
yeah let me sort this out.
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.
My fault 😓
Signed-off-by: Tyler Baker <[email protected]>
818c8e6
to
b8a3c9a
Compare
Ok this is working for me, deploy_contracts, mine, deposit and withdrawal.
|
@EmbeddedAndroid, how do you check that stacks-node is ready to deploy contracts? The heuristic I've used so far is checking for stacks height # 2. |
that is what I'm doing, polling the api until I see stack height of 2+ |
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.
LGTM
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.
Looks good
Summary of Changes
The util scripts currently are using host binaries for running commands against devnet. This can be confusing to users as we also provide wrappers for accessing the same binaries running inside the container devenv.
Some examples are:
https://github.com/stacks-network/sbtc/blob/main/devenv/bitcoin/bin/bitcoin-cli
https://github.com/stacks-network/sbtc/blob/main/devenv/sbtc/bin/sbtc
Implements: stacks-network/sbtc#224
This PR switches the utils scripts to use the wrappers for container binaries. For the binaries running inside devenv, it must use the service hostnames otherwise localhost will cause them to fail.
Testing
Risks
The biggest risk I see is, if the sbtc container (romeo) crashes, the sbtc command: https://github.com/stacks-network/sbtc/blob/main/devenv/sbtc/bin/sbtc will not be able to run, as the container stopped.
How were these changes tested?
Tested locally with devenv
What future testing should occur?
We need to automate the entire flow via stacks-network/sbtc#215
Checklist: