-
Notifications
You must be signed in to change notification settings - Fork 716
Stacks 1.0 -> 2.0 automated balance & lockup validation #2210
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
Conversation
CharlieC3
left a comment
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.
Docker needs around 60GB of disk space allocated. It can take a long time to finish, upwards of an hour -- every step is resource intensive: compiling, exporting, importing, and validating.
would it be useful to have a custom gh action trigger to run this step? For example we could trigger the action when the "final" automated PR is opened.
If it weren't for the 60GB of space required I would say we can try it on a default GH runner, but they only have ~14 GB of space available on them.
If we really want to use Github Actions for this, we would have more luck creating our own GH runners with enough space on them. But at that point I'm not really sure the extra automation and time required to automate and test this is worth it.
It might be better to just modify our local docker configs to give containers ~100GB of space + ample CPU/memory and run this script locally, then post our results as comments in the PR. Plus, this is only something we'll have to do once, so additional automation on top of what's already automated might not be needed here.
Thoughts?
Only a couple changes noted, but nothing critical! Thank you for this!
migration-verification/run.sh
Outdated
| @@ -0,0 +1,5 @@ | |||
| #!/bin/bash | |||
|
|
|||
| cd "$(dirname "$(realpath "$0")")" | |||
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.
Not sure if everyone has realpath installed by default. You should be able to get the same results with:
| cd "$(dirname "$(realpath "$0")")" | |
| cd "$(dirname "${BASH_SOURCE[0]}")" |
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.
Good catch, fixed!
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.
Replaced this script with a more useful README file now that a docker ARG is required.
migration-verification/Dockerfile
Outdated
| RUN node --version | ||
|
|
||
| ### Checkout Stacks 2.0 src | ||
| RUN git clone --depth 1 --branch v24.2.1.0-xenon https://github.com/blockstack/stacks-blockchain.git /stacks2.0 |
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.
Will have to remember to update this branch to the latest available come migration day. Any chance we can add an ARG which would require someone to pass in the V2 branch they intend to test with?
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.
Done! Added usage instructions to a readme file
25c39f3 to
d5f6cdf
Compare
…contract map data
d5f6cdf to
5007dc6
Compare
|
Note: this PR now includes validating token lockup schedules, which also appear to be working as expected. |
CharlieC3
left a comment
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.
![]()
kantai
left a comment
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!
Changes that would be nice to have is a way to parameterize the number of addresses, and rather than ordering by amount, order by RAND()
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Closes #2128
This is a dockerfile + js script that validates migrated STX balances and lockup schedules between Stacks 1.0 and Stacks 2.0.
The following steps are performed:
/v1/accounts/{address}/STACKS/balance/v2/accounts/{address-in-testnet-format}/v2/map_entry/ST000000000000000000002AMW42H/lockup/lockupsTODO
Notes
Running
This audit can be ran locally by just running the included script:
./migration-verfication/run.sh.Or run the docker build:
Docker needs around 60GB of disk space allocated. It can take a long time to finish, upwards of an hour -- every step is resource intensive: compiling, exporting, importing, and validating.
@CharlieC3 @wileyj would it be useful to have a custom gh action trigger to run this step? For example we could trigger the action when the "final" automated PR is opened.