!feat(evm): Reject not replay-protected tx to prevent replay attack (#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>
This commit is contained in:
yihuang
2022-06-13 09:41:53 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent 82835307c7
commit 8f932ddc6a
19 changed files with 4371 additions and 119 deletions
+2
View File
@@ -227,6 +227,7 @@ Params defines the EVM module parameters
| `enable_call` | [bool](#bool) | | enable call toggles state transitions that use the vm.Call function |
| `extra_eips` | [int64](#int64) | repeated | extra eips defines the additional EIPs for the vm.Config |
| `chain_config` | [ChainConfig](#ethermint.evm.v1.ChainConfig) | | chain config defines the EVM chain configuration parameters |
| `reject_unprotected_tx` | [bool](#bool) | | reject replay-unprotected transactions |
@@ -443,6 +444,7 @@ DynamicFeeTx is the data of EIP-1559 dinamic fee transactions.
### LegacyTx
LegacyTx is the transaction data of regular Ethereum transactions.
NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the RejectUnprotectedTx parameter is enabled.
| Field | Type | Label | Description |