You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(orchestration): new *WithMeta(...) methods (#11980)
closes: #11923, closes: #11982
## Description
Introduce `OrchestrationAccountCommon.transferWithMeta(...): Promise<{ result: Promise<any>, meta: Record<string, any> }>`. This uses a `Promise<{ result, meta }>` record to be fulfilled "soon" when a long-term operation is started, and the `result` is a Promise that fulfills "on completion" to indicate when the transfer has returned successfuly.
The `meta` record has `{ traffic: [{ src: [...], dst: [...], seq: number | null }, ...] }` to surface the details needed for an off-chain service to be able to track progress of the transfer operation. A related service is `CosmosOrchestrationAccount.executeEncodedTxWithMeta([...msgs])`, also with `Promise<{result, meta }>` to track progress of the ICA operation from Agoric to the attached chain.
Putting these together, when the `transferWithMeta` is performed on an ICA, it will return two traffic entries-- one for the IBC send of a MsgTransfer to the remote chain, followed by another anticipating the acknowledgement of the ICS-20 transfer packet.
### Security Considerations
### Scaling Considerations
Increases the size of Orchestration contract bundles, which may prevent uploading them like in #11981. We hope that #11202 will be a solution.
Adds a new `zone.weakStore('icaAccountToDetails')...`, which is roughly equivalent to adding a new internal state record to the IcaAccount (one per portfolio subaccount). `icaAccountToDetails` is used for memoizing address details for each ICA used by the `*WithMeta` methods, so that the cost of looking up those details is amortized over many calls to `transferWithMeta` from the same ICA.
### Documentation Considerations
New features intended for orchestration, and documented in the API.
`tryDecodeResponse` now takes a `Codec` so that it can validate `Codec.typeUrl` instead of just using `Codec.toProtoMsg` without any context.
### Testing Considerations
Will be tested as a part of Ymax implementation.
### Upgrade Considerations
Needs upgrade testing to ensure all exoClassKits upgrades provide required facets.
Copy file name to clipboardExpand all lines: packages/network/README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,13 @@ You must also prepare a `ConnectionHandler` object to manage the connection you'
48
48
Then you will call the `connect()` method on your local `Port`. This will return a `Promise` that will fire with a new `Connection` object, on which you can send data. Your `ConnectionHandler` will be notified about the new channel, and will receive inbound data from the other side.
0 commit comments