-
Notifications
You must be signed in to change notification settings - Fork 241
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
Problem: tx hash may be incorrect in event parsing #595
Problem: tx hash may be incorrect in event parsing #595
Conversation
Solution: - Due to bug evmos/ethermint#1175, the first `ethereum_tx` event emitted in ante handler may be incorrect, Althrough the root casue is fixed, but to avoid resync we can do a workaround in event parsing to override with the second one.
Verified in production. |
we don't validate other fields like |
do you mean this PR #584, |
I mean in for _, msg := range protoTx.GetMsgs() {
msgEthTx, ok := msg.(*evmtypes.MsgEthereumTx)
if !ok {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil))
}
// Validate `From` field
if msgEthTx.From != "" {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid From %s, expect empty string", msgEthTx.From)
}
txGasLimit += msgEthTx.GetGas()
... https://github.com/evmos/ethermint/blob/main/app/ante/eth.go#L436-L438 |
|
Solution:
ethereum_tx
event emitted in ante handler may be incorrect,Althrough the root casue is fixed, but to avoid resync we can do a workaround in event parsing to override with the second one.
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)