diff --git a/x/gov/spec/08_metadata.md b/x/gov/spec/08_metadata.md new file mode 100644 index 000000000000..fcd161c76c6c --- /dev/null +++ b/x/gov/spec/08_metadata.md @@ -0,0 +1,30 @@ + + +# 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": "", +} +``` \ No newline at end of file diff --git a/x/gov/spec/README.md b/x/gov/spec/README.md index f0e1af55fb05..3a5a2decf758 100644 --- a/x/gov/spec/README.md +++ b/x/gov/spec/README.md @@ -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) diff --git a/x/group/spec/06_metadata.md b/x/group/spec/06_metadata.md new file mode 100644 index 000000000000..27108673557e --- /dev/null +++ b/x/group/spec/06_metadata.md @@ -0,0 +1,52 @@ + + +# 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": "", +} +``` \ No newline at end of file diff --git a/x/group/spec/README.md b/x/group/spec/README.md index a97a12fe724c..362a56e7016c 100644 --- a/x/group/spec/README.md +++ b/x/group/spec/README.md @@ -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) \ No newline at end of file