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

6044 wallet voting #6077

Closed
wants to merge 7 commits into from
Closed

6044 wallet voting #6077

wants to merge 7 commits into from

Conversation

turadg
Copy link
Member

@turadg turadg commented Aug 27, 2022

closes: #6044
refs: #XXXX

Description

Security Considerations

Documentation Considerations

Testing Considerations

@turadg turadg linked an issue Aug 27, 2022 that may be closed by this pull request
@turadg
Copy link
Member Author

turadg commented Aug 27, 2022

@dckc draft with current state. Hope to find time later today to add the tests with a committee vote invitation.

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. I hope to start integration testing soonish.

}),
slots: ['offerResult:1'],
});
t.deepEqual(context.unserialize(cap), val);
Copy link
Member

Choose a reason for hiding this comment

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

it's important that unserialize preserves identity, so this test should be t.is(...)

@@ -50,7 +50,7 @@ const makeOnChainWallet = board => {
});
};

test('makeImportContext preserves identity across AMM and wallet', t => {
Copy link
Member

Choose a reason for hiding this comment

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

I think we still want a test that makeImportContext preserves identity across the AMM and wallet; that was its original motivation.

Copy link
Member Author

Choose a reason for hiding this comment

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

Happy to revert. I thought I was executing your suggestion in #5883 (comment)

Or are you suggesting to keep this change and add something like test.todo('makeImportContext preserves identity across AMM and wallet') ?

Copy link
Member

Choose a reason for hiding this comment

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

oops... that "better phrasing" suggestion wasn't all that clear; it was about the t.throws() message, not the test() description.

@@ -187,6 +192,8 @@ export const makeExportContext = () => {
* @param {IdTable<number, V>} table
*/
const makeSaver = (kind, table) => {
// XXX table passed in to simplify type inference
assert.equal(table, walletObjects[kind]);
Copy link
Member

Choose a reason for hiding this comment

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

good idea.

@@ -197,6 +204,7 @@ export const makeExportContext = () => {
};

return harden({
saveOfferResultActions: makeSaver('offerResult', walletObjects.offerResult),
Copy link
Member

Choose a reason for hiding this comment

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

The Actions part of this / these names is a little iffy. hm.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. I opted for consistency with the others, but I don't understand why "Actions" is part of any of them. Cool to remove from all?

Copy link
Member

Choose a reason for hiding this comment

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

I think so. @michaelfig ?

are the other 2 used? @samsiegart ?

@@ -17,6 +17,12 @@ import { QuorumRule } from './question.js';

const { ceilDivide } = natSafeMath;

/**
* @typedef {{
* castBallotFor: (questionHandle: Handle<'Question'>, positions: Position[]) => Promise<void>
Copy link
Member

Choose a reason for hiding this comment

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

@Chris-Hibbert I just realized that in order for committee members to be able to put questions as well, the "charter" contract should be a different shape:

Our design for raising debt limits involved using a method on a public facet, which assumed users had access to zoe and E(zoe).getPublicFacet().
https://github.com/Agoric/inter-protocol-bootstrap/blob/56de1ed1821e19828a6f74ff10b7fce27b3f2cb7/vote-raise-debt-limit.js#L177

I think life will be simpler if the new charter contract you're building uses methods on an offer result instead of methods on a public facet.

Copy link
Contributor

Choose a reason for hiding this comment

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

... if the new charter contract you're building ...

There isn't a task corresponding to that description on my radar. Can we make an issue?
I presume we want a variant of econCommitteeCharter that serves PSM only. If the capability to invoke votes is carried by an offer result, should the various committee members each invoke a separate invitation, or is an invitation exercised once in bootstrap, and the offer result handed out from there?

Copy link
Member

Choose a reason for hiding this comment

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

Can we make an issue?

Yes, we can; I more or less expected that was part of "Do The Right Thing" that you said what you had what you need for. The capability to vote is taken care of by the committee contract. My concern here is for posing questions. You're right that this raises a question of how the invitations get to the committee members. I suppose we can use the same mechanism as we did for the voting invitations, but it's worth some thought / discussion.

This was referenced Aug 29, 2022
@turadg
Copy link
Member Author

turadg commented Sep 4, 2022

For now, achieving voting with continuing invitations in #6084

@turadg turadg closed this Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

smart wallet applyMethod (e.g. for voting)
3 participants