Skip to content

Commit

Permalink
docs: adds gov groups metadata spec (#13118)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6d6b804)
  • Loading branch information
hxrts authored and mergify[bot] committed Sep 13, 2022
1 parent 70943c6 commit bd2d988
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
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)

0 comments on commit bd2d988

Please sign in to comment.