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: make PSM bootstrap support multiple brands #6146

Merged
merged 6 commits into from
Sep 7, 2022
Merged

Conversation

Chris-Hibbert
Copy link
Contributor

refs: #6142
refs: #6139

Description

Make PSM bootstrap support multiple brands

This helps with #6142, but might be merged into that or #6139.

Security Considerations

The PSM facets are available throughout PSM. That seems acceptable.

Documentation Considerations

None

Testing Considerations

Existing tests continue to pass. Since some are using PSM bootstrap, we can tell that it successfully stored one PSM and retrieved it. I presume two wouldn't be harder, but haven't written tests.

@Chris-Hibbert Chris-Hibbert added this to the Mainnet 1 RC0 milestone Sep 6, 2022
@Chris-Hibbert Chris-Hibbert self-assigned this Sep 6, 2022
@Chris-Hibbert Chris-Hibbert removed the request for review from turadg September 6, 2022 22:17
@Tartuffo Tartuffo removed this from the Mainnet 1 RC0 milestone Sep 6, 2022
@Chris-Hibbert Chris-Hibbert marked this pull request as draft September 6, 2022 22:32
This helps with #6142, but might be merged into that or #6139.
@Chris-Hibbert Chris-Hibbert marked this pull request as ready for review September 7, 2022 00:18
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 like good progress toward the target.

Comment on lines 144 to 150
const newPsmFacets = {
psm: E(governorFacets.creatorFacet).getInstance(),
psmGovernor: governorFacets.instance,
psmCreatorFacet: E(governorFacets.creatorFacet).getCreatorFacet(),
psmAdminFacet: E(governorFacets.creatorFacet).getAdminFacet(),
psmGovernorCreatorFacet: governorFacets.creatorFacet,
};
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we're going to regret storing these promises.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're probably right.

/** @typedef {import('./econ-behaviors.js').EconomyBootstrapSpace} EconomyBootstrapSpace */

/** @param {BootstrapSpace & EconomyBootstrapSpace & { devices: { vatAdmin: any }, vatPowers: { D: DProxy }, }} powers */
// /** @param {BootstrapSpace & { devices: { vatAdmin: any }, vatPowers: { D: DProxy }, }} powers */
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to keep this commented-out line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope.

installation: {
produce: { contractGovernor, committee, binaryVoteCounter, psm },
},
}) => {
psmFacets.resolve(makeScalarMapStore());
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps leave a comment for our future selves about what this is doing here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@dckc dckc changed the title refactor: make PSM bootstrap support multiple brands feat: make PSM bootstrap support multiple brands Sep 7, 2022
@dckc dckc added the automerge:squash Automatically squash merge label Sep 7, 2022
@mergify mergify bot merged commit d9583f8 into master Sep 7, 2022
@mergify mergify bot deleted the 6142-psmFacets branch September 7, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:squash Automatically squash merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants