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

chore: update gov metadata length from 256 to 10200 #7243

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

PaddyMc
Copy link
Collaborator

@PaddyMc PaddyMc commented Jan 4, 2024

What is the purpose of the change

Update the metadata length to 10200, to enable longer summaries and titles for gov proposals

see:
https://github.com/osmosis-labs/cosmos-sdk/blob/osmo/v0.47.5/x/gov/keeper/proposal.go#L17-L32

&&

https://github.com/osmosis-labs/cosmos-sdk/blob/osmo/v0.47.5/x/gov/keeper/keeper.go#L222-L229

Testing and Verifying

  • start a node and submit a gov transaction with longer metadata
BASE64_METADATA=$(echo -n '{
	"authors": [""],
	"details": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
	"proposal_forum_url": "",
	"vote_option_context": ""
}' | base64 -w 0)

echo '{
  "messages": [
    {
      "@type": "/cosmos.bank.v1beta1.MsgSend",
      "from_address": "'"$GOVMODULEACC"'",
      "to_address": "'$ADDRESS1'",
      "amount": [{"denom": "uosmo", "amount": "1000000"}]
    }
  ],
  "metadata": "'"$BASE64_METADATA"'",
  "deposit": "3000000000uosmo",
  "title": "My Latest pro proposal",
  "summary": "A short summary of my proposal",
  "expedited": true
}' > proposal.json

# submit-proposal: Submit a proposal along with some messages, metadata and deposit
tx_result=$(osmosisd tx gov submit-proposal proposal.json $OPTS $SENDER -y --output json | jq .txhash)
echo $tx_result 

Documentation and Release Note

  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@PaddyMc PaddyMc added C:x/gov V:state/breaking State machine breaking PR labels Jan 4, 2024
@github-actions github-actions bot added the C:app-wiring Changes to the app folder label Jan 4, 2024
Copy link
Member

@mattverse mattverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@mattverse
Copy link
Member

On the second thought, do you think this change should be fine in terms of state size increase? ( I think this should be fine.. just wanted to mention for sanity check before we merge this!)

@PaddyMc
Copy link
Collaborator Author

PaddyMc commented Jan 5, 2024

On the second thought, do you think this change should be fine in terms of state size increase? ( I think this should be fine.. just wanted to mention for sanity check before we merge this!)

This just returns the value to what it was pre-0.47.x upgrade 👍

@ValarDragon
Copy link
Member

yeah its just 10kb

@mergify mergify bot merged commit 450f757 into main Jan 5, 2024
3 checks passed
@mergify mergify bot deleted the fix/gov-metadata-config branch January 5, 2024 22:10
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
@github-actions github-actions bot mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge C:app-wiring Changes to the app folder C:x/gov V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants