-
Notifications
You must be signed in to change notification settings - Fork 208
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
fix(orchestration): chain-info #9712
Conversation
- Add `reverseConnInfo` utility to flip connection info perspective - Modify `registerChain` to normalize connection info before storage - Ensure consistent storage based on lexicographically smaller chain ID
- properly specify hostConnectionId (remote chain) and controllerConnectionId (local chain) parameters
Deploying agoric-sdk with Cloudflare Pages
|
cf5838a
to
be3e273
Compare
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.
Good stuff. It's coming together!
@@ -53,8 +53,8 @@ function toConnectionEntry(ibcInfo, name, chainInfo) { | |||
} | |||
const [channel] = transferChannels; | |||
const [channelFrom, channelTo] = fromChain1 | |||
? [channel.chain_2, channel.chain_1] | |||
: [channel.chain_1, channel.chain_2]; | |||
? [channel.chain_1, channel.chain_2] |
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.
in hindsight a unit test for the direction would have helped. not worthwhile now imo
- updates multichain-e2e.yml job to print validator and relayer logs
be3e273
to
746261e
Compare
_incidental_ ## Description Motivated by #9712 (comment) This fixes up ChainHub to return IBCConnectionInfo in the perspective of the directed edge implied by the chain arguments. The data is the same in either direction, just reversed, so we store it just once. This adds the logic to normalize on save and denormalize on read. ### Security Considerations none ### Scaling Considerations Some extra compute when saving or reading a chain. Low call rate. ### Documentation Considerations none ### Testing Considerations New tests ### Upgrade Considerations Not yet deployed
@@ -70,31 +70,31 @@ Generated by [AVA](https://avajs.dev). | |||
], | |||
[ | |||
'published.agoricNames.chainConnection.agoric-3_cosmoshub-4', | |||
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-6\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-927\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-649\\\\\\",\\\\\\"prefix\\\\\\":{\\\\\\"key_prefix\\\\\\":\\\\\\"FIXME\\\\\\"}},\\\\\\"id\\\\\\":\\\\\\"connection-8\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-405\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}","{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-927\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-6\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-8\\\\\\",\\\\\\"prefix\\\\\\":{\\\\\\"key_prefix\\\\\\":\\\\\\"FIXME\\\\\\"}},\\\\\\"id\\\\\\":\\\\\\"connection-649\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-405\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', | |||
'{"blockHeight":"0","values":["{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-6\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-927\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-649\\\\\\",\\\\\\"prefix\\\\\\":{\\\\\\"key_prefix\\\\\\":\\\\\\"FIXME\\\\\\"}},\\\\\\"id\\\\\\":\\\\\\"connection-8\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-405\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}","{\\"body\\":\\"{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-6\\\\\\",\\\\\\"counterparty\\\\\\":{\\\\\\"client_id\\\\\\":\\\\\\"07-tendermint-927\\\\\\",\\\\\\"connection_id\\\\\\":\\\\\\"connection-649\\\\\\",\\\\\\"prefix\\\\\\":{\\\\\\"key_prefix\\\\\\":\\\\\\"\\\\\\"}},\\\\\\"id\\\\\\":\\\\\\"connection-8\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"transferChannel\\\\\\":{\\\\\\"channelId\\\\\\":\\\\\\"channel-5\\\\\\",\\\\\\"counterPartyChannelId\\\\\\":\\\\\\"channel-405\\\\\\",\\\\\\"counterPartyPortId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"ordering\\\\\\":0,\\\\\\"portId\\\\\\":\\\\\\"transfer\\\\\\",\\\\\\"state\\\\\\":3,\\\\\\"version\\\\\\":\\\\\\"ics20-1\\\\\\"}}\\",\\"slots\\":[]}"]}', |
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.
It would be nice to decode these vstorage items for the snapshot.
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.
feel free
refs: #9063
Description
Fixes bugs in unreleased code related to publishing
IBCConnectionInfo
to vstorage and parameterizing ICA channel creation.Testing Considerations
These were surfaced in E2E testing. Includes an additional test to verify connection info between two well known chains, as current snapshots are a bit hard to decipher.
Upgrade Considerations
Changes unreleased code.