This article is for explaining the technical details of the ERC-7053. If you are looking for the basic introduction, please visit this page.
Acknowledgment
This article is translated from Cardene’s article on Qiita. Special thanks to the original author for his creative work and contribution.
Overview
This Ethereum Improvement Proposal (EIP) proposes a new method for organizing and retrieving digital media information on the Ethereum blockchain platform and other compatible blockchains. Digital media information includes data related to media files such as photos, videos, and music.
Organizing and searching digital media information across different smart contracts and blockchains can be challenging. This EIP suggests methods to solve these problems by enabling :
- Efficient organization of digital media information on the blockchain, similar to managing a database, ensuring efficient and lossless information management.
- Improved tracking across contracts and chains, facilitating data reliability and transparency.
- Efficient discovery of information and storage locations related to media assets, streamlining transactions and utilization of digital media.
The primary goal of this proposal is to create an environment for more efficient management and use of digital media on the blockchain. This is expected to improve digital media-related businesses, applications, and user experience.
Motivation
Digital media files play an essential role on the internet, and organizing this information efficiently is critically important. However, current systems face challenges due to the lack of universal and interoperable identifiers for digital media content. This leads to complexities in accessing information about the media, its storage location, and the origin of specific media assets, causing fragmentation. As the amount of digital media increases, these problems become more severe.
The aim of this proposal is to establish a standardized, decentralized, and interoperable method for efficiently indexing digital media across the entire EVM (Ethereum Virtual Machine) compatible network. The proposal suggests a mechanism to uniquely identify and index each digital media file by combining decentralized content identifiers (CIDs) and commit events. Additionally, this system provides a method for users to access the complete history of digital media assets related to them. This enhances transparency and equips users with necessary information for future interactions with digital media.
This method creates a common interface for any digital media system to index and search content, providing a standardized way to manage and use digital media efficiently, thereby improving user experience.
This EIP aims to build an interoperable index system for efficiently organizing and associating information related to digital media content. This not only makes it easier for users to find and trust digital media content but also facilitates the sharing of information about this content across systems.
Let's take a look at Figure 1. The left table summarizes off-chain data, while the right table contains information managed on-chain, compiling details related to each media.
The main idea of this proposal is to centralize various data and information related to the same digital media content. This centralization enables users to quickly find specific digital content and easily access reliable information. Moreover, it allows for the sharing of information about digital media content between different systems and platforms, thus streamlining the management and sharing of digital media.
This EIP proposes a mechanism to centralize information related to digital media content and to make the use and sharing of digital media more efficient. This enhances the digital media experience and improves the management of digital content.
Specifications
Content Identifiers
A "Content Identifier" in this EIP is like a special address that uniquely identifies the contents of digital media. It transforms the contents of a digital media file using a special mathematical calculation (cryptographic hash function) and results in a unique address. This address is called a content identifier.
To effectively organize and index digital media information, it's necessary to generate unique content identifiers for an increasing number of digital media files. These identifiers must match the content identifiers on decentralized storage. Each content identifier provides information related to the digital media file, including metadata, media information, and even access to the content file itself.
Content identifiers are addresses that uniquely specify the contents of digital media and are central to this EIP. Each digital media file requires its unique content identifier, making the management and search of digital media efficient.
Commit Function
To index digital media, a commit function is invoked to generate commit events.
Supplementary Information
In the design of this EIP, priority is given to ensuring that the method of indexing digital media content is effective and efficient. To achieve this, decentralized content identifiers (CIDs) are used to uniquely identify digital media content across all systems. The advantages of this approach include
Enhanced Data Integrity
CIDs represent the contents of digital media as cryptographic hashes, ensuring their uniqueness and preventing forgery. When the content is available, retrieving its CID allows searching for related information, thereby enhancing data integrity and reliability.
Improved Data Portability
Using CIDs allows for the smooth transfer of digital media content between different systems. This eliminates the need for re-encoding or reconfiguring protocols, improving interoperability. For instance, even if Non-Fungible Tokens (NFTs) are created before a Commit event, the files referenced by tokenURI can be converted using the same mechanism. This allows for consistent identification and indexing of digital media content, enhancing data portability and simplifying data sharing across different platforms.
This EIP utilizes CIDs to uniquely identify digital media content, enhancing the integrity and portability of data, and aiming to achieve an efficient indexing process.
Reference Implementation
Security Considerations
When implementing this EIP, attention must be paid to the following security aspects to ensure the safety and integrity of the digital media index:
Input Validation
Since the commit function accepts string parameters, it is crucial to validate these inputs. This helps prevent injection attacks from malicious attackers. In the smart contract environment, which carries different security risks than regular web development, verifying the reliability of input data is essential.
Data Integrity
The commit function relies on CIDs, assuming they are correct and pointing to the right data. However, the EIP itself does not validate the contents of CIDs or commit data, so it is up to users and implementing applications to ensure data integrity. In other words, it's the responsibility of the users to verify the accuracy of CIDs and the appropriateness of commit data.
Event Listening
Systems relying on commit events must be aware of the potential for events to be lost or to arrive out of order during network congestion or reconfiguration. Appropriate monitoring and response measures are necessary for this.
Implementers are strongly advised to consider these security aspects according to their use cases and deployment scenarios and to conduct thorough security audits. This ensures the operational safety of the digital media index.
Citation
Bofu Chen (@bafu), Tammy Yang (@tammyyang), "ERC-7053: Interoperable Digital Media Indexing [DRAFT]," Ethereum Improvement Proposals, no. 7053, May 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7053.