We started off reusing the same approach towards serialization as upstream LDK and planned to also reuse the macros in #23. However, as this is always a pain point upstream, we should rethink whether we really want to take the same approach.
In particular, can we create a different approach towards serialization in which:
- All fields are not only length but version-prefixed
- The type as which they are serialized is explicitly stated to make any difference to the data type transparent.
- Migrations between versions have to be explicitly implemented for clarity and hopefully even type checked?
We started off reusing the same approach towards serialization as upstream LDK and planned to also reuse the macros in #23. However, as this is always a pain point upstream, we should rethink whether we really want to take the same approach.
In particular, can we create a different approach towards serialization in which: