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

Use Virtual Objects in Governance #4343

Closed
Chris-Hibbert opened this issue Jan 21, 2022 · 3 comments
Closed

Use Virtual Objects in Governance #4343

Chris-Hibbert opened this issue Jan 21, 2022 · 3 comments
Assignees
Labels
contract-upgrade enhancement New feature or request Governance Governance performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks

Comments

@Chris-Hibbert
Copy link
Contributor

Chris-Hibbert commented Jan 21, 2022

What is the Problem Being Solved?

For MainNet 1, we must support durable objects for restart and upgrade. This is part way to #5200

Description of the Design

Collect a catalogue of all the persistent data types in Governance, and convert them to Virtual Objects.

Security Considerations

Trust paging of defineKind APIs.

Test Plan

Presumably extensive.

@Chris-Hibbert Chris-Hibbert added enhancement New feature or request performance Performance related issues Medium code-style defensive correctness patterns; readability thru consistency Governance Governance resource-exhaustion Threats to availability from resource exhaustion attacks labels Jan 21, 2022
@Chris-Hibbert Chris-Hibbert self-assigned this Jan 21, 2022
@Chris-Hibbert Chris-Hibbert changed the title Use Virtual Object in Governance Use Virtual Objects in Governance Jan 21, 2022
@Tartuffo Tartuffo added MN-1 and removed MN-1 labels Jan 21, 2022
@Tartuffo
Copy link
Contributor

Tartuffo commented Feb 2, 2022

Does need collections, just virtual objects for durability.

@Tartuffo Tartuffo removed the MN-1 label Feb 7, 2022
@Chris-Hibbert
Copy link
Contributor Author

A quick survey of current storage:

BinaryVoteCounter

  /** @type {Store<Handle<'Voter'>,RecordedBallot> } */
  const allBallots = makeStore('voterHandle');

The counter itself is an object with state
question, isOpen, questionSpec, outcomePromise, tallyPromise

Committee (and shareHolders)

  /** @type {Store<Handle<'Question'>, QuestionRecord>} */
  const allQuestions = makeStore('Question');

invitations is an array

The committee itself is an object with state:
subscription, publication, committeeName, publicFacet

contractGovernor has no stores, but it has state itself

governParams

  const voteCounters = new WeakSet();

  let poserFacet;
  let currentInvitation;

paramManager

  const namesToParams = makeStore('Parameter Name');
  const { publication, subscription } = makeSubscriptionKit();
  const updateFns = {};

@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
@Tartuffo Tartuffo removed the Medium label Apr 8, 2022
@turadg turadg removed the code-style defensive correctness patterns; readability thru consistency label Jun 30, 2022
@Tartuffo Tartuffo removed this from the Mainnet 1 milestone Jul 19, 2022
@turadg
Copy link
Member

turadg commented May 9, 2023

With #7657 it's mostly durable. Any work now will be on making it fully durable, not virtual,

@turadg turadg closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contract-upgrade enhancement New feature or request Governance Governance performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks
Projects
None yet
Development

No branches or pull requests

3 participants