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

fix: use limited publishBrandInfo power, not all of chainStorage #61

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dckc
Copy link
Member

@dckc dckc commented Jan 25, 2024

fixes #59

We produce a new publishBrandInfo power (feat) and use it to reduce the power granted to dapp-offer-up's core eval script (fix).

Along the way, we likewise make makeMarshal available via the promise space (perhaps should be its own feat?).

Testing Considerations

Until we have something like #46 , I hope reviewers will do a bit of manual testing.

dckc added 3 commits January 24, 2024 17:46
 - 3 levels of boardAux power: just brands, TOFU, and full admin
 - add makeMarshal etc. to promise space under `endo1`
E.when(E(board).getId(key), boardId => E(boardAux).makeChildNode(boardId));

const init = async (key, value) => {
store.init(key, value);
Copy link
Member

Choose a reason for hiding this comment

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

init is only allowed if the key does not already exist. Get, set and * delete are only allowed if the key does already exist.


return harden({
brandAuxPublisher: Far('BrandAuxPublisher', { publishBrandInfo }),
boardAuxTOFU: Far('BoardAuxTOFU', { publishBrandInfo, init }),
Copy link
Member

Choose a reason for hiding this comment

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

What does TOFU mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

Trust On First Use.

Maybe should be renamed to "first come, first served".
IOU (and the rest of the consumers of this code) better documentation.

Comment on lines +7 to +11
* endo1: {
* marshal: typeof import('@endo/marshal');
* patterns: typeof import('@endo/patterns');
* }
* }} Endo1Modules
Copy link
Member

Choose a reason for hiding this comment

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

This is cool! Why endo1 instead of endo?

Copy link
Member Author

@dckc dckc Feb 15, 2024

Choose a reason for hiding this comment

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

cuz it doesn't have all of the endo modules; just the ones needed by this 1st use case

but that reminds me... I should get input from endo folks such as @kriskowal

@dckc dckc marked this pull request as draft February 15, 2024 18:22
E.when(
Promise.all([E(brand).getAllegedName(), E(brand).getDisplayInfo()]),
([allegedName, displayInfo]) =>
init(brand, harden({ allegedName, displayInfo })),
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 think this is goofy; I don't think this collection is keyed by brand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chainStorage is excess authority to publish brand displayInfo
2 participants