Skip to content
Cosmopediaby Unity Nodes
DiscussionsConversationOne proposal can lift a module's limit and use it in the same blockForum ↗

One proposal can lift a module's limit and use it in the same block

Conversation1 posts6 viewsLast activity 1h ago
ZE
ZealynxOP
1h ago

When a module limits what governance can do with it, a cap on what a treasury pays out per week or a list of addresses a reserve is allowed to pay, the easy place for that limit is the module’s params. The authority for `MsgUpdateParams` is then the same gov account the limit is meant to hold back. That came up in the Luggom thread here in October, and the fix was in their repo the same day. I think it’s general enough for its own topic, because it’s easy to miss when you read the module on its own. What x/gov does when a proposal passes In SDK v0.53.8, the version Gaia v29 runs, the gov EndBlocker tallies the vote and, if it passed, opens one cached context and runs the proposal’s messages in the order they were submitted ( abci.go L166-L217 ). Every message sees what the ones before it wrote. If one fails, nothing is written and the proposal is marked failed. So a proposal with a `MsgUpdateParams` that adds a payee or raises the cap, followed by the spend, passes the module’s check in the same block. Nothing runs before the vote either. At submission `SubmitProposal` runs each message’s `ValidateBasic`, checks that its only signer is the gov account and that the router…

Excerpt (1197 of 3325 characters). Read the whole post on the forum ↗

← Back to Discussions