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

9281 chainHub exo #9538

Merged
merged 2 commits into from
Jun 19, 2024
Merged

9281 chainHub exo #9538

merged 2 commits into from
Jun 19, 2024

Conversation

turadg
Copy link
Member

@turadg turadg commented Jun 19, 2024

refs: #9281

Description

AsyncFlow requires that everything passing the membrane is durable. This makes the ChainHub durable by making it an Exo.

Security Considerations

none

Scaling Considerations

It's a singleton, because there will only be one per vat.

Documentation Considerations

none

Testing Considerations

Existing coverage

Upgrade Considerations

Not yet deployed.

Now that it's an Exo, we have to consider its state an upgradability. We expect to make a new one on each vat invocation. The only state it has is cache of AgoricNames and data supplied by the contract.

@turadg turadg requested review from dckc and 0xpatrickdev June 19, 2024 21:57
Copy link

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: e382b66
Status: ✅  Deploy successful!
Preview URL: https://f88922f6.agoric-sdk.pages.dev
Branch Preview URL: https://9281-chainhub-exo.agoric-sdk.pages.dev

View logs

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Jun 19, 2024
@@ -54,7 +54,38 @@ export const connectionKey = (chainId1, chainId2) => {
return [chainId1, chainId2].sort().join(CHAIN_ID_SEPARATOR);
};

const ChainIdArgShape = M.or(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider:

Suggested change
const ChainIdArgShape = M.or(
/** accepts `chainId` or `ChainAddress` object */
const ChainIdArgShape = M.or(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. I'll make a note to get that into a future PR

@mergify mergify bot merged commit 9274bc7 into master Jun 19, 2024
85 checks passed
@mergify mergify bot deleted the 9281-chainHub-exo branch June 19, 2024 22:40
M.string(),
IBCConnectionInfoShape,
).returns(),
getConnectionInfo: M.callWhen(ChainIdArgShape, ChainIdArgShape).returns(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callWhen is OK in asyncFlow after all?

I can imagine waiting for tests that show that it's not, but in that case, why not wait for tests that show that chainHub has to be an exo in the 1st place?

Copy link
Member Author

@turadg turadg Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I learned last night it's not.

We did hit a test failure with the object itself not being durable but only in another branch that had a higher fidelity asyncFlow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants