Skip to content

Conversation

@etan-status
Copy link
Contributor

Ethereum signatures are scoped by signing domain to ensure that when data of different types happens to encode as same byte representation that the resulting hash being signed does not collide across domains. This is typically done by prefixing the data with the domain constant before signing it. The following signing domain constants are defined:

  • 0x00: Unused for signing, but represents Homestead tx on JSON-RPC
  • 0x01: EIP-2930 transaction
  • 0x02: EIP-1559 transaction
  • 0x03: EIP-4844 transaction
  • 0x04: EIP-7702 transaction
  • 0x05: EIP-7702 authorization
  • 0x19: EIP-191 signed data
  • 0x80-0xfe: Homestead transaction
  • 0xff: Reserved by EIP-2718

EIP-2718 aliases transaction types to a subset of the signing domains:

  • 0x00 represents a tx but is not used for signing.
  • 0x01-0x04 represent a tx and are used for signing.
  • 0x05 and 0x19 do not represent a tx but are used for signing.
  • 0x80-0xfe represent as 0x00 on JSON-RPC but are used for signing.
  • 0xff is reserved and neither represents a tx nor is used for signing.

To improve simplicity as future transaction types are introduced, it may be desirable to group related constants together.

For that reason, it is proposed to change the signing domain used for EIP-7702 authorization from 0x05 to 0x1a. Rationale:

  • This allows a future transaction type to use type 0x05 sequentially.
  • If transaction types ever enumerate through 0x18, there is already the problem of 0x19 being in use. Therefore, assigning 0x1a to be used for EIP-7702 authorizations does not introduce additional problems beyond what already will have to be dealt with.
  • If a new signature algorithm is introduced, one may still do so by setting the upper bits in the signing domain, e.g., 0x40 or 0x20 are still left untouched if 0x1a is assigned. This is an advantage over, e.g., assigning 0x20 to EIP-7702 authorization signatures.

Ethereum signatures are scoped by signing domain to ensure that when
data of different types happens to encode as same byte representation
that the resulting hash being signed does not collide across domains.
This is typically done by prefixing the data with the domain constant
before signing it. The following signing domain constants are defined:

- 0x00: Unused for signing, but represents Homestead tx on JSON-RPC
- 0x01: EIP-2930 transaction
- 0x02: EIP-1559 transaction
- 0x03: EIP-4844 transaction
- 0x04: EIP-7702 transaction
- 0x05: EIP-7702 authorization
- 0x19: EIP-191 signed data
- 0x80-0xfe: Homestead transaction
- 0xff: Reserved by EIP-2718

EIP-2718 aliases transaction types to a subset of the signing domains:

- 0x00 represents a tx but is not used for signing.
- 0x01-0x04 represent a tx and are used for signing.
- 0x05 and 0x19 do not represent a tx but are used for signing.
- 0x80-0xfe represent as 0x00 on JSON-RPC but are used for signing.
- 0xff is reserved and neither represents a tx nor is used for signing.

To improve simplicity as future transaction types are introduced, it may
be desirable to group related constants together.

For that reason, it is proposed to change the signing domain used for
EIP-7702 authorization from `0x05` to `0x1a`. Rationale:

- This allows a future transaction type to use type 0x05 sequentially.
- If transaction types ever enumerate through 0x18, there is already
  the problem of 0x19 being in use. Therefore, assigning 0x1a to be used
  for EIP-7702 authorizations does not introduce additional problems
  beyond what already will have to be dealt with.
- If a new signature algorithm is introduced, one may still do so by
  setting the upper bits in the signing domain, e.g., 0x40 or 0x20 are
  still left untouched if 0x1a is assigned. This is an advantage over,
  e.g., assigning 0x20 to EIP-7702 authorization signatures.
@etan-status etan-status requested a review from eth-bot as a code owner August 29, 2024 10:04
@github-actions github-actions bot added c-update Modifies an existing proposal s-review This EIP is in Review t-core labels Aug 29, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Aug 29, 2024

File EIPS/eip-7702.md

Requires 1 more reviewers from @adietrichs, @lightclient, @SamWilsn, @vbuterin

@eth-bot eth-bot added the a-review Waiting on author to review label Aug 29, 2024
@lightclient
Copy link
Member

This change is okay to me. Generally indifferent on it.

@Thegaram
Copy link

Thegaram commented Jan 3, 2025

This is a reasonable proposal, is it still being considered? Or has ACD decided against it?

@lightclient
Copy link
Member

@Thegaram I think it should be proposed to ACD again. Last time I think everyone was mostly indifferent.

etan-status added a commit to etan-status/execution-specs that referenced this pull request Mar 14, 2025
EIP-7702 defines transaction type 0x04, and also uses magic 0x05 for
signing authorizations.

Discussion about 0x05 is here:
- ethereum/EIPs#8835
etan-status added a commit to etan-status/execution-specs that referenced this pull request Mar 14, 2025
EIP-7702 defines transaction type 0x04, and also uses magic 0x05 for
signing authorizations.

Discussion about 0x05 is here:
- ethereum/EIPs#8835
SamWilsn pushed a commit to ethereum/execution-specs that referenced this pull request Mar 14, 2025
EIP-7702 defines transaction type 0x04, and also uses magic 0x05 for
signing authorizations.

Discussion about 0x05 is here:
- ethereum/EIPs#8835
Shashwat-Nautiyal pushed a commit to Shashwat-Nautiyal/execution-specs that referenced this pull request Mar 17, 2025
EIP-7702 defines transaction type 0x04, and also uses magic 0x05 for
signing authorizations.

Discussion about 0x05 is here:
- ethereum/EIPs#8835
@github-actions
Copy link

github-actions bot commented Jul 9, 2025

There has been no activity on this issue for six months. It will be closed in 7 days if there is no new activity. If you would like to move this PR forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the w-stale Waiting on activity label Jul 9, 2025
@etan-status
Copy link
Contributor Author

This was shipped to mainnet with 0x05.

Updated documentation to match reality here: https://github.com/ethereum/execution-specs/tree/forks/osaka/lists/signature-types

@etan-status etan-status closed this Jul 9, 2025
@etan-status etan-status deleted the sc-magic branch July 9, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a-review Waiting on author to review c-update Modifies an existing proposal s-review This EIP is in Review t-core w-stale Waiting on activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants