# VidBlock: A Web3.0-Enabled Decentralized Blockchain Architecture for Live Video Streaming
## 3 System Design
### Processes for Decentralized Live Streaming in VidBlock
The relay node address is obtained from the smart contract's relay registry, acting as a key intermediary that connects the content to the wider network. Relay nodes propagate the streaming data to the network, ensuring efficient content delivery and accessibility for all viewers. Figure 3: System process for user and content registration in VidBlock. nodeInfo*: These metadata include essential details about the creator's node, such as a unique identifier, node status, and possibly their geographical location. This information helps organize and optimize the distribution process, especially in cases where geographical proximity or other node characteristics enhance content delivery performance. streamHash: The stream hash is a cryptographic hash generated for the content uploaded to the distributed storage system. Rather than storing all the content on the blockchain, only this unique hash value is recorded, which acts as a digital fingerprint of the streaming content. Relay nodes utilize this hash to verify content integrity and manage the list of active streams. They may also store and periodically update the hash list to maintain a live catalog of available content. This registration step ensures that the content is verifiable and securely linked to the creator without storing actual data on the blockchain, preserving privacy while maintaining trust. **Content retrieval sequence via relay nodes and distributed storage:** Once the streaming content is successfully registered, ViB consumers (viewers) can access it by calling the relay node for a list of active stream hashes. This retrieval process involves several steps:  
* **Fetching active stream hashes:** Consumers request the active hash values from the relay node. These hashes represent currently available live streams and enable consumers to locate content without the need for a centralized database. * **Accessing content via distributed storage:** Using the hash values, consumers retrieve the actual content through distributed storage, such as IPFS, by calling on the downloadFilesFromIStr function. This function leverages a distributed storage system's peer-to-peer network to fetch data directly from storage nodes, ensuring that the content remains decentralized and verifiable. Since the distributed storage system links content to its unique hash, any tampering with the data will result in a mismatch, thus safeguarding content authenticity. * **Stream integrity and verification:** By storing only the hash on the blockchain, VidBlock maintains a lightweight yet highly secure record of content authenticity. Con  
Figure 4: The process of content creation and retrieval in VidBlock. The “*” indicates essential metadata (e.g., title, hash values) and node information (e.g., relay node address) required for streaming operations. sumers can verify the data they receive by matching it with the hash recorded on the blockchain. This feature enhances trust, as users can be confident that the content has not been altered or compromised during transmission. This process enables VidBlock to offer a truly decentralized, user-controlled content distribution experience. Content creators have complete control over their streams and can manage distribution without relying on centralized servers, while consumers enjoy direct access to live streams. Additionally, by separating the metadata for content storage (handled by a distributed storage system) from verification (handled by the blockchain), VidBlock achieves an efficient, scalable model that reduces blockchain storage overhead and enhances content privacy. Figure 5 illustrates the sequence of events required to establish and initiate a peer-to-peer (P2P) live streaming session in the VidBlock ecosystem. This process consists of three primary phases: selecting content and entering the live room, setting up the renderer and starting P2P live streaming, and exchanging connection details for live streaming.