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

docs: adds gov groups metadata spec #13118

Merged
merged 2 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions x/gov/spec/08_metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
order: 8
-->

# Metadata

The gov module has two locations for metadata where users can provide further context about the on-chain actions they are taking. By default all metadata fields have a 255 character length field where metadata can be stored in json format, either on-chain or off-chain depending on the amount of data required. Here we provide a recommendation for the json structure and where the data should be stored. There are two important factors in making these recommendations. First, that the gov and group modules are consistent with one another, note the number of proposals made by all groups may be quite large. Second, that client applications such as block explorers and governance interfaces have confidence in the consistency of metadata structure accross chains.

## Proposal
Location: off-chain as json object stored on IPFS (mirrors [group proposal](../../group/spec/06_metadata.md#proposal))

```json
{
"title": "",
"authors": "",
"summary": "",
"details": "",
"proposalForumURL": "",
"voteOptionContext": "",
}
```

## Vote
Location: on-chain as json within 255 character limit (mirrors [group vote](../../group/spec/06_metadata.md#vote))

```json
{
"justification": "",
}
```
3 changes: 3 additions & 0 deletions x/gov/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ staking token of the chain.
* [CLI](07_client.md#cli)
* [gRPC](07_client.md#grpc)
* [REST](07_client.md#rest)
8. **[Metadata](08_metadata.md)**
* [Proposal](08_metadata.md#proposal)
* [Vote](08_metadata.md#vote)
52 changes: 52 additions & 0 deletions x/group/spec/06_metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
order: 6
-->

# Metadata

The group module has four locations for metadata where users can provide further context about the on-chain actions they are taking. By default all metadata fields have a 255 character length field where metadata can be stored in json format, either on-chain or off-chain depending on the amount of data required. Here we provide a recommendation for the json structure and where the data should be stored. There are two important factors in making these recommendations. First, that the group and gov modules are consistent with one another, note the number of proposals made by all groups may be quite large. Second, that client applications such as block explorers and governance interfaces have confidence in the consistency of metadata structure accross chains.

## Proposal
Location: off-chain as json object stored on IPFS (mirrors [gov proposal](../../gov/spec/08_metadata.md#proposal))

```json
{
"title": "",
"authors": "",
"summary": "",
"details": "",
"proposalForumURL": "",
"voteOptionContext": "",
}
```

## Vote
Location: on-chain as json within 255 character limit (mirrors [gov vote](../../gov/spec/08_metadata.md#vote))

```json
{
"justification": "",
}
```

## Group
Location: off-chain as json object stored on IPFS

```json
{
"name": "",
"description": "",
"groupWebsiteURL": "",
"groupForumURL": "",
}
```

## Decision policy
Location: on-chain as json within 255 character limit

```json
{
"name": "",
"description": "",
}
```
5 changes: 5 additions & 0 deletions x/group/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,8 @@ This module allows the creation and management of on-chain multisig accounts and
* [CLI](05_client.md#cli)
* [gRPC](05_client.md#grpc)
* [REST](05_client.md#rest)
6. **[Metadata](06_metadata.md)**
* [Proposal](06_metadata.md#proposal)
* [Vote](06_metadata.md#vote)
* [Group](06_metadata.md#group)
* [Decision policy](06_metadata.md#decision%20policy)