Skip to content

Conversation

@webmaster128
Copy link
Member

Closes #848

@webmaster128 webmaster128 requested a review from ethanfrey April 13, 2021 15:10
Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Looks good, nice comments.
I would just like to ensure these hide behind the staking feature flag

},
}

/// The message types of the distribution module.
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks good.

// to call into more app-specific code (whatever they define)
Custom(T),
Staking(StakingMsg),
Distribution(DistributionMsg),
Copy link
Contributor

Choose a reason for hiding this comment

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

Once upon a time, StakingMsg was feature gated under #[cfg(feature = "staking")]. I think it should be again, and same with DistributionMsg. This means that every contract that uses them is forced to expose the requires_staking export flag and then can fail on upload to chains without PoS (I expect some PoA chains and PoE chains to use CosmWasm without staking and delegation).

Copy link
Member Author

@webmaster128 webmaster128 Apr 14, 2021

Choose a reason for hiding this comment

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

It was introduced in #300 and at some point along the way we decided to remove it at least for messages. I don't member why. Maybe it was related to the exhaustive/non-exhaustive and related trouble on the enum. But since it works well for the stargate flag now, I'll just try to add it again.

@webmaster128
Copy link
Member Author

Yeah, makes sense, will update

Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Okay, #878 makes sense

If you rebase on that and do the same for DistributionMsg, then this is good to merge.

@webmaster128 webmaster128 added the automerge See mergify.io label Apr 14, 2021
@mergify mergify bot merged commit afbd217 into main Apr 14, 2021
@mergify mergify bot deleted the split-withdraw branch April 14, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge See mergify.io

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StakingMsg::Withdraw has unintended side-effect

3 participants