Skip to content

Commit

Permalink
9068 close account e2e (#9864)
Browse files Browse the repository at this point in the history
refs: #9068
refs: #9192

## Description
1. Includes e2e tests of different channel closing behaviors added in #9857:
 - ~~Automatically reopen a closed ICA channel (e.g. a packet timed out)~~ requires #9891 to complete. See  #9864 (comment)
 - `CosmosOrchestrationAccount` (`IcaAccout`) holder can close their account
 - `CosmosOrchestrationAccount` (`IcaAccount`) holder can reopen their account

2. Includes `publish local and remote ibc addresses to vstorage` to facilitate querying the ICA account (channel) info from an off-chain client.
  - NOTE: if an account is a reopened, the localAddress and remoteAddress originally published to vstorage will be stale. Same with some of the values stored in `CosmosOrchestrationAccountKit`'s exo state. The ChainAddress will be the same, but the full address strings will contain new channelIDs. This is tech debt being taken on until #9066.
  
3. Includes test to ensure clients cannot successfully submit `MsgChanCloseInit` for ICA and Transfer channels

### Security Considerations
n/a

### Scaling Considerations
n/a

### Documentation Considerations
n/a

### Testing Considerations
This PR includes high fidelity tests with simulated chains.

### Upgrade Considerations
n/a
  • Loading branch information
mergify[bot] committed Aug 29, 2024
2 parents ecc38fc + bb6d53d commit 3573033
Show file tree
Hide file tree
Showing 20 changed files with 807 additions and 109 deletions.
11 changes: 2 additions & 9 deletions multichain-testing/test/auto-stake-it.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,8 @@ test.before(async t => {
deleteTestKeys(accounts).catch();
const wallets = await setupTestKeys(accounts);
t.context = { ...rest, wallets, deleteTestKeys };

t.log('bundle and install contract', contractName);
await t.context.deployBuilder(contractBuilder);
const { vstorageClient } = t.context;
await t.context.retryUntilCondition(
() => vstorageClient.queryData(`published.agoricNames.instance`),
res => contractName in Object.fromEntries(res),
`${contractName} instance is available`,
);
const { startContract } = rest;
await startContract(contractName, contractBuilder);
});

test.after(async t => {
Expand Down
11 changes: 2 additions & 9 deletions multichain-testing/test/basic-flows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,8 @@ test.before(async t => {
deleteTestKeys(accounts).catch();
const wallets = await setupTestKeys(accounts);
t.context = { ...rest, wallets, deleteTestKeys };

t.log('bundle and install contract', contractName);
await t.context.deployBuilder(contractBuilder);
const { vstorageClient } = t.context;
await t.context.retryUntilCondition(
() => vstorageClient.queryData(`published.agoricNames.instance`),
res => contractName in Object.fromEntries(res),
`${contractName} instance is available`,
);
const { startContract } = rest;
await startContract(contractName, contractBuilder);
});

test.after(async t => {
Expand Down
Loading

0 comments on commit 3573033

Please sign in to comment.