docs(changeset): Add section on version compatibility#391
docs(changeset): Add section on version compatibility#391ValuedMammal wants to merge 2 commits intobitcoindevkit:masterfrom
Conversation
This tells serde to use the default value if the field is missing when deserializing, which is useful when upgrading between versions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #391 +/- ##
=======================================
Coverage 79.17% 79.17%
=======================================
Files 24 24
Lines 5311 5311
Branches 242 242
=======================================
Hits 4205 4205
Misses 1029 1029
Partials 77 77
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tnull
left a comment
There was a problem hiding this comment.
Thank you, I much appreciate this move to clearly define the provided guarantees!
| /// | ||
| /// ### Responsibilities | ||
| /// | ||
| /// Library authors SHOULD test all upgrade paths using the persistence test suite and in CI. |
There was a problem hiding this comment.
Are there any plans to add {backward,forward} compatibility tests in BDK CI to ensure the above described rules are actually enforced at all times?
| /// ## Version Compatibility | ||
| /// | ||
| /// Any change to the [`ChangeSet`] data structure MUST correlate with a major version bump per | ||
| /// [Semantic Versioning](https://semver.org/). We guarantee that version N can read and |
There was a problem hiding this comment.
nit: maybe it's a good idea to also refer to: https://doc.rust-lang.org/cargo/reference/semver.html (not a blocker though).
Description
Partially addresses #234 by improving the documentation of
ChangeSetby adding a version compatibility policy, clarifying what upgrade/downgrade paths are supported and how breaking changes should be handled. It also adds the#[serde(default)]attribute tolocked_outpointswhich is a newly added field in 3.0.In summary the policy says:
ChangeSetdata structure will correspond to a major version bump.Defaultso that when deserializing, any missing fields are filled in with the default.Changelog notice
Changed
#[serde(default)]toChangeSet::locked_outpointsChecklists
All Submissions: