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

gov: add metadata field to proposal #10490

Closed
4 tasks
cmwaters opened this issue Nov 3, 2021 · 5 comments · Fixed by #10989
Closed
4 tasks

gov: add metadata field to proposal #10490

cmwaters opened this issue Nov 3, 2021 · 5 comments · Fixed by #10989
Assignees
Labels

Comments

@cmwaters
Copy link
Contributor

cmwaters commented Nov 3, 2021

Summary

Ref: #9438

This is a follow up issue from the original work in replacing proposal Content with an array of sdk.Msg (#9810). Part of this work removes title and description to proposals. The ability for a proposer to not only state their proposal but to be able to justify it is an important aspect of governance. This process is costly on-chain and far better suits being somewhere off-chain where further discussion around the proposal can be accommodated.

Proposal

This topic was discussed in the gov working group. The proposal is to add a forum or metadata field to Proposal that is made from an array of bytes (similar to proposals in the group module). This is serve as a canonicalized reference to the place where the proposal is being discussed, explained and debated. A good example would be as an IPFS CID. Keeping the type abstract means that application developers could deploy their own way of linking the on-chain proposal to the off-chain discussion.

An important consideration is that much of the value in the Cosmos SDK comes from standardized usage which means clients such as wallets and explorers can seamlessly work across multiple chains. It should be on the Cosmos SDK to provide a standardised way that clients can parse the metadata field and query the link to get the following fields: title, description, and authors.

NOTE: This new field has an intended use but given that it is an arbitrary array of bytes could be used for anything else. I think it may be better to be a little more restrictive and add cap the size of field.

cc: @blushi, @aaronc, @hxrts


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@cmwaters cmwaters changed the title gov: gov: add metadata field to proposal Nov 3, 2021
@cmwaters
Copy link
Contributor Author

As discussed in the last gov working group, we want to add a limit to the amount of bytes in this metadata field to mirror the functionality of the groups module. This should be set by application developers in the constructor of the gov module.

Ref: #10972

@amaury1093 amaury1093 self-assigned this Jan 19, 2022
@amaury1093 amaury1093 moved this from Ready to In Progress in Cosmos SDK: Gov & Group WG Jan 21, 2022
@mergify mergify bot closed this as completed in #10989 Jan 25, 2022
Repository owner moved this from In Progress to Done in Cosmos SDK: Gov & Group WG Jan 25, 2022
mergify bot pushed a commit that referenced this issue Jan 25, 2022
## Description

Closes: #10490 




---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
@amaury1093
Copy link
Contributor

After a SIGN_MODE_TEXTUAL call, I'm reviving this issue to discuss if we could change the metadata field from bytes to string?

In TEXTUAL, we'll show bytes as base64-encoded. If we put a url, a JSON blob, an IPFS cid, it won't be human-friendly. Changing metadata from bytes to string would solve this, without losing the flexibility of arbitrary metadata.

Any objections?

@amaury1093 amaury1093 reopened this Feb 21, 2022
@amaury1093 amaury1093 moved this from Done to Ready in Cosmos SDK: Gov & Group WG Feb 21, 2022
@hxrts
Copy link
Contributor

hxrts commented Feb 22, 2022

That sounds right to me. Should also make sure it's consistent with groups metadata encoding.

@blushi blushi assigned atheeshp and unassigned amaury1093 Feb 24, 2022
@blushi
Copy link
Contributor

blushi commented Feb 24, 2022

@atheeshp will work on migrating group/gov metadata fields to string

@amaury1093 amaury1093 moved this from Ready to In Review in Cosmos SDK: Gov & Group WG Feb 28, 2022
mergify bot pushed a commit that referenced this issue Mar 1, 2022
## Description

ref: #10490
[comment](#10490 (comment))



---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
@cmwaters cmwaters moved this from In Review to Done in Cosmos SDK: Gov & Group WG Mar 1, 2022
@cmwaters
Copy link
Contributor Author

cmwaters commented Mar 1, 2022

Completed via #11269

@cmwaters cmwaters closed this as completed Mar 1, 2022
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this issue May 22, 2023
## Description

Closes: cosmos#10490 




---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants