Substrate is the foundation of the PolkaCast architecture. PolkaCast can add new features through Pallets as users demand, with no need to worry about network forks, thanks to Substrate Runtime’s fork-free update and transparent governance tools. Easier and risk-free upgrades mean that the PolkaCast Protocol can develop and evolve robustly to keep up with the pace of innovation and changing market demands in the blockchain era.
Substrate is completely modular and flexible. PolkaCast makes use of existing module components to build a PolkaCast protocol that is suitable for its own business creation through Pallets and contracts, without having to worry about basic consensus, network, block confirmation, and other basic modules. As a result, PolkaCast can concentrate more on its own technical area, saving time and effort in development while keeping the code lean and succinct by implementing only the required functions on the custom blockchain protocol.
In addition, Substrate has native support and can be linked to Polkadot directly. It will be possible to link the PolkaCast protocol to Cumulus, which is supported by the Substrate tool, in the future, allowing for cross-chain communication, collaboration, and security sharing. Real asset cross-chain is implemented with the support of the XCMP protocol, and the process of locking, unlocking, creating, and burning assets between two separate blockchains is operated through data cross-chain and data cross-chain communication, which further enhances the PolkaCast and Polkadot ecosystem.
PolkaCast has four layers: a Consensus layer, an RUNTIME layer, an Extension layer, and an Application layer.
3.2.1 Consensus layer: Substrate FRAME and IPFS
Substrate FRAME: Substrate Framework for Runtime Aggregation of Modularized Entities, a.k.a Runtime module aggregation framework. FRAME is a series of Pallets and related support libraries used to simplify Runtime development. Each Pallet is a separate module used to deal with specific logical areas.
Simply put, when using FRAME to build, Substrate provides the core and runs multiple Pallets components on Runtime to form a complete business logic. After the program runs, IPFS will provide the storage, and Runtime is combined with Pallets components to execute, build and distribute rewards to creators and users through smart contracts, PoS, PoC, BABE, AURA, and GRANDPA consensus. Finally, the WASM and SDK/NPM distribute the content to the client for users who need it to pick up.
IPFS is similar to the World Wide Web, and can also be regarded as an independent BitTorrent group, exchanging objects in the same Git repository. In other words, IPFS provides a high-throughput, content-addressable block storage model, and content-related hyperlinks. This forms a generalized Merkle tree Directed Acyclic Graph (DAG). IPFS combines DHT, libp2p and a self-certified namespace. With IPFS, you can process a large number of data without changing the hash address of the stored file. IPFS has no single point of failure and has an acceleration impact since it is distributed storage with no shared trust between nodes. By eliminating delays, distributed content delivery can save bandwidth, accelerate edge computing addressing and provide users with faster services, and prevent DDoS attacks that may be encountered by HTTP schemes.
In September 2018, Gavin Wood introduced the idea of Substrate, which divides the blockchain structure into three layers:
l Substrate Core
The Substrate Core part mainly includes basic functions such as consensus, network system, transaction pool, RPC, and the Runtime part is the function of the current chain. The Runtime library combines all these components with Pallet. It defines the Pallets included in the runtime and configures them to work together to form the final Runtime. When calling runtime, it will use Executive Pallet to dispatch these calls to each Pallet, such as calls to public methods and features between modules.
The Runtime layer of Substrate can directly compile both WASM/NATIVE execution files. Rust’s Native and WASM that can run under the WASM virtual machine can enter the Runtime version information in the execution file through participation and hard-coded entry when starting the node. Because of the lightweight, agile, and safe features of WASM, it can effectively reduce the startup speed and resource consumption of Serverless applications. Almost all browsers already support WASM. WASM has good portability, allowing applications to run consistently in different platform environments from cloud servers to edge IoT devices. Switching between different devices, development and transplantation, has brought great Great convenience. Because of the WASM code, it can be guaranteed that even if the node is not updated to the latest version, it can still run with the latest code, and it is guaranteed that it will not be forked due to different codes. It is also ensured that during the process of synchronizing the old data of the node, synchronization errors will not be caused because the local code is the latest.
To create a true equal distribution and creator privileges, the PoS+PoC dual consensus model is implemented on the Runtime smart contract. Based on the PoC, each podcast creator will enjoy his or her own rights and interests.
l DAU: Distributed Autonomous User. Each user on the PolkaCast network is a DAU, and each DAU has corresponding rights and obligations. For more details, please see the governance section.
l DAC: Distributed Autonomous Creator; each creator on the PolkaCast Platform is referred to as a DAC; each DAC can be made up of the creator and DAU; and each DAU is merely an entity and does not include the DAC. Each DAU has the option to leave the joined DAC at any time and join a more appropriate DAC.
3.2.3 Extension Layer
The PolkaCast protocol extension layer is primarily used to extend the blockchain’s application possibilities in the WEB3.0 era, such as cross-chain operation, Polkadot parachain, implementation of scalable EP NFT, introduction of zero-knowledge proof, decentralization Smart Speaker (IoT).
3.2.4 Application Layer
PolkaCast Platform: A podcast hosting platform as a service built with Substrate and React.JS. It primarily offers simple content delivery, file upload, data statistics, and advertising to users.
Web Dapp: Every new podcast creator can have his own subdomain name or use his own domain name to create his own Dapp.
PolkaCast Clients: These include, but are not limited to, iOS, Android, desktop, and other clients. The bottom layer is Polka Wallet + decentralized storage of user-created content, which is distributed to the PolkaCast podcatcher via API, SDK, RPC, and other calling methods. While listening, any user can earn CAST rewards.
NPM/SDK: Third-party NPM packages and SDKs will be provided for developers or platforms with secondary development needs after the PolkaCast protocol is completed on the mainnet, and the PolkaCast community will be extended by third-party applications or developers.