Skip to content

fix: simplify OpExecutionPayload numeric field deserialization#568

Merged
mattsse merged 1 commit intomainfrom
fix-op-execution-payload-deser
Jul 10, 2025
Merged

fix: simplify OpExecutionPayload numeric field deserialization#568
mattsse merged 1 commit intomainfrom
fix-op-execution-payload-deser

Conversation

@mattsse
Copy link
Copy Markdown
Member

@mattsse mattsse commented Jul 10, 2025

Simplifies the deserialization of numeric fields in OpExecutionPayload by directly deserializing them as U64 values instead of going through string deserialization with alloy_serde::quantity::deserialize.

The following fields are affected:

  • block_number
  • gas_limit
  • gas_used
  • timestamp
  • blob_gas_used
  • excess_blob_gas

This change:

  • Removes unnecessary string allocations during deserialization
  • Simplifies the code by removing the IntoDeserializer dependency
  • Aligns with similar fixes made in the main alloy repository

Related to alloy-rs/alloy#2684

Directly deserialize numeric fields as U64 instead of going through
string deserialization with alloy_serde::quantity. This simplifies
the code and removes unnecessary string allocations during deserialization.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mattsse mattsse merged commit 930f8c3 into main Jul 10, 2025
21 checks passed
@mattsse mattsse deleted the fix-op-execution-payload-deser branch July 10, 2025 12:10
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
…-rs/op-alloy#568)

Simplifies the deserialization of numeric fields in `OpExecutionPayload`
by directly deserializing them as `U64` values instead of going through
string deserialization with `alloy_serde::quantity::deserialize`.

The following fields are affected:
- `block_number`
- `gas_limit`
- `gas_used`
- `timestamp`
- `blob_gas_used`
- `excess_blob_gas`

This change:
- Removes unnecessary string allocations during deserialization
- Simplifies the code by removing the `IntoDeserializer` dependency
- Aligns with similar fixes made in the main alloy repository

Related to alloy-rs/alloy#2684

Co-authored-by: Claude <noreply@anthropic.com>
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.

1 participant