NULS: A Customizable Blockchain Infrastructure
NULS is a blockchain infrastructure focused on customizable services and a global open-source community project. Embracing the microservices philosophy, NULS implements a highly modularized underlying architecture. Utilizing technologies such as module repositories, smart contracts, and cross-chain communication, along with the rapid chain-building capabilities of Chain Factory, NULS aims to reduce blockchain development costs and promote the practical application of blockchain technology in various industries.
1. Project Introduction
NULS is a blockchain infrastructure that provides customizable services and operates as a global open-source blockchain community project. It implements a highly modularized underlying architecture based on microservices principles. By leveraging technologies like smart contracts, cross-chain communication, and the rapid chain-building capabilities of its Chain Factory, NULS aims to lower blockchain development costs and accelerate the adoption of blockchain technology for real-world applications.
Application Scenarios
Flexible and User-Friendly Blockchain Infrastructure:
NULS provides developers and users with a diverse range of modules. This eliminates the need to delve into the complexities of cryptography, consensus mechanisms, and storage methods. Instead, they can simply select the necessary modules from the Chain Factory's repository based on their specific requirements and configure the parameters to quickly build a blockchain, effectively lowering development costs.
Support for a Wide Range of Blockchain Application Scenarios:
In terms of applications, blockchain-based solutions are expected to permeate various aspects of organizational and personal life. NULS, through its modularity, empowers users to rapidly deploy blockchains. Its cross-chain technology facilitates seamless data and asset transfer between different blockchains. Furthermore, its Turing-complete smart contracts provide the necessary programmability to support a vast array of future application scenarios.
Driving the Real-World Adoption of Blockchain:
Commercial applications demand high performance. NULS addresses the limitations of existing blockchains by utilizing parallel expansion technology. By deploying multiple independent chains through its Chain Factory and distributing tasks across these chains, NULS facilitates communication between them using cross-chain technology, achieving the capacity to handle tens of millions of transactions per second (TPS).
Technical Overview
Microservice Architecture:
Pioneering the implementation of a microservice architecture in blockchain infrastructure, NULS decomposes software into independently deployable services. This approach, borrowed from advanced software engineering principles, is applied to module design, enabling each module to operate as a flexible, standalone program. Furthermore, the development of individual modules can be achieved using various programming languages.
This architecture minimizes coupling between modules, while multi-language support enhances code contributions and user experience. The modular design allows for easy scalability, and distributed deployment facilitates seamless module hot-swapping. This comprehensive architectural design is referred to as NULS 2.0, with both Chain Factory and cross-chain functionalities built upon it.
The NULS microservice architecture consists of three layers:
-
Microservice Infrastructure Layer: Provides the foundation for the entire architecture.
-
Blockchain Basic Service Layer: Offers fundamental blockchain services built upon the infrastructure layer.
-
DApp Application Layer: Hosts decentralized applications leveraging the services provided by the lower layers.
This layered architecture empowers developers to create sophisticated applications, such as distributed exchange systems and data service systems, on top of the Blockchain Basic Service Layer. The NULS ecosystem extends beyond multiple chains and DApps to encompass various internet-based applications of all sizes.
Modularity:
Recognizing the unpredictable nature of technological advancements and evolving business application logic, the NULS community has adopted the modular design philosophy of the Linux kernel. Multiple functional modules are developed and organized into a module repository, adhering to the principle of "everything is a module." This modular approach facilitates technological updates and seamless adaptation to new applications.
Consensus Mechanism - POC:
NULS's modular design allows for the replacement and hot-swapping of all core functional modules, including the consensus mechanism. The NULS mainnet employs a Proof-of-Credit (POC) consensus mechanism. Nodes with sufficient credit can participate in consensus by locking a certain amount of NULS tokens. After a reordering of consensus nodes, blocks are produced in turns. Locked NULS tokens are unlocked upon exiting the consensus process.
-
Consensus Entry and Exit Mechanism:
Anyone can participate in the NULS consensus mechanism as long as they meet the requirements and follow the rules. POC entry criteria include both hard and soft indicators. Hard indicators refer to a minimum credit score, preventing malicious nodes from participating. Soft indicators involve locking a certain amount of NULS as collateral. This measure discourages node spamming and promotes fairness within the system. While a minimum lock-up amount is required, participants can choose to lock up more NULS, with higher amounts leading to potentially greater rewards.
-
Credit Rating:
Within the NULS network, credit represents an account's trustworthiness. All accounts are assigned a credit score within the range of [-1, 1], automatically calculated using a credit rating algorithm.
Credit Evaluation Formula:
Credit Base = Capability Coefficient + Responsibility Coefficient
-
Consensus Rewards:
To maintain balance and fairness within the NULS network, consensus rewards are calculated based on the total collateral submitted by all consensus nodes and their respective credit scores.
-
Universal Consensus Mechanism:
As a versatile blockchain infrastructure, the NULS mainnet itself doesn't host any application logic. All applications run on parallel blockchains. Using the NULS Chain Factory, users can rapidly deploy blockchains based on the module repository and customize various operating parameters. This includes options related to native token support, encryption algorithms, consensus mechanisms, and storage mechanisms.
NULS defines a universal consensus module, providing an interface compatible with different consensus mechanisms. The NULS community is actively developing consensus mechanisms such as Proof-of-Work (POW), Delegated Proof-of-Stake (DPOS), Proof-of-Stake (POS), Practical Byzantine Fault Tolerance (PBFT), and POOL verification pools, allowing users to choose the one that best suits their needs.
NULS Smart Contracts:
NULS integrates NVM as a virtual machine for its smart contract module. Structurally, the smart contract module resides between external service modules (e.g., RPC module) and lower-level modules (e.g., network, storage, and account modules). These lower-level modules provide the necessary support for smart contract execution.
Smart contracts are defined by upper-layer applications, interpreted by an interpreter, stored by the storage module, and executed by the NVM. The NULS smart contract interpreter supports multiple high-level programming languages, allowing developers to use their preferred language for designing NULS smart contracts.
Cross-Chain:
Blockchains built using the NULS module repository (i.e., those within the NULS ecosystem) can incorporate the cross-chain module to enable seamless communication with the NULS mainnet.
For public blockchains that follow different protocols than NULS, such as Ethereum and Bitcoin, special mechanisms are required to achieve protocol conversion. This involves adapting their protocols to the NULS cross-chain protocol to facilitate communication based on a unified protocol.
All blockchains communicate solely with the NULS mainnet, which is responsible for transaction verification. Parallel chains trust the verification results provided by the NULS mainnet.
Assets on different blockchains can be transferred to any chain within the NULS ecosystem that accepts external assets at minimal cost.
Key features of NULS cross-chain technology:
-
The NULS mainnet utilizes the POC consensus mechanism in conjunction with Byzantine fault tolerance mechanisms to confirm and package cross-chain transactions, ensuring decentralization, performance, and security.
-
Each node on the NULS mainnet connects to multiple nodes on various blockchains. The use of a unified NULS cross-chain protocol enables a single node to connect to multiple nodes across different blockchains concurrently.
-
The NULS mainnet provides a chain management mechanism to manage all peer blockchains registered on the network. Registered information includes chain details, asset information, and cross-chain collateral.
-
When a blockchain receives assets from another chain, corresponding assets are generated on the receiving chain. Tokens from different blockchains are stored as assets on other chains.
-
Details of asset transfers from one blockchain to another are stored on the NULS mainnet. When transferring these assets out of the receiving blockchain, verification is performed to prevent the creation of illegal assets. Malicious blockchains are addressed through community mechanisms, which may include suspension of cross-chain functionality, termination of cross-chain capabilities, or confiscation of collateral.
-
The NULS mainnet provides API documentation, allowing developers to build their own wallets, explorers, and light wallets.
-
The NULS mainnet offers protocols for application expansion, enabling DApp development and optimization of the cross-chain protocol.
2. Evaluation
NULS is a blockchain infrastructure that provides customizable services and operates as a global, open-source blockchain community project. It has established a set of standardized blockchain technologies for industrial applications, adhering to the principles of hot-swapping, modularity, and parallel expansion. NULS provides upgradable modules for consensus, networking, ledger, accounts, block management, chain management, transaction management, and an event bus.
Building a blockchain on NULS is akin to assembling a computer from components like a CPU, hard drive, memory, and motherboard. Users can freely select and combine modules like consensus, networking, ledger, and accounts to create a chain tailored to their specific needs. This chain can be a public chain, a consortium chain, or a private chain.
Related Links: