The `units::locktime` types are used for two things: - They are the inner types of `primitives` `LockTime`s - They are used ephemerally for checking satisfaction Neither of these use cases requires `serde` impls for the `units` types. Since we are trying to release 1.0 with minimal amounts of code we should remove them. For `LockTime`s that need to be stored on disk or go over the wire we can manually implement the `serde` traits. For `absolute::LockTime` this is done already and there is no reason the `relative::LockTime` impl cannot be the same [0]. This differs from the current `serde` trait impls but we have already decided that in 0.33 we are going to accept breakage and direct users to use 0.32 to handle it. - Remove `serde` stuff from `units::locktime` - Manually implement `serde` traits on `relative::LockTime` - Fix the regression test to use the new format While we are at it use a uniform terse call in `serialize`. [0] This is because there is an unambiguous encoding for the whole set of locktimes - consensus encoding. |
||
---|---|---|
.. | ||
README.md | ||
absolute_lock_time_blocks_bincode | ||
absolute_lock_time_seconds_bincode | ||
address_bincode | ||
block_bincode | ||
child_number_bincode | ||
control_block_bincode | ||
control_block_hex | ||
ecdsa_sig_bincode | ||
ecdsa_sig_hex | ||
extended_priv_key | ||
extended_priv_key_bincode | ||
extended_pub_key | ||
extended_pub_key_bincode | ||
private_key_bincode | ||
psbt_base64.json | ||
psbt_bincode | ||
public_key_bincode | ||
public_key_hex | ||
relative_lock_time_blocks_bincode | ||
relative_lock_time_seconds_bincode | ||
script_bincode | ||
taproot_sig_bincode | ||
taproot_sig_hex | ||
taptree_bincode | ||
transaction_bincode | ||
transaction_ser | ||
txin_bincode | ||
txin_ser | ||
txout_bincode | ||
u256_bincode | ||
uint128_bincode | ||
uint256_bincode | ||
witness_bincode |
README.md
Serialization input/output
Files here contain hex strings and binary data representing types used for regression testing.
*_hex
: consensus encoded types represented as hex strings*_ser
: consensus encoded types represented as binary data*_bincode
: types serialized withserde
as bincode
We consensus deserialize, serde
serialize, then check against the expected data
to verify no serde
regressions have been introduced.