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

feat(swingset): add vatAdminService.getBundleIDByName() #5368

Merged
merged 1 commit into from
May 26, 2022

Conversation

warner
Copy link
Member

@warner warner commented May 13, 2022

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.

@warner warner added the SwingSet package: SwingSet label May 13, 2022
@warner warner self-assigned this May 13, 2022
@warner warner marked this pull request as ready for review May 14, 2022 02:58
@warner warner requested review from FUDCo and dckc May 14, 2022 02:58
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.

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`);
Copy link
Member

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?

Copy link
Member Author

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).

Copy link
Contributor

@FUDCo FUDCo left a 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.
@warner warner force-pushed the 4374-getbundleidbyname branch from 00c5ca3 to 1ab58fc Compare May 26, 2022 07:01
@warner warner added the automerge:rebase Automatically rebase updates, then merge label May 26, 2022
@mergify mergify bot merged commit 1c97bf5 into master May 26, 2022
@mergify mergify bot deleted the 4374-getbundleidbyname branch May 26, 2022 07:52
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 SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants