Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

enforce eip-155 to protect against replay #1122

Closed
yihuang opened this issue Jun 10, 2022 · 1 comment · Fixed by #1124
Closed

enforce eip-155 to protect against replay #1122

yihuang opened this issue Jun 10, 2022 · 1 comment · Fixed by #1124
Labels
C:x/evm EVM module

Comments

@yihuang
Copy link
Contributor

yihuang commented Jun 10, 2022

Proposal: enforce eip-155 to protect against replay

Current behavior:

Right now, non-eip155 txs are still accepted, which opens room for replaying old ethereum tx on ethermint, similar to what happened on optimism recently.

Desired behavior:

Reject those txs and close the room for a potential attack.

Use case: [Why is this important (helps with prioritizing requests)]

Requests may be closed if we're not actively planning to work on them.

@fedekunze
Copy link
Contributor

fedekunze commented Jun 10, 2022

Agree, we introduce a parameter in the EVM to disable the LegacyTx type. This should be checked in the AnteHandler so that the user doesn't spend gas

@fedekunze fedekunze added the C:x/evm EVM module label Jun 10, 2022
yihuang added a commit to yihuang/ethermint that referenced this issue Jun 10, 2022
Closes: evmos#1122

- reject such txs in ante handler
yihuang added a commit to yihuang/ethermint that referenced this issue Jun 13, 2022
Closes: evmos#1122

- reject such txs in ante handler

add reject unprotected parameter

Update CHANGELOG.md

Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

pr suggestions

add unit test case

use var
fedekunze added a commit that referenced this issue Jun 13, 2022
…1124)

* Reject not replay-protected tx to prevent replay attack

Closes: #1122

- reject such txs in ante handler

* add reject unprotected parameter

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* pr suggestions

* add unit test case

* Reject not replay-protected tx to prevent replay attack

Closes: #1122

- reject such txs in ante handler

add reject unprotected parameter

Update CHANGELOG.md

Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

pr suggestions

add unit test case

use var

* add migrations

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* rename

* update comments

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
devon-chain pushed a commit to FunctionX/ethermint that referenced this issue Jun 20, 2022
…vmos#1124)

* Reject not replay-protected tx to prevent replay attack

Closes: evmos#1122

- reject such txs in ante handler

* add reject unprotected parameter

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* pr suggestions

* add unit test case

* Reject not replay-protected tx to prevent replay attack

Closes: evmos#1122

- reject such txs in ante handler

add reject unprotected parameter

Update CHANGELOG.md

Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

pr suggestions

add unit test case

use var

* add migrations

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* rename

* update comments

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C:x/evm EVM module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants