Skip to content
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

refresh 47 #763

Merged
merged 14 commits into from
May 10, 2023
Merged

refresh 47 #763

merged 14 commits into from
May 10, 2023

Conversation

faddat
Copy link
Contributor

@faddat faddat commented May 8, 2023

Context and purpose of the change

Brings the sdk 47 version of stride current with stride v9.

Brief Changelog

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
  • 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

sampocs and others added 14 commits April 6, 2023 09:06
## Context and purpose of the change

We are missing a unit test that checks the Min/Max RRs are set properly when a host zone is created.
**Summary**
Adds Evmos as a dockernet host zone. Evmos gives us coverage around additioonal edge cases that are not caught from standard cosmos chains:
* Ethermint based
* Non-118 coin type
* Different micro denom granuarity

Given Evmos is ethermint based, a few additional changes were required in this PR
* increase tokens allocated to validators at genesis (1evmos = 1e18evmos)
* Update withdrawal callback to handle new balance type (sdk 46 uses Ints, not Coins to store balances) (handled in an earlier PR)

**Test plan**

run integration tests
```
make start-docker
make test-integration-docker
```

result
```
integration_tests.bats
 ✓ [INTEGRATION-BASIC-EVMOS] host zones successfully registered
 ✓ [INTEGRATION-BASIC-EVMOS] ibc transfer updates all balances
 ✓ [INTEGRATION-BASIC-EVMOS] liquid stake mints stToken
 ✓ [INTEGRATION-BASIC-EVMOS] tokens were transferred to evmos_9001-2 after liquid staking
 ✓ [INTEGRATION-BASIC-EVMOS] tokens on EVMOS were staked
 ✓ [INTEGRATION-BASIC-EVMOS] redemption works
 ✓ [INTEGRATION-BASIC-EVMOS] claimed tokens are properly distributed
 ✓ [INTEGRATION-BASIC-EVMOS] rewards are being reinvested, exchange rate updating
 ✓ [INTEGRATION-BASIC-EVMOS] revenue accrued, and clear-balance works

9 tests, 0 failures
```

simulate acks
ica transfer - timeout
```
# force timeout in `TransferExistingDepositsToHostZones`
make start-docker && make test-integration-docker

# expect: deposit record state reverts to TRANSFER_QUEUE
# observed: 
deposit_record:
- amount: "100000"
  denom: aevmos
  deposit_epoch_number: "3"
  host_zone_id: evmos_9001-2
  id: "1"
  source: STRIDE
  status: TRANSFER_QUEUE
```

ica delegate - error
```
# set invalid (unregistered) validator address in `DelegateOnHost`

# expect: deposit record state reverts to DELEGATION_QUEUE
# observed: ack failure and deposit record status reversion 
dockernet-stride1-1  | 8:38PM ERR |   EVMOS_9001-2  |  DELEGATE ICACALLBACK  |  ICA FAILED (ack error), Packet: {Sequence:6 SourcePort:icacontroller-evmos_9001-2.DELEGATION SourceChannel:channel-1 DestinationPort:icahost ...
deposit_record:
- amount: "100000"
  denom: aevmos
  deposit_epoch_number: "3"
  host_zone_id: evmos_9001-2
  id: "1"
  source: STRIDE
  status: DELEGATION_QUEUE

```

ica delegate - timeout
```
# force timeout in `SubmitTxs`
# expect: deposit record state reverts to DELEGATION_QUEUE
# observed: 
dockernet-stride1-1  | 10:07PM ERR |   EVMOS_9001-2  |  DELEGATE ICACALLBACK  |  ICA TIMEOUT, Packet: {Sequence:4 SourcePort:icacontroller-evmos_9001-2.DELEGATION SourceChannel:channel-1 DestinationPort:icahost ...

deposit_record:
- amount: "100000"
  denom: aevmos
  deposit_epoch_number: "3"
  host_zone_id: evmos_9001-2
  id: "1"
  source: STRIDE
  status: DELEGATION_IN_PROGRESS

# this status is expected and reverts by running `RestoreInterchainAccount` 
```
Closes: #XXX

## Context and purpose of the change
Updated upgrade integration tests to use evmos since evmos is now one of the default host zones started from dockernet

## 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
- [ ] 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
@faddat faddat merged commit e10b8e9 into sdk47 May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants