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

Fix Log serde for non self describing protocols #639

Merged
merged 4 commits into from
May 31, 2024
Merged

Fix Log serde for non self describing protocols #639

merged 4 commits into from
May 31, 2024

Conversation

kpp
Copy link
Contributor

@kpp kpp commented May 30, 2024

Log flattens data for serde, which is an issue for a non self describing protocols as bcs and bincode. Without this fix test will fail with:

  1. bcs:
---- log::tests::test_bcs_encode_decode stdout ----
thread 'log::tests::test_bcs_encode_decode' panicked at crates/primitives/src/log.rs:248:51:
called `Result::unwrap()` on an `Err` value: NotSupported("deserialize_any")
  1. bincode:
---- log::tests::test_bincode_encode_decode stdout ----
thread 'log::tests::test_bincode_encode_decode' panicked at crates/primitives/src/log.rs:227:52:
called `Result::unwrap()` on an `Err` value: SequenceMustHaveLength

Code affected: reth_primitives::Receipt.

@kpp kpp changed the title Fix Log serde for non self describing protocols [WIP] Fix Log serde for non self describing protocols May 30, 2024
@kpp kpp marked this pull request as draft May 30, 2024 15:10
@kpp kpp changed the title [WIP] Fix Log serde for non self describing protocols Fix Log serde for non self describing protocols May 30, 2024
@kpp kpp marked this pull request as ready for review May 30, 2024 18:04
@kpp kpp requested review from DaniPopes and prestwich May 30, 2024 18:44
@prestwich prestwich merged commit 7f17fe3 into alloy-rs:main May 31, 2024
30 checks passed
@kpp kpp deleted the kpp/fix_log_serde branch May 31, 2024 09:35
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