I don’t have long to chip in here (Viv’s a hard task-master and he’s wanting Routing work done today!
) but in the meantime here are my hurried thoughts:
-
I prefer the deletion to be in the form of a separate, new version appended to the latest.
-
I always thought the SD version could be used by client apps. Spandan, I take your point about version increments not always relating to data changes, but we could handle that by making the version something like:
pub struct Version {
/// Sequential number incremented when `SD::data` changes.
pub major_index: u32,
/// Sequential number incremented when any SD field other than `SD::data` changes.
pub minor_index: u32,
/// Arbitrary, version-specific information. May be empty.
pub data: Vec<u8>,
}
Thus the major_version represents the number of changes to the data, but we can still retain a means for strict total ordering of all versions.
- For actually removing the SD from the network, I prefer an expiry time as a mutable member variable of the SD. This would be a separate mechanism to the delete we’re talking about here (which is more akin to making the SD invisible I suppose). If an SD is Put with a long duration until the requested expiry time, the user can pay more. If the SD is modified to change the exipry time, the user can be refunded or further charged appropriately. When the expiry point happens, the vaults managing the SD just remove it. This isn’t trivial, and I know that using timestamps is highly controversial, but that’s my preferred approach just now.
OK - scurrying back to Routing now! ![]()