eqlabs / pathfinder

A Starknet full node written in Rust
https://eqlabs.github.io/pathfinder/
Other
619 stars 227 forks source link

RPC: remove SerializationForVersion blanket impl for serde #2048

Open Mirko-von-Leipzig opened 3 months ago

Mirko-von-Leipzig commented 3 months ago

Requires #2047.

To allow for transitioning from serde::Serialize to SerializeForVersion, the latter currently has a blanket implementation for all T: serde::Serialize.

Once the transition is complete, we can and should remove this blanket implementation. This will prove that we no longer rely on serde::Serialization directly.

You may find that this results in compilation errors in some DTO implementations. This will likely be due to missing primitive implementations for our trait. Various string or integer types spring to mind as likely culprits. These should be added explicitly to the serialization impl as demonstrated here.