Skip to content

Commit

Permalink
reject invalid MsgEthereumTx wrapping tx in a non-breaking way
Browse files Browse the repository at this point in the history
Update CHANGELOG.md
  • Loading branch information
yihuang committed Dec 17, 2021
1 parent 6defb50 commit 60af027
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,22 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Unreleased

## [v0.7.2-cronos-6] - 2021-12-17

### Bug Fixes

- [crypto-org-chain/ethermint#]() reject invalid `MsgEthereumTx` wrapping tx in a non-breaking way

## [v0.7.2-cronos-5] - 2021-12-16

### Bug Fixes

- [crypto-org-chain/ethermint#35](https://github.com/crypto-org-chain/ethermint/pull/35) fix empty topics in a non-breaking way

## [v0.7.2-cronos-4] - 2021-11-30

### Bug Fixes

- [crypto-org-chain/ethermint#19](https://github.com/crypto-org-chain/ethermint/pull/19) revert tharsis#786 because it contains consensus breaking changes


Expand Down
12 changes: 12 additions & 0 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ func NewAnteHandler(

// handle as totally normal Cosmos SDK tx

// Reject MsgEthereumTx here
if ctx.IsCheckTx() { // only fix checkTx to keep it non-breaking
for _, msg := range tx.GetMsgs() {
if _, ok := msg.(*evmtypes.MsgEthereumTx); ok {
return ctx, sdkerrors.Wrapf(
sdkerrors.ErrInvalidType,
"MsgEthereumTx needs to be contained within a tx with ExtensionOptionsEthereumTx option",
)
}
}
}

switch tx.(type) {
case sdk.Tx:
anteHandler = sdk.ChainAnteDecorators(
Expand Down

0 comments on commit 60af027

Please sign in to comment.