Skip to content

chore: implement serde_bincode_compat for envelope#486

Merged
mattsse merged 2 commits intoalloy-rs:mainfrom
shane-moore:chore/transaction-bincode-compat
Apr 3, 2025
Merged

chore: implement serde_bincode_compat for envelope#486
mattsse merged 2 commits intoalloy-rs:mainfrom
shane-moore:chore/transaction-bincode-compat

Conversation

@shane-moore
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

great!

/// Transaction signature.
signature: Signature,
/// Borrowed EIP-1559 transaction data.
#[serde(borrow)]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ah nice, this way we dont neven need a cow, never thought about this and now I feel stupid :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Super cool, right!

@github-project-automation github-project-automation bot moved this to In Review in Project Tracking Apr 3, 2025
@mattsse mattsse added this pull request to the merge queue Apr 3, 2025
Merged via the queue into alloy-rs:main with commit 27a0bc5 Apr 3, 2025
@github-project-automation github-project-automation bot moved this from In Review to Done in Project Tracking Apr 3, 2025
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
…#486)

- This PR also helps close out
paradigmxyz/reth#15377
- Related implementation: alloy-rs/alloy#2263
- Running test via `cargo test --features "serde serde-bincode-compat
arbitrary k256" test_op_tx_envelope_bincode_roundtrip_arbitrary` shows
successful test. Please lmk if it's robust enough or if there's some
pointers to make this implementation more extensive 🤙
- Note that you'll need `alloy-consensus = { workspace = true, features
= ["serde", "serde-bincode-compat" ] }` and `[features]
default = ["std", "serde", "serde-bincode-compat", "arbitrary"]` in the
`Cargo.toml`

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
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.

2 participants