-
Notifications
You must be signed in to change notification settings - Fork 245
chore: do not write chain info to vstorage #11312
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
Conversation
5e384f8
to
be51f72
Compare
Deploying agoric-sdk with
|
Latest commit: |
743a0ce
|
Status: | ✅ Deploy successful! |
Preview URL: | https://514dc5ef.agoric-sdk.pages.dev |
Branch Preview URL: | https://11310-remove-chain-info-from.agoric-sdk.pages.dev |
008d9b0
to
44880e8
Compare
const parseChainInfo = () => { | ||
if (typeof chainInfo !== 'string') return undefined; | ||
return JSON.parse(chainInfo); | ||
}; | ||
const parseAssetInfo = () => { | ||
if (typeof assetInfo !== 'string') return undefined; | ||
return JSON.parse(assetInfo); | ||
}; | ||
const opts = harden({ | ||
chainInfo: parseChainInfo(), | ||
assetInfo: parseAssetInfo(), | ||
}); |
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 bit is getting repeated a lot. consider factoring it out
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.
+1 but I won't block on it
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 idea, added a parseChainHubOpts
helper
@@ -110,10 +110,6 @@ jobs: | |||
make fund-provision-pool | |||
working-directory: ./agoric-sdk/multichain-testing | |||
|
|||
- name: Override Chain Registry |
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 save some time too
const parseChainInfo = () => { | ||
if (typeof chainInfo !== 'string') return undefined; | ||
return JSON.parse(chainInfo); | ||
}; | ||
const parseAssetInfo = () => { | ||
if (typeof assetInfo !== 'string') return undefined; | ||
return JSON.parse(assetInfo); | ||
}; | ||
const opts = harden({ | ||
chainInfo: parseChainInfo(), | ||
assetInfo: parseAssetInfo(), | ||
}); |
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.
+1 but I won't block on it
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.
looks good, presuming tests still passed.
I don't see any production code changes so I reviewed the commits somewhat quickly.
export const startStakeAtom = async ( | ||
{ |
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.
odd whitespace change. makes this part of the diff a little harder to read
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.
The change here and in startStakeOsmo
, startStakeBld
is incorporating the second argument, options
export const startStakeBld = async ( | ||
{ |
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.
again, I'm struggling to see what the substance of this change is
}, | ||
options, |
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.
are the options the same on all these example contracts? if so, I wonder about a common builder with an arg to pick which core eval to build
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.
More or less, yes. I didn't go with a common builder (yet) but added a parseChainHubOpts
helper
@@ -7,7 +7,6 @@ | |||
import { deeplyFulfilledObject, makeTracer } from '@agoric/internal'; | |||
import { makeStorageNodeChild } from '@agoric/internal/src/lib-chainStorage.js'; | |||
import { E } from '@endo/far'; | |||
import { parseArgs } from 'node:util'; |
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 wonder how this worked before
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 never did - it was a part of a change introduced in this PR. I probably could've fixed up to avoid misleading here.
ab60c44
to
3ce3903
Compare
3ce3903
to
ca0f832
Compare
ca0f832
to
743a0ce
Compare
closes: #11310
Description
decentral-itest-orchestration-config.json
todecentral-itest-orchestration-chains-config.json
inboot
andmultichain-testing
testschainInfo
in proposal builder optspackages/boot/test/orchestration/vstorage-chain-info.test.ts
which explicitly tests this functionalityChainHub
still uses vstorage to lookup chainInfo if none is found untilChainHub
methods should be sync #10602. AfterChainHub
methods should be sync #10602 the failure will be the same - ~Error: chain not found:agoric - but won't involve a remote call toagoricNames
.Security Considerations
None
Scaling Considerations
None
Documentation Considerations
None
Testing Considerations
Updates existing tests. Preserves vstorage tests in a new file -
packages/boot/test/orchestration/vstorage-chain-info.test.ts
Upgrade Considerations
None, contract changes in the PR are only for example contracts.