Skip to content

FCPv2 CompatibilityMode

DC* edited this page Aug 29, 2020 · 2 revisions

CompatibilityMode indicates the options used to insert the data being fetched. You can use these options to reinsert data exactly as this key was inserted, so that the old key is fetchable. The min/max options are compatibility modes, which can be used in CompatibilityMode in ClientPut. Note that COMPAT_UNKNOWN can be returned, in which case you won't be able to reinsert exactly. Note also the Min.Number and Max.Number for the same name may change between Freenet versions - we only guarantee that COMPAT_UNKNOWN is 0, COMPAT_CURRENT is 1, and that after that they are in order of build version (with exact versions before approximate versions). SplitfileCryptoKey can be used also for reinserts when the bottom level splitfile encryption has been randomised; this is optional, it always happens for inserts under SSKs.

Multiple such messages may be sent. Once Definitive is true, you should be able to use the settings to reinsert an identical file, and the settings shouldn't change any further. On old files (pre-1254) Definitive will be set when we fetch the metadata for the bottom level splitfile (the metadata can itself be a splitfile); on new files, it will be set when we fetch the metadata for the top level splitfile i.e. hopefully the top block.

Example

 CompatibilityMode
 Identifier=Insert-1
 Global=true
 Min=COMPAT_1250
 Max=COMPAT_1250
 Min.Number=3
 Max.Number=3
 SplitfileCryptoKey=ba9e4dfe3bf1482b47a0a91a3584696ab33a24d9a0b8b6616e5f1f3179514afc
 DontCompress=true
 Definitive=true
 EndMessage
Clone this wiki locally