Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

consortium-v2: fix the system transaction's sender check in ApplyTransaction #405

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

minh-bq
Copy link
Collaborator

@minh-bq minh-bq commented Feb 20, 2024

  • consortium-v2: check that sender of system transaction is EOA

Following EIP-3607 ("Reject transactions from senders with deployed code"), if
the sender of transaction has deployed code (not an EOA), the transaction is
rejected. This commit adds the same check to system transaction.

  • consortium-v2: cleanup the check of system transaction's sender with coinbase

Currently, the system transaction's sender check looks weird, it still allows
that sender is different from coinbase. However, the sender is checked to be
equal to coinbase in IsSystemMessage already, so there must be no issue here.
This commit fixes that check in ApplyTransaction, we keep this check to make it
more explicit though the check is redundant.

Following EIP-3607 ("Reject transactions from senders with deployed code"), if
the sender of transaction has deployed code (not an EOA), the transaction is
rejected. This commit adds the same check to system transaction.
…coinbase

Currently, the system transaction's sender check looks weird, it still allows
that sender is different from coinbase. However, the sender is checked to be
equal to coinbase in IsSystemMessage already, so there must be no issue here.
This commit fixes that check in ApplyTransaction, we keep this check to make it
more explicit though the check is redundant.
@minh-bq minh-bq force-pushed the fix/eoa-check-system-tx branch from 4970e78 to 4539c1a Compare February 21, 2024 08:27
@minh-bq minh-bq merged commit ffa7eab into axieinfinity:master Mar 6, 2024
1 check passed
@minh-bq minh-bq deleted the fix/eoa-check-system-tx branch March 6, 2024 03:41
Francesco4203 pushed a commit to Francesco4203/ronin that referenced this pull request Jun 18, 2024
…saction (axieinfinity#405)

* consortium-v2: check that sender of system transaction is EOA

Following EIP-3607 ("Reject transactions from senders with deployed code"), if
the sender of transaction has deployed code (not an EOA), the transaction is
rejected. This commit adds the same check to system transaction.

* consortium-v2: cleanup the check of system transaction's sender with coinbase

Currently, the system transaction's sender check looks weird, it still allows
that sender is different from coinbase. However, the sender is checked to be
equal to coinbase in IsSystemMessage already, so there must be no issue here.
This commit fixes that check in ApplyTransaction, we keep this check to make it
more explicit though the check is redundant.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants