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

add method that returns the organizationId given the avatar address #554

Open
dkent600 opened this issue Oct 10, 2018 · 2 comments
Open

Comments

@dkent600
Copy link
Contributor

Two GenesisProtocol methods require an organizationId as an argument: threshold and getBoostedProposalsCount. However, the only way to obtain the organizationId is via getProposalOrganization which requires a proposalId. There should be a higher-level way to obtain the organizationId for a scheme.

The application should not be required to know how to compute the organizationId itself -- this would be extra unnecessary work for every application, extra documentation/training for Arc, and would cause duplication of internal contract logic that should be kept encapsulated within the contract.

It seems that if functions like threshold and getBoostedProposalsCount are now to be scoped to the organizationId, which is itself scoped to each scheme that is using the GP, then each scheme should expose a method that returns the organizationId.

Thus I propose that each proposal-generating scheme in Arc provide a method that returns the organizationId associated with it, given an avatar address as a singe argument.

This new method would be a part of IntVoteInterface and would be implemented in infra by GenesisProtocol and AbsoluteVote.

@orenyodfat
Copy link
Contributor

It should and can be done on the client side.

@dkent600
Copy link
Contributor Author

dkent600 commented Oct 10, 2018

I would agree that the client should compute the id if the client were responsible for creating the id, but it isn't, AV and GP are. Why do you think the client "should" be responsible, given the arguments I've made to the contrary above?

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

No branches or pull requests

2 participants