Multiformats literally means "multi-format". It is not a software, but a set of self-describing protocol values (source code and user interface conform to general naming conventions and structured programming conventions, so that ordinary users can understand and read source code and use systems and software without professional knowledge). These values are useful for both the data layer (IPLD) and the network layer (libp2p). It is a system designed to be based on today in order to achieve a future-oriented system. Simply put, Multiformats is a collection of protocols that aims to create a system that is usable now and in the future. Currently, it is mainly achieved by enhancing self-describing format values. It allows protocols to interoperate, keeps the protocols flexible, extensible, and upgradeable, and helps us avoid being locked in a value. These protocols have some specific provisions for self-description: They must be in-band (with a value); not out-of-band (within a context). They must avoid lock-in and facilitate scalability. They must be compact and have a binary packed representation. They must have a human-readable representation. Originally, Multiformats was built specifically for IPFS, but is now widely used in IPLD, libp2p, IPFS, and Filecoin projects . To understand Multiformats, you need to start by understanding the various protocols that are its subsets. There are currently several types, and each project has a list of implementations in various languages. multihash - self-describing hashes multiaddr (in development) - self-describing network addresses multibase (under development) - self-describing base encoding multicodec - self-describing serialization multistream (deprecated) - a self-describing streaming network protocol multigram (in development) - a self-describing packet network protocol Next, let’s take a closer look at what these protocols do and how they help the Filecoin network. Multihash Multihash is a protocol for distinguishing the outputs of various cryptographic hash functions while solving addressing and encoding problems. It is useful and important in writing applications to ensure the use of hashes by the system and allow multiple hash functions to coexist - especially for those systems that rely on cryptographic hash functions . It consists of three parts: hash function encoding, hash value length, and hash content. This design and composition is designed for upgrades. If one day the hash function currently used is no longer secure, or a more secure hash function is available, the system can be quickly upgraded through Multihash . Multiaddr Multiaddr is a format for encoding addresses from a variety of mature network protocols. Applications are written to ensure their use of addresses and to allow multiple transport protocols and addresses to coexist. In today’s Internet, many network addressing schemes are not self-describing, they come with interpretation and context, meaning they make assumptions that applications also make, leading to a lot of ad-hoc code that makes it impossible to update protocols in the future because the addressing blocks changes to new protocols. Multiaddr enables building applications that work with future network protocols without rigidifying systems and stacks. multibase Multibase is a protocol for disambiguating binary encodings of base encodings (e.g., base32, base36, base64, base58, etc.) appearing in text . When text is encoded as bytes, we can often use a one-size-fits-all encoding (UTF-8), since we always encode to the same set of 256 bytes (+/- NUL bytes). When that doesn't work, we can often infer the encoding from context. But when bytes are encoded as text (using a base encoding), the basic choice of base encoding is often constrained by context. These constraints may also change depending on where the data appears in the text. This results in a base encoding for different use cases. And base encodings cannot be standardized because there is no encoding that works for all cases. The purpose of Multibase is to tell developers what base encoding to use in what situation. It answers questions like "given data d encoded as text s, what base encoding is it in?" Filecoin uses IPLD’s content identifiers (CIDs) to reference data, and when CIDs are printed as strings, they use multibase to identify the base encoding being used . Multicodec Multicodec is a codec table that is designed for binary representation, that is, using 1-2 bytes to determine the format of the data content, such as using the letter z to represent base58btc encoding, 0x50 to represent protobuf, etc. In Multihash, it is used to identify a hash, and in machine-readable Multiaddr, it is used to identify components such as IP addresses, domain names, identities , etc. Now, you should have a systematic understanding of Multiformats. The protocols in use have stable specifications and stable implementations, and Protocol Labs is also working hard to study more subsets of Multiformats and hope to put them into use as soon as possible. The protocol interoperability and future-oriented considerations that Multiformats can provide will definitely have a real impact on today's Web3. |
<<: Wu said weekly mining information: 0411-0417
>>: How to Find and Track Crypto Whale Wallets?
According to BlockBeats, on January 19, Binance a...
In palmistry, the love line and the marriage line...
We may be able to tell whether a person is wealthy...
In fact, there are moles on our faces, not too ma...
Every woman wants to find a good husband. From th...
Facial features of those who will eventually aban...
What kind of forehead brings great wealth and hon...
If a woman cheats, she will basically have the fol...
In the process of interpersonal communication, it...
Numerologists believe that to infer a person'...
Usually, many friends come to ask questions about...
On June 7, 2021, the "2021 Global Distribute...
What do the glyphs on the palm represent? Everyon...
As material and spiritual life become more and mo...
Looking at the biggest social event in recent tim...