The cli help text for the tx gov submit-proposal includes the following example:
Example:
$ %s tx gov submit-proposal path/to/proposal.json
Where proposal.json contains:
{
// array of proto-JSON-encoded sdk.Msgs
"messages": [
{
"@type": "/cosmos.bank.v1beta1.MsgSend",
"from_address": "cosmos1...",
"to_address": "cosmos1...",
"amount":[{"denom": "stake","amount": "10"}]
}
],
"metadata: "4pIMOgIGx1vZGU=", // base64-encoded metadata
"deposit": "10stake"
"title: "My proposal"
"summary": "A short summary of my proposal",
"expedited": false
}
Here, it specifies the metadata as "base64-encoded".
This can be misleading, as in fact metadata can be any string (e.g. raw text, stringified json, or an IPFS link), not necessarily has to be base64-encoded. The language used may lead users to think that only base64 is accepted.
This issue has been raised recently in separate occasions (once during an audit of Mars Hub chain, once by a community member attempting to submit a proposal).
Proposal
Refine the language used in the help text to make it clear that the metadata field accepts any string.
Problem Definition
The cli help text for the
tx gov submit-proposal
includes the following example:Here, it specifies the
metadata
as "base64-encoded".This can be misleading, as in fact
metadata
can be any string (e.g. raw text, stringified json, or an IPFS link), not necessarily has to be base64-encoded. The language used may lead users to think that only base64 is accepted.This issue has been raised recently in separate occasions (once during an audit of Mars Hub chain, once by a community member attempting to submit a proposal).
Proposal
Refine the language used in the help text to make it clear that the
metadata
field accepts any string.