Skip to content

fix: use correct encoding for L1 data fee of EIP2718 transactions #793

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

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

Thegaram
Copy link

@Thegaram Thegaram commented Jun 3, 2024

1. Purpose or design rationale of this PR

EIP2718 defines the byte encoding as Type || Payload, but EncodeRLP returns an actual RLP array, i.e. it prepends the marshaled result with one or more bytes. We should use MarshalBinary instead. Note: The behavior of EncodeRLP and MarshalBinary is identical for legacy transactions, so this is not a breaking change.

This PR also adds an upper bound on L1DataFee to ensure these values don't overflow in the tracing/circuit code. Technically, this is a breaking change, but in practice such high data fee values never occur on Scroll.

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • fix: A bug fix

3. Deployment tag versioning

Has the version in params/version.go been updated?

  • This PR doesn't involve a new deployment, git tag, docker image tag, and it doesn't affect traces
  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change
  • Yes

0xmountaintop
0xmountaintop previously approved these changes Jun 3, 2024
Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com>
@Thegaram Thegaram merged commit 9ec83a5 into develop Jun 3, 2024
8 checks passed
@Thegaram Thegaram deleted the fix-fix-eip-2718-encoding-for-data-fee branch June 3, 2024 14:24
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