-
Notifications
You must be signed in to change notification settings - Fork 218
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
chore: Sync Endo #8651
chore: Sync Endo #8651
Conversation
getRoundData: M.call(M.any()).returns(M.promise()), | ||
getRoundStatus: M.call(M.any()).returns(M.record()), | ||
oracleRoundStateSuggestRound: M.call(M.any()).returns(M.record()), | ||
authenticateQuote: M.call().rest(M.any()).returns(M.any()), |
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.
This should take one quote,
agoric-sdk/packages/zoe/tools/manualPriceAuthority.js
Lines 39 to 45 in a271af9
/** @param {PriceQuoteValue} quote */ | |
const authenticateQuote = quote => { | |
const quoteAmount = AmountMath.make(brand, harden(quote)); | |
const quotePayment = quoteMint.mintPayment(quoteAmount); | |
return harden({ quoteAmount, quotePayment }); | |
}; | |
const calcAmountOut = amountIn => { |
I'll push accurate guards.
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.
Better guards would certainly be nice, but can happen after this PR. Thus, I won't withhold approval waiting for this conversation to be resolved.
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.
refactor: Make all TS import extensions explicit
Why?
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.
Tsc
made me do it. I do not know why tsc
insisted, but it did.
* @typedef {import('@agoric/time').RelativeTime} RelativeTime // TODO: use | ||
* RelativeTime, not RelativeTimeValue |
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.
this TODO is odd. perhaps it's meant to be a deprecated type?
@@ -89,6 +89,10 @@ export const makeDurableZone = (baggage, baseLabel = 'durableZone') => { | |||
/** @type {import('.').Zone['exoClass']} */ | |||
const exoClass = (...args) => prepareExoClass(baggage, ...args); | |||
/** @type {import('.').Zone['exoClassKit']} */ | |||
// @ts-ignore This type check regressed inexplicably with the release |
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.
I'll take a look at fixing this before approving
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.
Likewise, although it would be nice to get this resolved now, it can happen after this PR, so I won't withhold approval waiting for it.
package.json
Outdated
@@ -10,7 +10,7 @@ | |||
"type": "module", | |||
"packageManager": "yarn@1.22.19", | |||
"devDependencies": { | |||
"@endo/eslint-plugin": "^0.5.1", | |||
"@endo/eslint-plugin": "^1.0.0", |
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.
these 1.0s, will they all be semver? Are Endo maintainers committed to major very bump for all breaking changes? do deep imports count as the package API?
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.
Deep imports are expressly forbidden by an "exports"
directive in every public Endo package except captp
, far
, lockdown
, and marshal
, and these must be fixed.
Endo has for some time committed to backward-compatibility for dependents using the default carat (^
) range, which is more strict than semver.
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.
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.
Tracking the broader issue for Agoric SDK #8679
Wow, that's a long time ago! |
3d3a6f3
to
89c2b4b
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.
LGTM!!!
getRoundData: M.call(M.any()).returns(M.promise()), | ||
getRoundStatus: M.call(M.any()).returns(M.record()), | ||
oracleRoundStateSuggestRound: M.call(M.any()).returns(M.record()), | ||
authenticateQuote: M.call().rest(M.any()).returns(M.any()), |
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.
Better guards would certainly be nice, but can happen after this PR. Thus, I won't withhold approval waiting for this conversation to be resolved.
@@ -89,6 +89,10 @@ export const makeDurableZone = (baggage, baseLabel = 'durableZone') => { | |||
/** @type {import('.').Zone['exoClass']} */ | |||
const exoClass = (...args) => prepareExoClass(baggage, ...args); | |||
/** @type {import('.').Zone['exoClassKit']} */ | |||
// @ts-ignore This type check regressed inexplicably with the release |
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.
Likewise, although it would be nice to get this resolved now, it can happen after this PR, so I won't withhold approval waiting for it.
89c2b4b
to
69884dd
Compare
This change brings Agoric SDK in sync with the latest versions from Endo as of December 12, 2023.
This includes syncing up breaking changes with interface guards. Where invalid call guards would silently allow an invocation previously, they now throw. Several interface guards needed fixing.
Some accommodations were necessary for the new
__getMethodNames__
and__getInterfaceGuard__
protocols.The algorithm for performing a speculative integration with an Endo branch required an adjustment to ensure that types were generated correctly.
For reasons opaque to the integrator, this required:
.js
extension. The only relevant change from the Endo side is that many packages provide generated.d.ts
types now.to have a
typesfield pointing at
index.js`, which by dint of fortunate coïncidence is a valid TypeScript definition file.@agoric/zone
that only causes a type error in integration with@agoric/vats
.