-
Notifications
You must be signed in to change notification settings - Fork 609
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
Refactors testnetify and remove last localOsmosis Dockerfile #2795
Conversation
A good way to review changes and understand the new flow is to go to top-down:
|
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.
Awesome job with this!! Its really awesome to see something that is actually understandable compared to the previous testnetify script. Would like to discuss some of these points and then do another review before merging if possible!
localnet-remove-state-export: | ||
@docker-compose -f tests/localosmosis/mainnet_state/docker-compose-state-export.yml down | ||
rm -rf $(PWD)/tests/localosmosis/state_export/.osmosisd |
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.
Are we utilizing a .osmosisd folder within the repo itself to retain data? If so, we should change this to utilize the .osmosisd folder located in the home directory.
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.
Yes, we're using a .osmosisd
folder within the repo.
Same behavior of regular localOsmosis.
Should we change both?
TBH I prefer keeping it inside the repo but it's not a problem changing it.
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.
Can we change this on both? From personal experience (today actually), I was confused where it was pulling the data from and had to remake a testnet instead of upgrading it. With the knowledge I have now I realize I could have done the following:
- Move the .osmosisd repo to the home folder
- Checkout v12
- Move the .osmosisd repo back to the in repo location
This seems like a hassle when we could just keep it using .osmosisd. What are your thoughts though? Totally down to keep it this way if there is a good reason!
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.
The osmosis home makes more sense, to be honest.
Using the .osmosisd
folder within the repo was done for simplicity.
The initialization step of both localOsmosis
setups (modifying the various tomls and genesis) runs only if no .osmosisd/config
folder it's found: https://github.com/osmosis-labs/osmosis/blob/main/tests/localosmosis/scripts/setup.sh#L87
The check allows the possibility to stop/restart and restart the chain without repeating the initialization step as well as persisting the data.
If we want to use the .osmosisd
folder in the home, we need to handle the first run of the script ensuring that the ~/.osmosisd
folder is empty otherwise the init
phase won't run
Implemented some changes and addressed the other points |
Side note, does args.verbose default to True? If not I think it should imo. Only question remaining is discussion on .osmosisd folder, other than that everything else looks good to go! |
verbose defaults to |
@niccoloraspa do you agree that verbose should default to true? Also, would you like to just merge this as is and address the .osmosisd issue in a subsequent PR or do you want to do this in this PR? I'll approve now so you can decide whatever works best for you! |
No strong preference, I'm happy with verbose output as a default. |
As discussed, merging this, then fixing/merging #2813. From there we can make a fix for utilizing the home folder |
* Refactor testnetify and remove Dockerfile * Manually replace new validator public key * Improve output formatting * Bug fixes * Add ACCOUNT_PUBKEY and ACCOUNT_ADDRESS input * Add environment variables as input and config folder check * Update docs, Makefile and rename folder * Modify CLI arguments * Update docker-compose.yaml defaults and print updated values * Invert printing logic replacing verbose with quiet (cherry picked from commit 3fa5450) # Conflicts: # tests/localosmosis/README.md
* Refactor testnetify and remove Dockerfile * Manually replace new validator public key * Improve output formatting * Bug fixes * Add ACCOUNT_PUBKEY and ACCOUNT_ADDRESS input * Add environment variables as input and config folder check * Update docs, Makefile and rename folder * Modify CLI arguments * Update docker-compose.yaml defaults and print updated values * Invert printing logic replacing verbose with quiet (cherry picked from commit 3fa5450) # Conflicts: # tests/localosmosis/README.md
…#2795) (#2822) * Refactors testnetify and remove last localOsmosis Dockerfile (#2795) * Refactor testnetify and remove Dockerfile * Manually replace new validator public key * Improve output formatting * Bug fixes * Add ACCOUNT_PUBKEY and ACCOUNT_ADDRESS input * Add environment variables as input and config folder check * Update docs, Makefile and rename folder * Modify CLI arguments * Update docker-compose.yaml defaults and print updated values * Invert printing logic replacing verbose with quiet (cherry picked from commit 3fa5450) # Conflicts: # tests/localosmosis/README.md * fix md conflicts Co-authored-by: Niccolo Raspa <[email protected]> Co-authored-by: Adam Tucker <[email protected]>
What is the purpose of the change
As per the title, this PR:
testnetify
scriptsDockerfile
Main changes:
testnetify
process from theosmosisd
binary. All the needed addresses are now expected as input.Dockerfile
to avoid creating a dedicated onesed_inplace
with thereplace
function that works in-memoryIBC
module pruningtestnetify.py
atdocker run
time and not atdocker build
timeBrief Changelog
testnetify
scriptsDockerfile
Testing and Verifying
I have updated the documentation that can be followed to test the process.
Main parts:
state_export.json
intests/localosmosis/state_export/state_export.json
localnet-build-state-export
localnet-start-state-export
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no