Skip to content

feat: re-use tx validation rules from go-ethereum #286

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented Jul 15, 2025

Description

there are a few rules in go-ethereum tx validation function seems not covered, we can reuse it directly, some validations rules are overlapped, we can optimize later.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

Reviewers Checklist

All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code
  • reviewed content
  • tested instructions (if applicable)
  • confirmed all CI checks have passed

@@ -126,6 +151,7 @@ func (md MonoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
// 5. signature verification
if err := SignatureVerification(
ethMsg,
ethTx,
Copy link
Contributor Author

@yihuang yihuang Jul 15, 2025

Choose a reason for hiding this comment

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

the reason for this, is ethTx caches the sender recovery result, so we avoid duplicate signature verification efforts by reuse the object.

@aljo242
Copy link
Contributor

aljo242 commented Jul 21, 2025

@yihuang can you please link an existing github issue for this? If one does not exist, feel free to create one. We want to ensure that all PRs have an associated issue for context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants