Why does CIDv1 include multicodec id in the CID?

Expert

What is rationale for CIDv1 including multicodec id (IPLD format; e.g. 0x70 for dag-pb) in the CID?

Answers 1

Multicodecs are an important element of CIDs. It is beneficial to have the format within the payload. When we move up to the more complex application protocols, feature detection is the ideal approach. Subsequently, protocols should be able to be extended at a low level and implement techniques such as detecting which features are present in order to produce flexible systems. In particular, evolvability is a must-have in decentralized software since you can't demand that everyone upgrades their products - therefore supporting multiple version ranges is necessary for success. IPLD introduces the concept of data model legibility, which allows for application data recognition. This separation from additional features allows for standardized codecs and feature recognition to occur at a separate layer through the schema layer, while also allowing users to bring their own customization if desired. Multi codecs provide us with a standard data model and translation instructions, allowing us to perform graph traversals that are essential for certain processes such as garbage collection. This enables better legibility in the system and streamlined operations.