From d67f23b211c97d4b77cf4ce1dc2e5310c0e6e87b Mon Sep 17 00:00:00 2001 From: hxrts Date: Thu, 1 Sep 2022 09:40:51 +0200 Subject: [PATCH] adds gov groups metadata spec --- x/gov/spec/08_metadata.md | 30 +++++++++++++++++++++ x/gov/spec/README.md | 3 +++ x/group/spec/06_metadata.md | 52 +++++++++++++++++++++++++++++++++++++ x/group/spec/README.md | 5 ++++ 4 files changed, 90 insertions(+) create mode 100644 x/gov/spec/08_metadata.md create mode 100644 x/group/spec/06_metadata.md 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