Closed rootulp closed 3 days ago
app/ante/msg_gatekeeper.go (2)
`52-57`: Add a comment explaining the version-specific behavior for nested `MsgExec`. This change successfully implements the logic to reject nested `MsgExec` messages for app version 2 and above. Consider adding a comment here to explain why this version-specific behavior is necessary, as it helps maintain clarity for future maintainers. --- `73-82`: Ensure comprehensive testing for `hasNestedMsgExec` method. The implementation of `hasNestedMsgExec` looks correct and aligns with the PR's objectives to prevent nested `MsgExec` messages. However, ensure that this method is thoroughly tested, especially considering different nesting scenarios and edge cases.app/ante/msg_gatekeeper_test.go (2)
`19-38`: Update the test setup to reflect the new logic for nested `MsgExec`. The setup for the test cases has been appropriately adjusted to include a new variable `nestedMsgExec` and an updated `acceptedList` map. This setup is crucial for testing the new logic introduced in the `MsgVersioningGateKeeper`. --- `148-209`: Ensure `TestIsAllowed` covers all relevant cases. `TestIsAllowed` is a new function introduced to test message acceptance based on application versions. Make sure this function covers all relevant cases and accurately reflects the behavior defined in the `MsgVersioningGateKeeper`. This includes testing with messages that are not explicitly listed in the `acceptedList` to ensure they are correctly rejected.
Closing this as won't do for now. Needs more investigation so created https://github.com/celestiaorg/celestia-app/issues/3609
Closes https://github.com/celestiaorg/celestia-app/issues/3586
cc: @Reecepbcups