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

Pending approval proposals have mutable approvers #791

Open
NoahSaso opened this issue Dec 25, 2023 · 4 comments
Open

Pending approval proposals have mutable approvers #791

NoahSaso opened this issue Dec 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@NoahSaso
Copy link
Member

NoahSaso commented Dec 25, 2023

The dao-pre-propose-approval-single module only stores a single approver and validates against it when a proposal is approved or rejected. Instead, it should snapshot the current approver when a pending proposal is created by storing it in its object so that it cannot be changed in the middle. This isn't a big deal but is probably a good idea.

Either way, this is important for being able to reference past approvers.

@NoahSaso NoahSaso added the bug Something isn't working label Dec 25, 2023
@ismellike
Copy link
Contributor

Can be implemented as a SnapshotItem from dao-pre-propose-approval-single. When approving, the contract will query for generic proposal info added here to get the proposal's start_height and get the respective approver.

@NoahSaso
Copy link
Member Author

NoahSaso commented May 8, 2024

Can be implemented as a SnapshotItem from dao-pre-propose-approval-single. When approving, the contract will query for generic proposal info added here to get the proposal's start_height and get the respective approver.

Is that better than just storing it in the proposal struct? I like the idea of keeping the information close to the source instead of adding another query. It also removes the need for the frontend to perform an extra query and follows the pattern in the proposal modules where the proposal struct fully defines the config being used.

@ismellike
Copy link
Contributor

Can be implemented as a SnapshotItem from dao-pre-propose-approval-single. When approving, the contract will query for generic proposal info added here to get the proposal's start_height and get the respective approver.

Is that better than just storing it in the proposal struct? I like the idea of keeping the information close to the source instead of adding another query. It also removes the need for the frontend to perform an extra query and follows the pattern in the proposal modules where the proposal struct fully defines the config being used.

We can still avoid an extra query on the frontend by returning a ProposalResponse (Proposal + Approver) instead of just Proposal from query. If we can fight state bloat, I think we should.

@NoahSaso
Copy link
Member Author

NoahSaso commented May 8, 2024

Can be implemented as a SnapshotItem from dao-pre-propose-approval-single. When approving, the contract will query for generic proposal info added here to get the proposal's start_height and get the respective approver.

Is that better than just storing it in the proposal struct? I like the idea of keeping the information close to the source instead of adding another query. It also removes the need for the frontend to perform an extra query and follows the pattern in the proposal modules where the proposal struct fully defines the config being used.

We can still avoid an extra query on the frontend by returning a ProposalResponse (Proposal + Approver) instead of just Proposal from query. If we can fight state bloat, I think we should.

Alright :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants