On 18.01.2024 08:43, Daniel Sahlberg wrote:
As far as I understand, the point of multi-hash is to keep the WC format between versions (so older clients can continue to use the WC). I need some help to understand how that would work in practice. Let's say that 1.15 adds SHAABC, 1.16 adds SHAXYZ. Then 1.17 drops SHA1. But...
- A 1.17 client will only use SHAABC or SHAXYZ hashes.
- A 1.16 client can use SHA1, SHAABC and SHAXYZ hashes.
- A 1.15 client can only use SHA1 and SHAABC hashes.

How can these work together? A WC created in 1.17 can't be used by a 1.15 client and a WC created in 1.15 (with SHA1) can't be used by a 1.17 client. How is this different from bumping the format? How do we detect this?

It's just another dimension of changing the format. When you introduce multihash, you have to bump the format number so that clients that don't know about it won't try to use the WC. Clients that _do_ know about it will have to check which hash algorithm(s) are used in any case.


At least, we'd need some method of updating the hashes in the database, akin the WC format upgrades in some versions (was it 1.8?).

"svn upgrade" is where this would happen. On the multi-wc-format branch (if memory serves), it accepts a target WC version -- which is equivalent to the feature set supported by the WC. There's no reason why it couldn't also grow a "--force-hash=quantum-entangled" option.

-- Brane

Reply via email to