-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Governance API: The Proposal JSON response does not include who submitted the proposal #3027
Comments
strongly agree with @johnmcdowall here. also on his desire to move to the Yukon. |
/cc @sunnya97 is there a reason we don't include the proposer? |
We decided not to store the proposer primarily because it's the substance of a proposal that is important, not the identity of the proposer 😉. However, the proposer will usually put down a portion of the deposit themselves, and we should highlight anyone who wants to put monetary stake (deposit) behind a proposal, not just the proposer of it. |
So technically if you query the the first proposal deposit you can get the proposer with the |
i'm not sure i understand why we need to make this kind of decision at the SDK level. both the proposal and it's associated data are important and may be relevant to some users in some use cases. some UIs might agree with you and make the choice not expose the proposers information, while others may decide for their use case it would be best to expose this information. |
Not quite, because the deposits in state are just put lexigraphically by depositer address, not by time. If you really wanted to know who submitted the proposal, you could see who submitted the tx by doing a tx query rather than a state query.
That's a fair point. The reason I made the decision at the SDK level to not include the proposer is that it isn't used anywhere in the state machine logic, so it didn't make sense to store it in state, as that is additional storage data that isn't necessary. Do you think it's really necessary enough to burden all nodes with storing that data, or would it be sufficient for UIs that want to show the proposer to get it through a tx query. Tbh, I prefer not to store it in state, but don't care too strongly about this. |
I would second this. I do think that in our UIs where we can choose whether or not to show the proposer address, we should elect not to show it. Proposers who wish to self-identify can do so in the proposal text. |
@cwgoes A lot of users want to know who has submitted a given proposal. You're not protecting anything by not displaying it, it's just bad UX and pointless obfuscation. @sunnya97 It comes down to what is the point of LCD and its API? This is basic information, that does not cost a lot to store, or at the very least if it's not stored LCD should take care of finding and assembling the information for the proper API response. Several times now you've given me the answer of 'just query the TX' without acknowledging that LCD is supposed to reduce those kinds of scenarios, or even in the case of the deposit API returning nil after voting period has closed HOW to perform such a query when the block height isn't even returned as part of the response. If this is not the role that LCD is supposed to perform then I think the team needs to have a clear statement about what IS the purpose of LCD, because right now a lot of the APIs seem to give half responses that can't be semantically linked together as one would expect with any proper API. |
@johnmcdowall love your statement! I think we need a proper description of purpose for the LCD. I will take the feedback and bring it up with the maintaining teams. |
The choice of what information to show in a UI definitely influences what users will do with the interface, and in particular which information they will consider in voting on proposals. Personally, I think that we want to minimize the importance of the identity of the proposer, and maximize the importance of the content of the proposal. Other UI implementers may make different decisions (and the Voyager team may well disagree with me!). On the SDK side, since it's certainly possible to query the transaction submitting the proposal and return the proposer address, I agree that not implementing an endpoint exposing it would amount to "pointless obfuscation" - so let's do that. |
@faboweb Totally understand things are chaotic right now. I just feel it's important to challenge these tacit decisions before things become concrete and we end up paying the cost of needing an Infura to do basic things ;) |
So what is the exact consensus on the actionable item(s) here? PR #3091 fixes/adds some tags, namely you can get the tx where the proposal was created via Are we looking to implement another endpoint here? |
A new endpoint that wraps the tags process, say |
Also, @alexanderbez if you are willing to add that API endpoint I will also be willing to use your work as the foundation for adding APIs to get the historical votes and deposits per #2880, unless you want to tackle that at the same time. EDIT: Oops, missed #3091. Nice! |
I would be more than happy to implement that API endpoint ( Would like further thoughts if this is OK from @fedekunze, @faboweb or @jackzampolin. |
@alexanderbez Lets do that, but ideally it just gets added to the original endpoint. If that requires extensive mods to the exiting endpoint then I don't have an issue exposing it like you mention there. |
Well, we'd have to modify the proposal structs I imagine. At that point we might as well keep it in state... |
Ok, I'm going to implement this endpoint using a tx query under the hood. |
@alexanderbez Why would we have to modify the original proposal structs to do a tx query? |
@sunnya97 sorry, misunderstanding. We'd have to modify the proposal structs in order to get the existing endpoint to display this data. I'm suggesting we don't do that ;-) |
Summary of Bug
The API response for calling
proposal
does not include who submitted the proposal. That would be useful information to know.Steps to Reproduce
For Admin Use
The text was updated successfully, but these errors were encountered: