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

9757 Orchestration docs timebox #10050

Merged
merged 25 commits into from
Sep 9, 2024
Merged

9757 Orchestration docs timebox #10050

merged 25 commits into from
Sep 9, 2024

Conversation

turadg
Copy link
Member

@turadg turadg commented Sep 9, 2024

refs: #9757

Description

A bunch of docs improvements to get into the u17 release.

This doesn't do all the things specified in the ticket so leaves open:

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

We'll need tutorial docs. I think some of the @example suggestions make more sense there.

Testing Considerations

CI

Upgrade Considerations

not yet deployed

@turadg turadg added the bypass:integration Prevent integration tests from running on PR label Sep 9, 2024
Copy link

cloudflare-workers-and-pages bot commented Sep 9, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 220d4b2
Status: ✅  Deploy successful!
Preview URL: https://c8cf169f.agoric-sdk.pages.dev
Branch Preview URL: https://9757-timebox.agoric-sdk.pages.dev

View logs

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

Pretty clearly forward progress.

The closest thing to a critical comment is on marking the agoricNames keys as internal.But it's conservative - we can expose it later.

@@ -32,7 +32,7 @@
"prettier-plugin-jsdoc": "^1.3.0",
"prettier-plugin-sh": "^0.14.0",
"type-coverage": "^2.27.1",
"typedoc": "^0.26.4",
"typedoc": "^0.26.7",
Copy link
Member

Choose a reason for hiding this comment

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

are there any particular features that we're using from this release? or was this just housekeeping?

I notice it's less than a day old. For ref: c56c478

Copy link
Member

Choose a reason for hiding this comment

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

maybe hoping for better visibility support?

* const contract = (zcf, privateArgs, zone, tools) => { ... };
* export const start = withOrchestration(contract);
* ```
*
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

oh yeah, that got stalled: #9808

I'll try to solve that here

/**
* Transactions for doing staking operations on an individual account.
*
* @see {@link https://docs.cosmos.network/main/build/modules/staking#messages x/staking messages}
Copy link
Member

Choose a reason for hiding this comment

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

a comma or something between the links would help.

it's a little hard to tell that there are 2 of them.

* Cosmos-specific methods to extend `OrchestrationAccountI`, parameterized
* by `CosmosChainInfo`.
*
* In particular, if the chain info includes a staking token, `StakingAccountActions`
Copy link
Member

Choose a reason for hiding this comment

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

use {@link StakingAccountActions}?

@@ -234,6 +234,9 @@ export interface OrchestrationAccountI {
getPublicTopics: () => Promise<Record<string, ResolvedPublicTopic<unknown>>>;
}

/**
* An async-flow suitable for use in contracts using Orchestration
Copy link
Member

Choose a reason for hiding this comment

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

"async-flow" is a pretty opaque term here.

I suggest moving (most of) the "Orchestration flows" section of the README to here.

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!

@@ -246,6 +246,7 @@ export interface OrchestrationFlow<CT = unknown> {
* The type must be able to express transfers across different chains and transports.
*
* NOTE Expected to change, so consider an opaque structure.
* @internal
Copy link
Member

Choose a reason for hiding this comment

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

looks like you got this working. nice!

/**
* agoricNames key for ChainInfo hub
*
* @internal
Copy link
Member

Choose a reason for hiding this comment

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

These agoricNames keys don't seem internal to me. They show up all the way to clients via vstorage.

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 point, I'll revert those. I still think they should go into an enum, but that can wait

@@ -42,7 +41,9 @@ export const IcaAccountI = M.interface('IcaAccount', {
reactivate: M.call().returns(VowShape),
});

// XXX none of these modifiers are working to exclude this type from api-docs
Copy link
Member

Choose a reason for hiding this comment

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

oh. so it's not yet working?

Copy link
Member Author

Choose a reason for hiding this comment

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

in some cases, no. maybe on types that are transitively included

Copy link
Member Author

Choose a reason for hiding this comment

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

in some cases, no. maybe on types that are transitively included

export type IBCConnectionInfo = {
export interface IBCConnectionInfo {
Copy link
Member

Choose a reason for hiding this comment

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

I'd expect to use interfaces for things with methods, but this is an ordinary data structure. Why not leave it as a type alias?

Copy link
Member

Choose a reason for hiding this comment

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

I guess being able to refer to each property with a link is nice.

Copy link
Member Author

Choose a reason for hiding this comment

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

export type CosmosAssetInfo = {
export interface CosmosAssetInfo extends Record<string, unknown> {
Copy link
Member

Choose a reason for hiding this comment

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

likewise, seems fine as a type alias

/** @import {NameAdmin} from '@agoric/vats'; */

/** @typedef {CosmosChainInfo | EthChainInfo} ChainInfo */
/**
* Info used to build a {@link Chain} object - naming, connections, etc.
Copy link
Member

Choose a reason for hiding this comment

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

nit: naming stuck out to me as something to improve. maybe:

Suggested change
* Info used to build a {@link Chain} object - naming, connections, etc.
* Info used to build a {@link Chain} object - channel, connection, and denom info.

@@ -78,12 +78,14 @@ const knownChains = /** @satisfies {Record<string, ChainInfo>} */ (
* @internal
*/

// TODO(#9572): include this in registerChain
Copy link
Member

Choose a reason for hiding this comment

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

👏

@@ -133,6 +134,7 @@ export const DenomAmountShape = { denom: DenomShape, value: M.bigint() };
/** @type {TypedPattern<AmountArg>} */
export const AmountArgShape = M.or(AmountShape, DenomAmountShape);

/** @type {TypedPattern<RequestQuery>} */
Copy link
Member

Choose a reason for hiding this comment

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

RequestQuery['data'] is Uint8Array. Was going to suggest using TypedPattern<JsonSafe<RequestQuery>>, but we need to preserve RequestQuery['height']: bigint

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, I'll correct this

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Sep 9, 2024
@turadg turadg mentioned this pull request Sep 9, 2024
@mergify mergify bot merged commit 2e66067 into master Sep 9, 2024
79 checks passed
@mergify mergify bot deleted the 9757-timebox branch September 9, 2024 21:24
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 bypass:integration Prevent integration tests from running on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants