-
Notifications
You must be signed in to change notification settings - Fork 836
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
imp(ante): MonoAnteHandler for EVM transactions #2028
Conversation
return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil)) | ||
} | ||
|
||
txIdx := uint64(i) // nosec: G701 |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion Error
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2028 +/- ##
==========================================
- Coverage 70.42% 70.17% -0.25%
==========================================
Files 344 353 +9
Lines 25655 25948 +293
==========================================
+ Hits 18067 18210 +143
- Misses 6654 6792 +138
- Partials 934 946 +12
|
Added benchmarking tests to the PR which could also be done through another PR but the results where very good actually. The relvant results to look at are the ones for EVM which are the ones impacted by this PR. Its a 15% increase in time/operation and ~30% increase on memory allocation efficiency with the current changes. To tests locally run:
|
Some tests are failing when using the mono ante handler.. still not ready for review. Will try to fix those early tomorrow |
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't get to fully review before it was merged but LGTM only a few nits.
@@ -27,7 +26,7 @@ func NewAnteHandler(options HandlerOptions) sdk.AnteHandler { | |||
switch typeURL := opts[0].GetTypeUrl(); typeURL { | |||
case "/ethermint.evm.v1.ExtensionOptionsEthereumTx": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: define these strings as constants on top of the file?
return next(ctx, tx, simulate) | ||
} | ||
|
||
// For dynamic transactions, GetFee() uses the GasFeeCap value, which |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// For dynamic transactions, GetFee() uses the GasFeeCap value, which | |
// CheckGlobalFee - For dynamic transactions, GetFee() uses the GasFeeCap value, which |
return gasWanted, minPriority, nil | ||
} | ||
|
||
// deductFee checks if the fee payer has enough funds to pay for the fees and deducts them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// deductFee checks if the fee payer has enough funds to pay for the fees and deducts them. | |
// DeductFee checks if the fee payer has enough funds to pay for the fees and deducts them. |
Description
Closes #XXX