-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: main
Are you sure you want to change the base?
Conversation
- 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); |
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.
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 }), |
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.
What does TOFU
mean?
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.
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.
* endo1: { | ||
* marshal: typeof import('@endo/marshal'); | ||
* patterns: typeof import('@endo/patterns'); | ||
* } | ||
* }} Endo1Modules |
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 is cool! Why endo1
instead of endo
?
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.
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
E.when( | ||
Promise.all([E(brand).getAllegedName(), E(brand).getDisplayInfo()]), | ||
([allegedName, displayInfo]) => | ||
init(brand, harden({ allegedName, displayInfo })), |
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 think this is goofy; I don't think this collection is keyed by brand
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.