NAC_Blockchain/nac-nrpc4/src/lib.rs

54 lines
1.4 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! NRPC 4.0: 元协议文明网络栈
//!
//! NRPC 4.0将网络从"通信管道"提升为"多文明共生进化的数字宇宙"
//!
//! # 六层架构
//!
//! - **L1 元胞层**: 元胞自动机路由CAR
//! - **L2 文明层**: 文明特征向量、灵魂签名
//! - **L3 聚合层**: 文明间路由ICR、意识分叉
//! - **L4 宪法层**: 全息编码、分片存储
//! - **L5 价值层**: XIC/XTZH跨文明价值交换
//! - **L6 应用层**: AA-PE、FTAN、UCA
//!
//! # 核心特性
//!
//! - **元胞自动机路由**: 无中央路由表,梯度下降路由
//! - **文明间路由**: 基于DHT的文明发现支持多文明共存
//! - **灵魂签名**: 文明级集体签名,抗量子
//! - **意识分叉**: 支持文明内分歧的和平分叉
//! - **宪法全息化**: 分片存储宪法,零知识证明验证
pub mod l1_cell;
pub mod l2_civilization;
pub mod l3_aggregation;
pub mod l4_constitution;
pub mod l5_value;
pub mod l6_application;
pub mod types;
pub mod error;
pub use error::{Nrpc4Error, Result};
pub use types::*;
/// NRPC 4.0版本号
pub const NRPC4_VERSION: &str = "4.0.0-alpha";
/// NRPC 4.0协议魔数
pub const NRPC4_MAGIC: u32 = 0x4E525034; // "NRP4"
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_version() {
assert_eq!(NRPC4_VERSION, "4.0.0-alpha");
}
#[test]
fn test_magic() {
assert_eq!(NRPC4_MAGIC, 0x4E525034);
}
}