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

refactor(vats): for state upgrade, use single field #9353

Merged
merged 2 commits into from
May 9, 2024

Conversation

dckc
Copy link
Member

@dckc dckc commented May 9, 2024

follow-up to: #9086

Description

In preparation for addressing excess authority (#9354):

  • To allow for state upgrade, rather than introducing the complexity of the power store in this initial version, reserve one property for future use
  • Require all localChain powers at intialization, which eliminates the need for the admin.setPower method.

Security / Documentation Considerations

n/a

Scaling Considerations

small constant factor change: removing the indirection thru the power store removes 1 syscall per access

Testing Considerations

existing tests suffice

Upgrade Considerations

code is not yet released / deployed

Copy link

cloudflare-workers-and-pages bot commented May 9, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4433526
Status: ✅  Deploy successful!
Preview URL: https://c6e3cec5.agoric-sdk.pages.dev
Branch Preview URL: https://dc-powers-refactor.agoric-sdk.pages.dev

View logs

@dckc dckc changed the title refactor(vats): for state upgrade, use single field (WIP) refactor(vats): for state upgrade, use single field May 9, 2024
@dckc dckc requested review from 0xpatrickdev and turadg May 9, 2024 17:50
@dckc dckc marked this pull request as ready for review May 9, 2024 17:50
export const LocalChainAdminI = M.interface('LocalChainAdmin', {
setPower: M.callWhen(M.string(), M.await(M.any())).returns(),
});
// XXX vestigial? for future use?
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the motivation for a "kit" is gone. Is there good reason to expect it to return? If not, please simplify to a regular Exo.

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 started to, but then thought: if we change to a regular Exo, it seems like changing our minds back to a Kit would be expensive.

I don't suppose I have any specific reason to expect it to return, though. So... ok, I guess I'll change it to an Exo.

dckc added 2 commits May 9, 2024 16:17
... rather than power store. Also require all localChain powers at
intialization, which eliminates the need for the admin.setPower method.

admin facet remains, since an exoClassKit has to have >1 facet,
keeping the possibility of non-public facets open is not bad.
punt on vestigial admin facet
@dckc dckc added the automerge:rebase Automatically rebase updates, then merge label May 9, 2024
@mergify mergify bot merged commit c11fecb into master May 9, 2024
71 checks passed
@mergify mergify bot deleted the dc-powers-refactor branch May 9, 2024 22:19
mergify bot added a commit that referenced this pull request May 10, 2024
refs: #9342, #9193
stacked on

 - #9353

## Description

Provide localchain accounts only with the `bank` for the relevant
address, rather than giving them access to all accounts in the form of
the `bankManager`.

earlier discussion:
https://github.com/Agoric/agoric-sdk/pull/9342/files#r1594791187

### Security Considerations

bankManager was excess authority

### Scaling / Documentation / Testing Considerations

Nothing significant: no scaling changes; existing docs/tests suffice.

### Upgrade Considerations

code is not released / deployed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants