-
Notifications
You must be signed in to change notification settings - Fork 217
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(vats): publish vbank asset list with agoricNames #6700
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.
putting it under agoricNames mostly feels right, but... should it go somewhere else?
I'm sure it should go under published
. The other children there are,
- committees
- provisionPool
- psm
- wallet
It clearly doesn't belong under any of those. But maybe it merits its own key, vbank
?
I expect we'll take a pass through to #6111 before release.
packages/vats/src/vat-bank.js
Outdated
const brand = await kit.brand; | ||
const [brand, displayInfo] = await Promise.all([ | ||
kit.brand, | ||
E(kit.brand).getDisplayInfo(), |
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 awaiting displayInfo
even if it's not used. is that cheap?
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.
no; it's an inter-vat round-trip. good catch. I can postpone this until I'm waiting for the settled issuer.
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.
hm... actually, if we needed a round-trip to settle kit.brand
, the call to getDisplayInfo()
should get pipelined rather than taking an extra round trip. But kit.brand
might have been settled in the 1st place, in which case this is an extra round trip.
Tried locally and was able to load the display infos in the UI 👍 |
Right... that's what I was wrestling with. Aha... it's like all the other things under |
@michaelfig it's currently keyed by denom. I expected to key it by name, a la |
b8ad33f
to
2c32ee7
Compare
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.
No change requests but I want to understand the two issuer resolutions before approving.
@@ -319,6 +331,10 @@ export function buildRootObject() { | |||
|
|||
/** | |||
* Add an asset to the bank, and publish it to the subscriptions. | |||
* If nameAdmin is defined, update with denom to AssetInfo entry. | |||
* | |||
* Note that AssetInfo has the settled identity of the issuer, |
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 doc. for my understanding, is that the same as saying "has a presence of the issuer"?
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.
yes, unless the issuer was actually created in the publishing vat, in which case it would be the object itself and not a presence for it.
The requirement is enforced via: denomToAddressUpdater.init(denom, makeStore('address')); The |
@michaelfig yes, I know denom uniqueness is enforced. My question is: where is |
Ah, sorry for misreading.
I don't see any direct enforcement of |
ah. yes. So |
closes: #5762
refs: Agoric/dapp-inter#9
Description
vbankAsset
entry inagoricNames
addAsset()
call that mapsdenom
to{ brand, issuer, issuerName, denom, proposedName, displayInfo }
nameAdmin
arg tomakeBankManager()
is presentSecurity Considerations
claim for review: the only objects we're publishing here are brands and issuers.
Documentation Considerations
our docs on chainStorage keys / paths are kinda scattered. I suppose we can consider that in scope of #6111 rather than here.
Testing Considerations
tested manually with
make scenario2-run-chain
, and that before addingdisplayInfo
support.