-
Notifications
You must be signed in to change notification settings - Fork 215
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
feat(swingset): add vatAdminService.getBundleIDByName() #5368
Conversation
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 plausible... fine for my needs.
I leave it to someone else to approve; I don't think I'm sufficiently swapped in on kernel stuff.
if (method === 'getBundleIDByName') { | ||
const args = unserialize(argsCapdata); | ||
const [name] = args; | ||
assert.typeof(name, 'string', `getBundleIDByName() name`); |
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 take it kernel code doesn't use `X`...`
for error message details?
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 generally find X
/details
to impede debugging, and I value that more than the possible information leakage when caller A calls B, B does getBundleIDByName(secretName)
, and A catches the error to learn the name (none of which matters on a transparent chain anyways).
At some point we should probably have a collective discussion on the utility of that argument censorship (and more generally to find a coding style that we're all comfortable with and make the kernel use it, since we in kernel land have not been following all parts of the general agoric-sdk style, i.e. named =>
functions).
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.
Credible.
This API takes the name of a statically-configured bundle (i.e. a property name of `config.bundles`) and returns its BundleID (a hash string). This can be used later in `E(zoe).installBundleID(id)`. refs #4374 , specifically this API will allow bootstrap to deal with bundleIDs and bundleCaps rather than bundles.
00c5ca3
to
1ab58fc
Compare
This API takes the name of a statically-configured bundle (i.e. a
property name of
config.bundles
) and returns its BundleID (a hashstring). This can be used later in
E(zoe).installBundleID(id)
.refs #4374 , specifically this API will allow bootstrap to deal with
bundleIDs and bundleCaps rather than bundles.