Skip to content

Commit

Permalink
Updated README (#563)
Browse files Browse the repository at this point in the history
Closes: #XXX


## Brief Changelog
* Fixed typo in main readme for initializing submodules
* Added instructions to dockernet for running integration tests with new host

## Author's Checklist

I have...

- [ ] Run and PASSED locally all GAIA integration tests
- [ ] If the change is contentful, I either:
    - [ ] Added a new unit test OR 
    - [ ] Added test cases to existing unit tests
- [X] OR this change is a trivial rework / code cleanup without any test coverage

If skipped any of the tests above, explain.


## Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] manually tested (if applicable)
- [ ] confirmed the author wrote unit tests for new logic
- [ ] reviewed documentation exists and is accurate


## Documentation and Release Note

  - [ ] Does this pull request introduce a new feature or user-facing behavior changes? 
  - [ ] Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`?
  - [ ] This pull request updates existing proto field values (and require a backend and frontend migration)? 
  - [ ] Does this pull request change existing proto field names (and require a frontend migration)?
  How is the feature or change documented? 
      - [ ] not applicable
      - [ ] jira ticket `XXX` 
      - [ ] specification (`x/<module>/spec/`) 
      - [ ] README.md 
      - [ ] not documented
  • Loading branch information
sampocs authored Jan 10, 2023
1 parent ac45bc4 commit 6889888
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The fastest way to develop on Stride is local development mode.
#### Set up local development mode
Install the required git submodule dependencies (various chains, relayers, bats).
```
git submodule update --init
git submodule update --init --recursive
```

Build executables, initialize state, and start the network with
Expand Down
38 changes: 34 additions & 4 deletions dockernet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,43 @@ paths:
rule: ""
channel-list: []
```
* To enable the the new host zone, include it in the `HOST_CHAINS` array in `dockernet/config.sh`. **Note: You can only run up to 4 host zones at once. You can just run GAIA and the new host zone, for simplicity (see below).**
* To enable the the new host zone, include it in the `HOST_CHAINS` array in `dockernet/config.sh`. **Note: You can only run up to 4 host zones at once. Since this wont be merged, for simplicity, you can just run GAIA and the new host zone in the default case (see below).**
```bash
HOST_CHAINS=()

if [[ "${ALL_HOST_CHAINS:-false}" == "true" ]]; then
HOST_CHAINS=(GAIA JUNO OSMO {NEW-HOST-ZONE}) # add here (this controls the hosts in `make start-docker-all`)
elif [[ "${#HOST_CHAINS[@]}" == "0" ]]; then
HOST_CHAINS=(GAIA {NEW-HOST-ZONE}) # add here (this controls the hosts in `make start-docker`)
fi
```
HOST_CHAINS=(GAIA {NEW-HOST-ZONE})
* Add the new host to the integration tests in `dockernet/tests/run_all_tests.sh`. When debugging, it's easiest to first test only the new host zone. You can comment out the existing chains and add the new host at the end. **Note: The transfer channel number will be 1 since it's the second host added (the first host is 0).** It should look something like:
``` bash
# CHAIN_NAME=GAIA TRANSFER_CHANNEL_NUMBER=0 $BATS $INTEGRATION_TEST_FILE
# CHAIN_NAME=JUNO TRANSFER_CHANNEL_NUMBER=1 $BATS $INTEGRATION_TEST_FILE
# CHAIN_NAME=OSMO TRANSFER_CHANNEL_NUMBER=2 $BATS $INTEGRATION_TEST_FILE
CHAIN_NAME={NEW-HOST-ZONE} TRANSFER_CHANNEL_NUMBER=1 $BATS $INTEGRATION_TEST_FILE
```
* And that's it! Just start the network as normal, and make sure to rebuild the new host zone when running for the first time.

* Start the network as normal. Make sure to rebuild the new host zone when running for the first time. You can view the logs in `dockernet/logs/{new-host-zone}.log` to ensure the network started successfully.
```
make build-docker build=n
make start-docker
```
* After the chain is running, run the integration tests to confirm the new host zone is compatible with Stride
```
make test-integration-docker
```
* After the tests succeed, you can add back in the other hosts to the integration tests. **Note: The transfer channel for the new host will need to be updated from 1 to 3, since it is now the 4th host zone.**
```
CHAIN_NAME=GAIA TRANSFER_CHANNEL_NUMBER=0 $BATS $INTEGRATION_TEST_FILE
CHAIN_NAME=JUNO TRANSFER_CHANNEL_NUMBER=1 $BATS $INTEGRATION_TEST_FILE
CHAIN_NAME=OSMO TRANSFER_CHANNEL_NUMBER=2 $BATS $INTEGRATION_TEST_FILE
CHAIN_NAME={NEW-HOST-ZONE} TRANSFER_CHANNEL_NUMBER=3 $BATS $INTEGRATION_TEST_FILE
```
* Finally, restart dockernet with all hosts, and confirm all integration tests pass
```
make start-docker-all
make test-integration-docker
```
* If all tests pass, the host zone is good to go!

0 comments on commit 6889888

Please sign in to comment.