Skip to content
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

specs: Specify derivation of future tx types #518

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

sebastianst
Copy link
Member

Description

Clarifies how to deal with 7702 and future transactions.

  • batcher tx must be of type 0-3, or 0x7e, but not 4, that is, 7702 txs.
  • we allow 7702 txs, and possibly other future txs with similarly encoded logs, for user deposits on L1 and SystemConfig configuration tx

Metadata

Part of ethereum-optimism/optimism#13627

specs/protocol/derivation.md Outdated Show resolved Hide resolved
specs/protocol/system-config.md Outdated Show resolved Hide resolved
Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

LGTM.

Maybe consider clarifying "best-effort receipt decoding" as "ignore the tx-type prefix-byte of the RLP payload, and decode the RLP like the receipt-type that is used for for types 0, 1, 2, 3, 4.

Also maybe clarify that TX-type != prefix byte. Legacy transactions, and receipts also (!), have a range of prefix byte values, and not really an actual prefix byte but part of the RLP payload itself, that all effectively map to "legacy", and represented as type 0.

@geoknee
Copy link
Contributor

geoknee commented Jan 17, 2025

I think it would be good to reference https://eips.ethereum.org/EIPS/eip-2718.

In implementation work so far I have been making a distinction between:

  • explicitly supported EIP 2718 tx (fully parsed)
  • not explicitly supported EIP 2718 tx (treated as "opaque" and only the tx type and hash is parsed)
  • non-EIP 2718 tx (not parsed at all, causes an error / panics). An example is when the first byte is out of range, e.g. > 0x7f.

@sebastianst
Copy link
Member Author

Thanks @protolambda @geoknee I agree that a specific reference to EIP-2718 is helpful here. I've completely rewritten the spec and came up with a process that feels much more clearly defined. PTAL.

specs/protocol/derivation.md Outdated Show resolved Hide resolved
specs/protocol/derivation.md Outdated Show resolved Hide resolved
specs/protocol/derivation.md Outdated Show resolved Hide resolved
specs/protocol/derivation.md Outdated Show resolved Hide resolved
specs/protocol/derivation.md Show resolved Hide resolved
specs/protocol/derivation.md Show resolved Hide resolved
@sebastianst sebastianst force-pushed the seb/7702-and-future-tx-handling branch from 1a4d093 to d541af1 Compare January 17, 2025 18:34
@sebastianst sebastianst requested a review from geoknee January 17, 2025 18:59
@sebastianst sebastianst merged commit d543e3f into main Jan 17, 2025
1 check passed
@sebastianst sebastianst deleted the seb/7702-and-future-tx-handling branch January 17, 2025 19:21
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