Skip to content

The N42 blockchain, built with Rust, aims to become the world's premier blockchain mainnet provider, empowering a decentralized ecosystem. By exploring the limitless potential of intelligent technologies, N42 seeks to advance human civilization toward greater equality, efficiency, and intelligence.

License

Notifications You must be signed in to change notification settings

levy-tech-spark/N42-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N42 Public Chain

Rust GitHub Workflow Status GitHub License GitHub Issues GitHub Pull Requests GitHub Stars GitHub Forks

Introduction

N42 introduces a secure, efficient, and globally interconnected digital ecosystem, empowering developers to build applications with maximum autonomy and interoperability. Designed as a secure, high-performance blockchain, N42 utilizes Rust for its superior memory safety, reliability, and efficiency, ensuring a robust and highly scalable environment.

By harnessing the power of Rust, the N42 blockchain provides advanced performance and security, critical for developing a globally connected digital infrastructure. Its modular, sharded architecture and permissionless design facilitate seamless integration and efficient data exchange across diverse application environments, laying the foundation for the next generation of decentralized internet services.

Features

  • Decentralized Consensus: Utilizes a Proof of Stake (PoS) consensus mechanism to provide a secure and energy-efficient network.
  • Smart Contracts: Enables smart contracts through WebAssembly (Wasm), allowing developers to write contracts in various programming languages.
  • High Throughput: Designed for high transactions per second (TPS), making it ideal for large-scale applications.
  • Interoperability: Compatible with current blockchain ecosystems, facilitating cross-chain communication.
  • Security: Developed in Rust to ensure memory safety and guard against common vulnerabilities like buffer overflows.
  • Simplicity: Connect to the network with just a few lines of code.
  • Customizability: Supports any programming language, ultra-low transaction latencies (as low as 1 millisecond), and flexible network bandwidth usage to keep operational costs low.
  • Infinite Scalability: Horizontal scaling by adding more computing nodes, parallel transaction processing enabled by a CRDT-based state model.

Architecture

Domains

Execution Environment: Each domain operates independently, hosting one or more applications. Users interact through a dedicated "vault" in every domain where their assets reside. While spending is restricted to the associated domain, assets can be received from any domain.

Local Customization: Domains can be tailored to specific use cases, employing custom execution environments and smart contract engines (such as EVM or custom VMs) without compromising overall network security.

Validator Network

State Propagation & Verification: Validators form a decentralized network responsible for propagating state updates, known as State Difference Lists (SDL), across domains. They verify these updates using zero-knowledge proofs (SNARKs), ensuring compliance with both global and local rules.

Consensus without Full Ordering: Utilizing a leaderless, no-total-order consensus mechanism based on Byzantine Reliable Broadcast (BRB), N42 achieves high throughput and robust fault tolerance.

State Model & Settlement

CRDT-Based State Management: The system employs Conflict-Free Replicated Data Types (CRDTs) to allow concurrent state updates without conflicts, enabling fast and deterministic merging of state changes.

Zero-Knowledge Settlement: Domains generate zero-knowledge proofs to attest to the correctness of their state transitions. Validators verify these proofs to finalize settlements without needing to access the underlying transaction data.

Digital Asset Ownership

User Sovereignty: N42 returns full control of digital assets—ranging from user-generated data to creative content—back to the individual. Assets are tokenized (e.g., via NFTs) and managed through smart contracts, ensuring clear and secure ownership.

Forced Migration: In cases of censorship or downtime, users can forcefully migrate their vaults to another domain, preserving self-custody and maintaining uninterrupted access to their assets.

Use Cases & Ecosystem

  • Decentralized Finance (DeFi): By merging the strengths of traditional finance (TradFi) and decentralized finance (DeFi), N42 supports advanced financial applications that enable seamless asset flows, efficient trading, and innovative value creation.
  • Interoperable dApps: The minimal global state allows for atomic composability across domains, facilitating secure, trustless interactions between decentralized applications without the need for third-party bridges.
  • Custom Execution Environments: Developers can leverage the full flexibility of N42 to build bespoke execution environments that cater to specific business or application needs while benefiting from the global security and interoperability of the network.

Getting Started

Prerequisites

Installation

Clone the repository:

git clone https://github.com/n42blockchain/N42-rs.git
cd N42-rs

Build the project:

cargo build --release

Run a local node:

cargo run --release -- --dev

Running Tests

To run the tests, use the following command:

cargo test

Documentation

Generate the documentation locally:

cargo doc --open

Usage

Setting Up a Node

To configure a full node, follow these steps:

  1. Install Rust and Cargo (if they are not already installed).
  2. Build the Project using the instructions provided above.
  3. Run the Node using the specified command.

Interacting with the Blockchain

Use the command-line interface (CLI) or integrate with the blockchain via the JSON-RPC API.

Deploying Smart Contracts

  1. Write your smart contract in Rust or any language that compiles to Wasm.
  2. Compile the contract using wasm-pack.
  3. Deploy the compiled Wasm file to the blockchain using the provided CLI tools.

Contributing

We're excited to welcome contributions to the Rust Blockchain Project! To get started, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes and push them to your branch.
  4. Submit a pull request with a detailed description of your changes.

Kindly make sure your code complies with the project's coding standards and successfully passes all tests before submitting a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any inquiries or support, please reach out to us via email at [email protected] or join our Discord community.

Acknowledgments

We extend our heartfelt thanks to the Rust community and all the contributors who have made this project a reality.

Happy coding and welcome to the future of decentralized technology with Rust!

About

The N42 blockchain, built with Rust, aims to become the world's premier blockchain mainnet provider, empowering a decentralized ecosystem. By exploring the limitless potential of intelligent technologies, N42 seeks to advance human civilization toward greater equality, efficiency, and intelligence.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.9%
  • Other 0.1%