seraphis-migration / wallet3

Info and discussions about a hypothetical full 'wallet2' rewrite from scratch
MIT License
13 stars 0 forks source link

Versioning of interfaces #2

Open rbrunner7 opened 2 years ago

rbrunner7 commented 2 years ago

If wallet3.h as the primary wallet interface grows and gets changed over time, maybe it would be nice to have a versioning in place.

E.g. we could have a wallet3_v0.h as part of the first hardfork that puts Seraphis and Jamtis into service, and a wallet3_v1.h maybe 1 year later with extensions and changes. The two header files would co-exist an indefinite time into the future and make source code changes in clients unnecessary as long as no new features are needed. Maybe even a binary compatibility could be achieved by keeping a file wallet3_v0.so available and stable.

Some googling showed that such versioning is hard to do with C++, and achieving binary compatibility even harder. It does not seem to be widespread.

Also note that the RPC interface has some pretty good inherent resilience against changes. Structs there can grow without much problems and mostly without needing changes in clients because of the use of default values and because the RPC server as well as clients simply ignore any fields in the JSON that they don't know about.

All in all it does not seem worth to introduce versioning of interfaces to me.