Skip to content

Commit

Permalink
chore: cleanup chain info (#10108)
Browse files Browse the repository at this point in the history
refs: #9807

## Description
- Removes `counterparty.prefix.key_prefix: 'FIXME'` from every `agoricNames.chainConnection` entry in vstorage
- Removes `agoricNames.chain.agoriclocal` from vstorage

### Security Considerations
n/a

### Scaling Considerations
Incidentally reduces storage used on chain by writing less data to vstorage

### Documentation Considerations
n/a

### Testing Considerations
Existing tests were modified to accommodate these deletions.

### Upgrade Considerations
We've yet to run `init-orchestration.js`, so this does not have upgrade considerations. It should be part of upgrade-17, though.
  • Loading branch information
mergify[bot] authored Sep 18, 2024
2 parents f291362 + 7a1c91c commit f6ca68a
Show file tree
Hide file tree
Showing 19 changed files with 128 additions and 549 deletions.
226 changes: 103 additions & 123 deletions packages/boot/test/bootstrapTests/snapshots/orchestration.test.ts.md

Large diffs are not rendered by default.

Binary file not shown.
3 changes: 0 additions & 3 deletions packages/builders/scripts/testing/append-chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ const chainInfo = {
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
Expand Down
3 changes: 0 additions & 3 deletions packages/builders/scripts/testing/tweak-chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ const chainInfo = {
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
Expand Down
55 changes: 2 additions & 53 deletions packages/orchestration/src/chain-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,66 +20,15 @@ import { CosmosAssetInfoShape, CosmosChainInfoShape } from './typeGuards.js';
*/

const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
harden({
...fetchedChainInfo,
// FIXME does not have useful connections
// UNTIL https://github.com/Agoric/agoric-sdk/issues/9492
agoriclocal: {
chainId: 'agoriclocal',
connections: {
'cosmoshub-4': {
id: 'connection-1',
client_id: '07-tendermint-3',
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
portId: 'transfer',
channelId: 'channel-1',
counterPartyChannelId: 'channel-1',
counterPartyPortId: 'transfer',
ordering: 1 /* Order.ORDER_UNORDERED */,
state: 3 /* IBCConnectionState.STATE_OPEN */,
version: 'ics20-1',
},
},
osmosislocal: {
id: 'connection-0',
client_id: '07-tendermint-2',
counterparty: {
client_id: '07-tendermint-2',
connection_id: 'connection-1',
prefix: {
key_prefix: '',
},
},
state: 3 /* IBCConnectionState.STATE_OPEN */,
transferChannel: {
portId: 'transfer',
channelId: 'channel-0',
counterPartyChannelId: 'channel-1',
counterPartyPortId: 'transfer',
ordering: 1 /* Order.ORDER_UNORDERED */,
state: 3 /* IBCConnectionState.STATE_OPEN */,
version: 'ics20-1',
},
},
},
},
})
harden(fetchedChainInfo)
);

/**
* @typedef {typeof knownChains} KnownChains
* @internal
*/

// TODO(#9572): include this in registerChain
// TODO(#9966, #9967): include this in registerChain
/**
* Register chain assets into agoricNames
*
Expand Down
3 changes: 0 additions & 3 deletions packages/orchestration/src/cosmos-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ export interface IBCConnectionInfo {
counterparty: {
client_id: string;
connection_id: IBCConnectionID;
prefix: {
key_prefix: string;
};
};
transferChannel: {
portId: string;
Expand Down
3 changes: 0 additions & 3 deletions packages/orchestration/src/exos/chain-hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ const reverseConnInfo = connInfo => {
counterparty: {
client_id: connInfo.client_id,
connection_id: connInfo.id,
prefix: {
key_prefix: 'FIXME',
},
},
state: connInfo.state,
transferChannel: {
Expand Down
Loading

0 comments on commit f6ca68a

Please sign in to comment.