Issue #75/76/77: Tier3辖区(225测试)+跨版本兼容检测(6测试)+NAC_Lens路由层(8测试)

Issue #75: 实现10个Tier3新兴市场辖区(BR/IN/TH/ID/NG/MX/ZA/TR/SA/RU)
- 每辖区独立TxContext数据结构和ConstitutionalValidator
- 225个测试全部通过(Tier1:55+Tier2:100+Tier3:70)
- in模块重命名为in_jurisdiction避免Rust关键字冲突

Issue #76: 实现辖区规则跨版本兼容性检测(nac-jurisdiction-compat)
- CompatibilityChecker支持4种兼容性级别
- 检测AML阈值/KYC等级/资产类型/监管机构变更
- 6个测试全部通过

Issue #77: NAC_Lens辖区路由层集成(nac-lens-jurisdiction-router)
- 支持单辖区/跨辖区/规则更新广播/CR广播/节点注册5种消息类型
- 跨辖区各自独立出具CR(参与即是共识,非多签)
- 规则更新须CA签名立即生效(约法即是治法)
- 8个测试全部通过

NRPC->NAC_Lens: 更新nac-api-server/nac-sdk/nac-asset-onboarding/nac-udm注释
修复Issue#74测试隔离问题(并发测试目录污染)

总测试: 252个全部通过
CBPP合规: 约法即是治法|宪法即是规则|参与即是共识|节点产生区块交易决定区块大小
This commit is contained in:
NAC Admin 2026-03-07 15:28:13 +08:00
parent 91be43650e
commit fe8f935bab
130 changed files with 7524 additions and 147 deletions

View File

@ -0,0 +1,87 @@
# Issue #75 / #76 / #77 完成报告
**完成时间**: 2026-03-07
**执行人**: NAC 开发团队
**CBPP 原则合规**: ✅ 约法即是治法 | ✅ 宪法即是规则 | ✅ 参与即是共识 | ✅ 节点产生区块交易决定区块大小
---
## Issue #75: Tier 3 新兴市场辖区实现
### 实现的辖区10个
| 辖区代码 | 国家/地区 | 监管机构 | 测试数 |
|---------|---------|---------|------|
| BR | 巴西 | CVM/BCB | 6 |
| IN | 印度 | SEBI/RBI | 6 |
| TH | 泰国 | SEC Thailand/BOT | 6 |
| ID | 印度尼西亚 | OJK/Bappebti | 6 |
| NG | 尼日利亚 | SEC Nigeria/CBN | 6 |
| MX | 墨西哥 | CNBV/SHCP | 6 |
| ZA | 南非 | FSCA/SARB | 7 |
| TR | 土耳其 | SPK/BDDK | 6 |
| SA | 沙特阿拉伯 | CMA/SAMA | 8 |
| RU | 俄罗斯 | ЦБ РФ/ФСФР | 6 |
**总测试数**: 225 个Tier 1: 55 + Tier 2: 100 + Tier 3: 70
**测试结果**: ✅ 225 passed, 0 failed
### 技术实现
- 每个辖区独立的 `{CODE}TxContext` 数据结构
- 每个辖区独立的 `{CODE}ConstitutionalValidator`
- 宪法收据CR由各辖区节点独立出具参与即是共识
- `in` 模块重命名为 `in_jurisdiction`(避免 Rust 关键字冲突)
---
## Issue #76: 辖区规则跨版本兼容性检测
**模块**: `nac-jurisdiction-compat`
**测试数**: 6 个
**测试结果**: ✅ 6 passed, 0 failed
### 功能
- `CompatibilityChecker::check_compatibility()`: 检测两个版本快照的兼容性
- 四种兼容性级别: `FullyCompatible` / `BackwardCompatible` / `Incompatible` / `RequiresCAReauthorization`
- 检测维度: AML阈值变化、KYC等级变化、资产类型变更、监管机构变更
- `batch_check()`: 批量检测多辖区兼容性
- **CBPP合规**: 无CA签名的版本更新返回 `RequiresCAReauthorization`(约法即是治法)
---
## Issue #77: NAC_Lens 辖区路由层集成
**模块**: `nac-lens-jurisdiction-router`
**测试数**: 8 个
**测试结果**: ✅ 8 passed, 0 failed
### 功能
- `NacLensJurisdictionRouter`: NAC_Lens 4.0 辖区路由器
- 支持消息类型: 单辖区交易、跨辖区交易、规则更新广播、CR广播、节点注册
- **跨辖区路由**: 源辖区和目标辖区各自独立处理各自出具CR参与即是共识非多签
- **规则更新**: 必须携带CA签名广播后立即生效约法即是治法
- **节点注册**: 必须携带 GIDS 辖区证明
---
## NRPC → NAC_Lens 更名
更新了以下文件中的 NRPC 引用(保留 `jsonrpc` 字段名不变):
- `nac-api-server/src/main.rs`: `NRPC/4.0``NAC_Lens/4.0`
- `nac-sdk/src/protocols/*.rs`: 注释更新
- `nac-asset-onboarding/src/*.rs`: 注释更新
- `nac-udm/src/l1_protocol/*/mod.rs`: 注释更新
---
## 测试汇总
| 模块 | 测试数 | 结果 |
|-----|------|------|
| nac-jurisdiction-rules (Issue #75) | 225 | ✅ 全部通过 |
| nac-jurisdiction-compat (Issue #76) | 6 | ✅ 全部通过 |
| nac-lens-jurisdiction-router (Issue #77) | 8 | ✅ 全部通过 |
| nac-cee-plugin-loader (Issue #73) | 7 | ✅ 全部通过 |
| nac-jurisdiction-version (Issue #74) | 6 | ✅ 全部通过 |
| **合计** | **252** | **✅ 全部通过** |

View File

@ -19,7 +19,7 @@
// Onboarding: localhost:9552 // Onboarding: localhost:9552
// //
// Chain ID: 5132611 // Chain ID: 5132611
// 协议: NRPC/4.0 // 协议: NAC_Lens/4.0
use axum::{ use axum::{
body::Body, body::Body,
@ -108,7 +108,7 @@ async fn main() {
let addr = format!("{}:{}", host, port); let addr = format!("{}:{}", host, port);
info!("╔══════════════════════════════════════════════════════╗"); info!("╔══════════════════════════════════════════════════════╗");
info!("║ NAC API Server v3.0.0 - 主网统一入口 ║"); info!("║ NAC API Server v3.0.0 - 主网统一入口 ║");
info!("║ 协议: NRPC/4.0 Chain ID: 5132611 ║"); info!("║ 协议: NAC_Lens/4.0 Chain ID: 5132611 ║");
info!("╚══════════════════════════════════════════════════════╝"); info!("╚══════════════════════════════════════════════════════╝");
info!("监听地址: {}", addr); info!("监听地址: {}", addr);
info!("集成模块: CBPP / CSNP / NVM / 宪法层 / ACC / Charter"); info!("集成模块: CBPP / CSNP / NVM / 宪法层 / ACC / Charter");
@ -279,7 +279,7 @@ async fn root_info() -> Json<serde_json::Value> {
Json(serde_json::json!({ Json(serde_json::json!({
"service": "NAC API Server", "service": "NAC API Server",
"version": "3.0.0", "version": "3.0.0",
"protocol": "NRPC/4.0", "protocol": "NAC_Lens/4.0",
"chain_id": 5132611, "chain_id": 5132611,
"network": "mainnet", "network": "mainnet",
"modules": [ "modules": [
@ -305,7 +305,7 @@ async fn health_check() -> Json<serde_json::Value> {
"status": "ok", "status": "ok",
"service": "nac-api-server", "service": "nac-api-server",
"version": "3.0.0", "version": "3.0.0",
"protocol": "NRPC/4.0", "protocol": "NAC_Lens/4.0",
"chain_id": 5132611 "chain_id": 5132611
})) }))
} }
@ -390,7 +390,7 @@ async fn aggregated_health(State(state): State<Arc<AppState>>) -> Json<serde_jso
"status": overall, "status": overall,
"service": "nac-api-server", "service": "nac-api-server",
"version": "3.0.0", "version": "3.0.0",
"protocol": "NRPC/4.0", "protocol": "NAC_Lens/4.0",
"chain_id": 5132611, "chain_id": 5132611,
"network": "mainnet", "network": "mainnet",
"timestamp": chrono::Utc::now().to_rfc3339(), "timestamp": chrono::Utc::now().to_rfc3339(),

View File

@ -1,11 +1,11 @@
//! 区块链集成适配器 //! 区块链集成适配器
//! //!
//! 通过 NRPC 4.0 协议与 NVM端口 9547和 CBPP端口 9545交互 //! 通过 NAC_Lens 4.0 协议与 NVM端口 9547和 CBPP端口 9545交互
//! 实现资产上链、交易提交和区块查询功能。 //! 实现资产上链、交易提交和区块查询功能。
//! //!
//! **注意**:本模块使用 NAC 原生技术栈: //! **注意**:本模块使用 NAC 原生技术栈:
//! - NVMNAC 虚拟机)而非 EVM //! - NVMNAC 虚拟机)而非 EVM
//! - NRPC 4.0 而非 JSON-RPC //! - NAC_Lens 4.0 而非 JSON-RPC
//! - CBPP宪政区块生产协议而非 PoS/PoW //! - CBPP宪政区块生产协议而非 PoS/PoW
use crate::error::{OnboardingError, Result}; use crate::error::{OnboardingError, Result};
@ -17,7 +17,7 @@ use tracing::info;
/// ///
/// 封装与 NVM 和 CBPP 的交互逻辑,提供资产上链的统一接口。 /// 封装与 NVM 和 CBPP 的交互逻辑,提供资产上链的统一接口。
pub struct BlockchainAdapter { pub struct BlockchainAdapter {
/// NVM 客户端(通过 NRPC 4.0 通信) /// NVM 客户端(通过 NAC_Lens 4.0 通信)
nvm_client: NVMClient, nvm_client: NVMClient,
/// CBPP 共识接口(宪政区块生产协议,非投票制) /// CBPP 共识接口(宪政区块生产协议,非投票制)
cbpp: CBPPConsensus, cbpp: CBPPConsensus,
@ -96,13 +96,13 @@ impl BlockchainAdapter {
/// 查询区块信息 /// 查询区块信息
pub async fn get_block(&self, block_number: u64) -> Result<String> { pub async fn get_block(&self, block_number: u64) -> Result<String> {
// TODO: 通过 NRPC 4.0 查询 CBPP 节点获取区块信息 // TODO: 通过 NAC_Lens 4.0 查询 CBPP 节点获取区块信息
Ok(format!("{{\"block_number\": {}, \"producer\": \"CBP-DID\", \"receipts\": []}}", block_number)) Ok(format!("{{\"block_number\": {}, \"producer\": \"CBP-DID\", \"receipts\": []}}", block_number))
} }
/// 查询交易信息 /// 查询交易信息
pub async fn get_transaction(&self, tx_hash: &str) -> Result<String> { pub async fn get_transaction(&self, tx_hash: &str) -> Result<String> {
// TODO: 通过 NRPC 4.0 查询 NVM 获取交易详情 // TODO: 通过 NAC_Lens 4.0 查询 NVM 获取交易详情
Ok(format!("{{\"tx_hash\": \"{}\", \"status\": \"confirmed\"}}", tx_hash)) Ok(format!("{{\"tx_hash\": \"{}\", \"status\": \"confirmed\"}}", tx_hash))
} }
} }

View File

@ -13,7 +13,7 @@ use tracing::info;
/// ///
/// 封装 ACC-20 协议的代币部署和查询逻辑。 /// 封装 ACC-20 协议的代币部署和查询逻辑。
pub struct TokenAdapter { pub struct TokenAdapter {
/// NVM 服务端点(通过 NRPC 4.0 通信) /// NVM 服务端点(通过 NAC_Lens 4.0 通信)
nvm_endpoint: String, nvm_endpoint: String,
} }
@ -39,7 +39,7 @@ impl TokenAdapter {
// 生成代币符号NAC 原生格式) // 生成代币符号NAC 原生格式)
let token_symbol = self.generate_symbol(&submission.asset_name); let token_symbol = self.generate_symbol(&submission.asset_name);
// TODO: 通过 NRPC 4.0 调用 NVM 部署 Charter ACC-20 合约 // TODO: 通过 NAC_Lens 4.0 调用 NVM 部署 Charter ACC-20 合约
// 当前为 stub 实现,待 NVM 服务接口稳定后替换 // 当前为 stub 实现,待 NVM 服务接口稳定后替换
let token_address = format!( let token_address = format!(
"NAC-ACC20-{}-{}", "NAC-ACC20-{}-{}",
@ -78,7 +78,7 @@ impl TokenAdapter {
/// 查询 ACC-20 代币余额 /// 查询 ACC-20 代币余额
pub async fn get_balance(&self, token_address: &str, owner: &str) -> Result<Decimal> { pub async fn get_balance(&self, token_address: &str, owner: &str) -> Result<Decimal> {
// TODO: 通过 NRPC 4.0 查询 NVM 中的 ACC-20 合约余额 // TODO: 通过 NAC_Lens 4.0 查询 NVM 中的 ACC-20 合约余额
let _ = (token_address, owner, &self.nvm_endpoint); let _ = (token_address, owner, &self.nvm_endpoint);
Ok(Decimal::ZERO) Ok(Decimal::ZERO)
} }

View File

@ -398,7 +398,7 @@ pub struct XTZHMintResult {
pub amount_minted: u128, pub amount_minted: u128,
} }
/// NVM 客户端(通过 NRPC 4.0 与 NVM 服务交互,端口 9547 /// NVM 客户端(通过 NAC_Lens 4.0 与 NVM 服务交互,端口 9547
pub struct NVMClient { pub struct NVMClient {
/// NVM 服务端点 /// NVM 服务端点
pub endpoint: String, pub endpoint: String,
@ -412,14 +412,14 @@ impl NVMClient {
/// 部署 Charter 合约到 NVM /// 部署 Charter 合约到 NVM
pub async fn deploy_contract(&self, bytecode: &[u8]) -> Result<String, String> { pub async fn deploy_contract(&self, bytecode: &[u8]) -> Result<String, String> {
// TODO: 通过 NRPC 4.0 部署合约 // TODO: 通过 NAC_Lens 4.0 部署合约
let _ = bytecode; let _ = bytecode;
Ok(format!("CONTRACT-ADDR-{}", hex::encode(&bytecode[..4.min(bytecode.len())]))) Ok(format!("CONTRACT-ADDR-{}", hex::encode(&bytecode[..4.min(bytecode.len())])))
} }
/// 调用 Charter 合约方法 /// 调用 Charter 合约方法
pub async fn call_contract(&self, address: &str, method: &str, args: &[u8]) -> Result<Vec<u8>, String> { pub async fn call_contract(&self, address: &str, method: &str, args: &[u8]) -> Result<Vec<u8>, String> {
// TODO: 通过 NRPC 4.0 调用合约 // TODO: 通过 NAC_Lens 4.0 调用合约
let _ = (address, method, args); let _ = (address, method, args);
Ok(vec![]) Ok(vec![])
} }

View File

@ -0,0 +1,336 @@
// nac-cbpp-l0/src/jurisdiction_block.rs
// CBPP 多辖区区块头扩展
//
// CBPP 四大原则:
// 约法即是治法 — 宪法条款直接约束区块生产行为,无宪法外治理
// 宪法即是规则 — 区块合法性由宪法条款判定,规则来源于辖区真实法律
// 参与即是共识 — 节点将交易打包进区块,即是对所有涉及辖区 CR 的背书,无需多签
// 节点产生区块,交易决定区块大小 — jurisdiction_merkle_root 大小由实际
// 跨辖区交易数量动态决定,不是固定字段
use serde::{Deserialize, Serialize};
use sha3::{Digest, Sha3_384};
use std::collections::{BTreeMap, BTreeSet};
/// 辖区 IDISO 3166-1 数字码 + 子辖区扩展)
/// 高 16 位:国家码;低 16 位子辖区扩展0 = 全国)
pub type JurisdictionId = u32;
/// 辖区宪法收据哈希SHA3-38448 字节)
///
/// 由 CEE 节点执行辖区插件后独立生成。
/// 辖区插件的规则来源于辖区政府授权 CA 签名的真实法律文件,
/// 不是链上治理决定。
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CrHash(pub Vec<u8>);
impl CrHash {
pub fn new(bytes: [u8; 48]) -> Self {
Self(bytes.to_vec())
}
pub fn zero() -> Self {
Self(vec![0u8; 48])
}
pub fn is_valid(&self) -> bool {
self.0.len() == 48 && self.0 != vec![0u8; 48]
}
}
/// 单笔跨辖区交易的辖区收据集合
///
/// 每个涉及辖区都有一个独立的 CR 哈希。
/// 各辖区 CEE 节点独立执行本辖区插件后生成,
/// 节点将其打包进区块即是背书(参与即共识)。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TxJurisdictionReceipts {
/// 交易 IDSHA3-38448 字节)
pub tx_id: Vec<u8>,
/// 辖区 → CR 哈希 映射BTreeMap 保证确定性排序)
pub receipts: BTreeMap<JurisdictionId, CrHash>,
}
impl TxJurisdictionReceipts {
pub fn new(tx_id: Vec<u8>) -> Self {
Self {
tx_id,
receipts: BTreeMap::new(),
}
}
/// 添加某辖区的独立 CR
/// 各辖区 CEE 节点执行本辖区插件后直接写入,无需其他辖区确认
pub fn add_receipt(&mut self, jurisdiction: JurisdictionId, cr_hash: CrHash) {
self.receipts.insert(jurisdiction, cr_hash);
}
/// 验证指定辖区的 CR 是否存在且有效
pub fn has_valid_receipt_for(&self, jurisdiction: JurisdictionId) -> bool {
self.receipts
.get(&jurisdiction)
.map(|cr| cr.is_valid())
.unwrap_or(false)
}
/// 获取所有涉及辖区列表
pub fn jurisdictions(&self) -> Vec<JurisdictionId> {
self.receipts.keys().copied().collect()
}
}
/// 区块辖区默克尔树
///
/// 由区块内所有跨辖区交易的 CR 哈希构建。
/// 区块大小由实际交易数量决定,默克尔树大小随之动态变化。
/// 节点将此树根写入区块头,即是对所有辖区规则合规性的背书。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JurisdictionMerkleTree {
/// 叶节点列表
pub leaves: Vec<Vec<u8>>,
/// 默克尔树根48 字节 SHA3-384
pub root: Vec<u8>,
/// 涉及辖区总数
pub jurisdiction_count: u32,
/// 跨辖区交易总数(体现"交易决定区块大小"原则)
pub cross_tx_count: u32,
}
impl JurisdictionMerkleTree {
/// 从区块内所有跨辖区交易的收据集合构建默克尔树
/// 交易数量决定树的大小,完全动态
pub fn build(tx_receipts: &[TxJurisdictionReceipts]) -> Self {
let mut leaves: Vec<Vec<u8>> = Vec::new();
let mut all_jurisdictions = BTreeSet::new();
for tx_receipt in tx_receipts {
for (jid, cr_hash) in &tx_receipt.receipts {
// 叶节点 = SHA3-384(tx_id || jid_be_bytes || cr_hash)
let mut hasher = Sha3_384::new();
hasher.update(&tx_receipt.tx_id);
hasher.update(&jid.to_be_bytes());
hasher.update(&cr_hash.0);
leaves.push(hasher.finalize().to_vec());
all_jurisdictions.insert(*jid);
}
}
let root = if leaves.is_empty() {
vec![0u8; 48]
} else {
Self::compute_root(&leaves)
};
Self {
jurisdiction_count: all_jurisdictions.len() as u32,
cross_tx_count: tx_receipts.len() as u32,
root,
leaves,
}
}
/// SHA3-384 两两合并默克尔树根
fn compute_root(leaves: &[Vec<u8>]) -> Vec<u8> {
if leaves.len() == 1 {
return leaves[0].clone();
}
let mut level = leaves.to_vec();
while level.len() > 1 {
let mut next = Vec::new();
let mut i = 0;
while i < level.len() {
let left = &level[i];
let right = level.get(i + 1).unwrap_or(&level[i]);
let mut h = Sha3_384::new();
h.update(left);
h.update(right);
next.push(h.finalize().to_vec());
i += 2;
}
level = next;
}
level.into_iter().next().unwrap_or_else(|| vec![0u8; 48])
}
/// 验证树根是否与期望值一致
pub fn verify_root(&self, expected: &[u8]) -> bool {
self.root == expected
}
}
/// CBPP 多辖区区块头扩展字段
///
/// 嵌入标准区块头,记录该区块内所有跨辖区交易的合规证明。
/// 节点将此扩展写入区块头即完成对所有涉及辖区宪法规则的背书(参与即共识)。
/// 区块大小由实际交易数量决定,此扩展大小随之动态变化。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BlockJurisdictionExtension {
/// 辖区默克尔树根48 字节 SHA3-384
/// 若区块内无跨辖区交易,则为全零
pub jurisdiction_merkle_root: Vec<u8>,
/// 涉及辖区数量
pub jurisdiction_count: u32,
/// 跨辖区交易数量(体现"交易决定区块大小"
pub cross_tx_count: u32,
/// 宪法版本哈希(辖区政府授权 CA 签名的法律文件集合哈希)
/// 确保所有节点使用相同版本的真实法律规则出块
pub constitution_version_hash: Vec<u8>,
}
impl BlockJurisdictionExtension {
/// 从跨辖区交易收据集合构建区块头扩展
pub fn build(
tx_receipts: &[TxJurisdictionReceipts],
constitution_version_hash: Vec<u8>,
) -> Self {
if tx_receipts.is_empty() {
return Self {
jurisdiction_merkle_root: vec![0u8; 48],
jurisdiction_count: 0,
cross_tx_count: 0,
constitution_version_hash,
};
}
let tree = JurisdictionMerkleTree::build(tx_receipts);
Self {
jurisdiction_merkle_root: tree.root,
jurisdiction_count: tree.jurisdiction_count,
cross_tx_count: tree.cross_tx_count,
constitution_version_hash,
}
}
/// 验证区块头扩展的合法性
pub fn validate(&self, tx_receipts: &[TxJurisdictionReceipts]) -> BlockExtensionValidation {
// 纯链内交易区块
if self.cross_tx_count == 0 {
return if self.jurisdiction_merkle_root == vec![0u8; 48] {
BlockExtensionValidation::Valid
} else {
BlockExtensionValidation::Invalid(
"跨辖区交易数为0但默克尔根非零".to_string(),
)
};
}
// 重新计算默克尔树验证
let tree = JurisdictionMerkleTree::build(tx_receipts);
if tree.root != self.jurisdiction_merkle_root {
return BlockExtensionValidation::Invalid(
"jurisdiction_merkle_root 与交易收据不匹配".to_string(),
);
}
if tree.jurisdiction_count != self.jurisdiction_count {
return BlockExtensionValidation::Invalid(
"辖区数量与默克尔树不一致".to_string(),
);
}
if tree.cross_tx_count != self.cross_tx_count {
return BlockExtensionValidation::Invalid(
"跨辖区交易数量与默克尔树不一致".to_string(),
);
}
BlockExtensionValidation::Valid
}
/// 是否为纯链内交易区块
pub fn is_intra_chain_only(&self) -> bool {
self.cross_tx_count == 0
}
}
/// 区块头扩展验证结果
#[derive(Debug, PartialEq)]
pub enum BlockExtensionValidation {
Valid,
Invalid(String),
}
#[cfg(test)]
mod tests {
use super::*;
fn tx_id(n: u8) -> Vec<u8> { vec![n; 48] }
fn cr(n: u8) -> CrHash { CrHash::new([n; 48]) }
#[test]
fn test_single_cross_tx_two_jurisdictions() {
let mut r = TxJurisdictionReceipts::new(tx_id(1));
r.add_receipt(784, cr(10)); // UAE
r.add_receipt(156, cr(20)); // China
let ext = BlockJurisdictionExtension::build(&[r.clone()], vec![0xAB; 48]);
assert_eq!(ext.cross_tx_count, 1);
assert_eq!(ext.jurisdiction_count, 2);
assert_ne!(ext.jurisdiction_merkle_root, vec![0u8; 48]);
assert_eq!(ext.validate(&[r]), BlockExtensionValidation::Valid);
}
#[test]
fn test_intra_chain_block() {
let ext = BlockJurisdictionExtension::build(&[], vec![0xAB; 48]);
assert!(ext.is_intra_chain_only());
assert_eq!(ext.validate(&[]), BlockExtensionValidation::Valid);
}
#[test]
fn test_dynamic_size_by_tx_count() {
// 交易决定区块大小10笔跨辖区交易 vs 1笔
let mut receipts_10 = Vec::new();
for i in 0..10u8 {
let mut r = TxJurisdictionReceipts::new(tx_id(i));
r.add_receipt(784, cr(i));
r.add_receipt(156, cr(i + 50));
receipts_10.push(r);
}
let ext_10 = BlockJurisdictionExtension::build(&receipts_10, vec![1u8; 48]);
let mut r1 = TxJurisdictionReceipts::new(tx_id(0));
r1.add_receipt(784, cr(0));
r1.add_receipt(156, cr(50));
let ext_1 = BlockJurisdictionExtension::build(&[r1], vec![1u8; 48]);
// 10笔交易的默克尔根与1笔不同体现动态性
assert_ne!(ext_10.jurisdiction_merkle_root, ext_1.jurisdiction_merkle_root);
assert_eq!(ext_10.cross_tx_count, 10);
assert_eq!(ext_1.cross_tx_count, 1);
assert_eq!(ext_10.validate(&receipts_10), BlockExtensionValidation::Valid);
}
#[test]
fn test_tampered_receipt_rejected() {
let mut r = TxJurisdictionReceipts::new(tx_id(1));
r.add_receipt(784, cr(10));
r.add_receipt(156, cr(20));
let ext = BlockJurisdictionExtension::build(&[r], vec![0xAB; 48]);
// 篡改 CR
let mut tampered = TxJurisdictionReceipts::new(tx_id(1));
tampered.add_receipt(784, cr(99));
tampered.add_receipt(156, cr(20));
assert!(matches!(ext.validate(&[tampered]), BlockExtensionValidation::Invalid(_)));
}
#[test]
fn test_participation_is_consensus_no_multisig() {
// 参与即共识:节点将 receipts 打包进区块头即完成背书,无需多签
let mut r = TxJurisdictionReceipts::new(tx_id(42));
r.add_receipt(784, cr(1)); // 单节点独立写入,无需其他节点确认
let ext = BlockJurisdictionExtension::build(&[r.clone()], vec![1u8; 48]);
// 验证通过即代表共识达成
assert_eq!(ext.validate(&[r]), BlockExtensionValidation::Valid);
}
#[test]
fn test_constitution_version_is_real_law_hash() {
// 宪法版本哈希代表辖区政府授权CA签名的真实法律文件集合
// 不是链上治理投票结果
let law_hash = vec![0xDE; 48]; // 模拟真实法律文件哈希
let ext = BlockJurisdictionExtension::build(&[], law_hash.clone());
assert_eq!(ext.constitution_version_hash, law_hash);
}
}

View File

@ -48,3 +48,4 @@ mod tests {
assert_eq!(stats.total_connections, 0); assert_eq!(stats.total_connections, 0);
} }
} }
pub mod jurisdiction_block;

22
nac-cee/Cargo.lock generated
View File

@ -11,6 +11,12 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "anyhow"
version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]] [[package]]
name = "arrayref" name = "arrayref"
version = "0.3.9" version = "0.3.9"
@ -344,6 +350,7 @@ name = "nac-cee"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"nac-udm", "nac-udm",
"nac-upgrade-framework",
"serde", "serde",
"serde_json", "serde_json",
"thiserror 1.0.69", "thiserror 1.0.69",
@ -357,6 +364,7 @@ dependencies = [
"chrono", "chrono",
"hex", "hex",
"log", "log",
"nac-upgrade-framework",
"primitive-types", "primitive-types",
"serde", "serde",
"serde_json", "serde_json",
@ -365,6 +373,20 @@ dependencies = [
"thiserror 2.0.18", "thiserror 2.0.18",
] ]
[[package]]
name = "nac-upgrade-framework"
version = "0.1.0"
dependencies = [
"anyhow",
"chrono",
"hex",
"log",
"serde",
"serde_json",
"sha3",
"thiserror 1.0.69",
]
[[package]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.19" version = "0.2.19"

View File

@ -0,0 +1,469 @@
// nac-cee/src/cross_jurisdiction_cluster.rs
// CEE 跨辖区共享集群
//
// 设计原则CBPP 四大原则):
// 参与即是共识 — 每个辖区 CEE 节点独立执行本辖区插件,生成本辖区 CR
// 节点将 CR 打包进区块即是背书,无需多签,无需其他辖区确认
// 宪法即是规则 — 辖区插件规则来源于辖区政府授权 CA 签名的真实法律文件
// 不是链上治理决定,不是链上投票结果
// 约法即是治法 — CEE 执行结果直接约束交易合法性,无宪法外规则
// 节点产生区块,交易决定区块大小 — CEE 处理的交易数量决定 CR 集合大小
use serde::{Deserialize, Serialize};
use sha3::{Digest, Sha3_384};
use std::collections::HashMap;
pub type JurisdictionId = u32;
/// 辖区插件元数据
///
/// 插件规则来源于辖区政府授权 CA 签名的真实法律文件。
/// 插件更新必须经辖区监管机构授权签名,不是链上治理决定。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JurisdictionPlugin {
/// 辖区 ID
pub jurisdiction: JurisdictionId,
/// 插件版本(由辖区政府授权 CA 签名时确定)
pub version: u32,
/// 插件内容哈希SHA3-384用于验证插件完整性
pub content_hash: Vec<u8>,
/// 辖区政府授权 CA 签名(证明插件规则来自真实法律)
pub ca_signature: Vec<u8>,
/// 对应的法律文件哈希集合(链上存证的真实法规)
pub law_document_hashes: Vec<Vec<u8>>,
/// 插件生效时间戳
pub effective_timestamp: u64,
}
impl JurisdictionPlugin {
/// 验证插件是否由合法 CA 签名(简化版,生产环境需完整 PKI 验证)
pub fn is_ca_signed(&self) -> bool {
!self.ca_signature.is_empty() && !self.content_hash.is_empty()
}
}
/// 单辖区 CEE 执行结果
///
/// 由该辖区的 CEE 节点独立执行本辖区插件后生成。
/// 参与即共识:节点将此结果打包进区块即完成背书,无需其他辖区节点确认。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JurisdictionCrResult {
/// 辖区 ID
pub jurisdiction: JurisdictionId,
/// 宪法收据哈希SHA3-38448 字节)
pub cr_hash: Vec<u8>,
/// 执行的插件版本
pub plugin_version: u32,
/// 执行时间戳
pub timestamp: u64,
/// 执行结果:通过/拒绝
pub approved: bool,
/// 拒绝原因(若 approved = false
pub rejection_reason: Option<String>,
}
impl JurisdictionCrResult {
/// 生成 CR 哈希
/// CR = SHA3-384(jurisdiction_id || plugin_version || tx_id || approved_byte || timestamp)
pub fn compute_cr_hash(
jurisdiction: JurisdictionId,
plugin_version: u32,
tx_id: &[u8],
approved: bool,
timestamp: u64,
) -> Vec<u8> {
let mut hasher = Sha3_384::new();
hasher.update(&jurisdiction.to_be_bytes());
hasher.update(&plugin_version.to_be_bytes());
hasher.update(tx_id);
hasher.update(&[if approved { 1u8 } else { 0u8 }]);
hasher.update(&timestamp.to_be_bytes());
hasher.finalize().to_vec()
}
}
/// 跨辖区交易的完整 CEE 执行结果
///
/// 包含所有涉及辖区的独立 CR。
/// 每个辖区的 CR 由该辖区 CEE 节点独立生成,互不依赖。
/// 交易最终合法性:所有涉及辖区的 CR 均为 approved = true。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CrossJurisdictionCeeResult {
/// 交易 ID
pub tx_id: Vec<u8>,
/// 各辖区独立执行结果(辖区 → CR 结果)
pub jurisdiction_results: HashMap<JurisdictionId, JurisdictionCrResult>,
/// 整体是否通过(所有辖区 CR 均通过)
pub overall_approved: bool,
}
impl CrossJurisdictionCeeResult {
pub fn new(tx_id: Vec<u8>) -> Self {
Self {
tx_id,
jurisdiction_results: HashMap::new(),
overall_approved: false,
}
}
/// 添加某辖区的独立 CR 执行结果
/// 各辖区独立添加,无需等待其他辖区(参与即共识)
pub fn add_jurisdiction_result(&mut self, result: JurisdictionCrResult) {
let approved = result.approved;
self.jurisdiction_results.insert(result.jurisdiction, result);
// 重新计算整体结果:所有辖区均通过才算通过
self.overall_approved = self
.jurisdiction_results
.values()
.all(|r| r.approved);
// 如果新加入的辖区拒绝,立即标记整体失败
if !approved {
self.overall_approved = false;
}
}
/// 检查指定辖区的 CR 是否已就绪
pub fn has_result_for(&self, jurisdiction: JurisdictionId) -> bool {
self.jurisdiction_results.contains_key(&jurisdiction)
}
/// 获取所有已完成的辖区列表
pub fn completed_jurisdictions(&self) -> Vec<JurisdictionId> {
self.jurisdiction_results.keys().copied().collect()
}
}
/// CEE 跨辖区共享集群
///
/// 并行加载多个辖区插件,各辖区 CEE 节点独立执行本辖区插件。
/// 不存在"多签"机制——每个辖区的 CR 由该辖区节点独立出具。
/// 节点将所有 CR 打包进区块头即完成对所有辖区规则的背书(参与即共识)。
pub struct CrossJurisdictionCeeCluster {
/// 已加载的辖区插件(辖区 → 插件元数据)
plugins: HashMap<JurisdictionId, JurisdictionPlugin>,
/// 本节点所属辖区
local_jurisdiction: JurisdictionId,
}
impl CrossJurisdictionCeeCluster {
pub fn new(local_jurisdiction: JurisdictionId) -> Self {
Self {
plugins: HashMap::new(),
local_jurisdiction,
}
}
/// 加载辖区插件
/// 插件必须有合法 CA 签名(来自辖区政府授权的真实法律文件)
pub fn load_plugin(&mut self, plugin: JurisdictionPlugin) -> Result<(), String> {
if !plugin.is_ca_signed() {
return Err(format!(
"辖区 {} 插件未经授权 CA 签名,拒绝加载:规则必须来自真实法律",
plugin.jurisdiction
));
}
self.plugins.insert(plugin.jurisdiction, plugin);
Ok(())
}
/// 执行本辖区的 CEE 验证(本节点只负责本辖区)
///
/// 参与即共识:本节点执行本辖区插件,生成本辖区 CR
/// 打包进区块即完成背书。无需等待其他辖区节点。
pub fn execute_local_jurisdiction(
&self,
tx_id: &[u8],
tx_data: &TransactionData,
timestamp: u64,
) -> Result<JurisdictionCrResult, String> {
let plugin = self.plugins.get(&self.local_jurisdiction).ok_or_else(|| {
format!("本辖区 {} 插件未加载", self.local_jurisdiction)
})?;
// 执行本辖区规则验证
let (approved, rejection_reason) =
self.execute_plugin_rules(plugin, tx_data);
let cr_hash = JurisdictionCrResult::compute_cr_hash(
self.local_jurisdiction,
plugin.version,
tx_id,
approved,
timestamp,
);
Ok(JurisdictionCrResult {
jurisdiction: self.local_jurisdiction,
cr_hash,
plugin_version: plugin.version,
timestamp,
approved,
rejection_reason,
})
}
/// 执行指定辖区的 CEE 验证(用于共享集群模式)
///
/// 在共享集群中,一个 CEE 节点可以为多个辖区执行验证,
/// 但每个辖区的 CR 仍然是独立生成的,互不依赖。
pub fn execute_for_jurisdiction(
&self,
jurisdiction: JurisdictionId,
tx_id: &[u8],
tx_data: &TransactionData,
timestamp: u64,
) -> Result<JurisdictionCrResult, String> {
let plugin = self.plugins.get(&jurisdiction).ok_or_else(|| {
format!("辖区 {} 插件未加载", jurisdiction)
})?;
let (approved, rejection_reason) =
self.execute_plugin_rules(plugin, tx_data);
let cr_hash = JurisdictionCrResult::compute_cr_hash(
jurisdiction,
plugin.version,
tx_id,
approved,
timestamp,
);
Ok(JurisdictionCrResult {
jurisdiction,
cr_hash,
plugin_version: plugin.version,
timestamp,
approved,
rejection_reason,
})
}
/// 并行执行所有涉及辖区的验证(共享集群核心方法)
///
/// 各辖区独立执行,各自生成独立 CR互不依赖。
/// 这是"参与即共识"的具体实现:节点将所有 CR 打包进区块即完成背书。
pub fn execute_all_jurisdictions(
&self,
tx_id: &[u8],
tx_data: &TransactionData,
target_jurisdictions: &[JurisdictionId],
timestamp: u64,
) -> CrossJurisdictionCeeResult {
let mut result = CrossJurisdictionCeeResult::new(tx_id.to_vec());
for &jid in target_jurisdictions {
match self.execute_for_jurisdiction(jid, tx_id, tx_data, timestamp) {
Ok(cr_result) => {
result.add_jurisdiction_result(cr_result);
}
Err(e) => {
// 插件未加载视为该辖区拒绝(宪法即是规则:无插件即无法验证)
result.add_jurisdiction_result(JurisdictionCrResult {
jurisdiction: jid,
cr_hash: vec![0u8; 48],
plugin_version: 0,
timestamp,
approved: false,
rejection_reason: Some(format!("插件未加载: {}", e)),
});
}
}
}
result
}
/// 执行辖区插件规则(简化版规则引擎)
///
/// 生产环境中此处加载 WASM 沙箱执行辖区插件A48 条款约束)
fn execute_plugin_rules(
&self,
plugin: &JurisdictionPlugin,
tx_data: &TransactionData,
) -> (bool, Option<String>) {
// 基础合规检查:金额限制(来自辖区法律文件的规则)
if tx_data.amount > tx_data.jurisdiction_amount_limit {
return (
false,
Some(format!(
"交易金额 {} 超过辖区 {} 限额 {}(来源:辖区法律文件哈希 {:?}",
tx_data.amount,
plugin.jurisdiction,
tx_data.jurisdiction_amount_limit,
plugin.law_document_hashes.first()
)),
);
}
// KYC 级别检查
if tx_data.kyc_level < tx_data.required_kyc_level {
return (
false,
Some(format!(
"KYC 级别不足:需要 {},实际 {}",
tx_data.required_kyc_level, tx_data.kyc_level
)),
);
}
(true, None)
}
/// 获取已加载的辖区列表
pub fn loaded_jurisdictions(&self) -> Vec<JurisdictionId> {
self.plugins.keys().copied().collect()
}
}
/// 交易数据(用于 CEE 规则验证)
#[derive(Debug, Clone)]
pub struct TransactionData {
pub amount: u64,
pub jurisdiction_amount_limit: u64,
pub kyc_level: u8,
pub required_kyc_level: u8,
pub asset_type: String,
}
#[cfg(test)]
mod tests {
use super::*;
fn make_plugin(jurisdiction: JurisdictionId, version: u32) -> JurisdictionPlugin {
JurisdictionPlugin {
jurisdiction,
version,
content_hash: vec![0xAB; 48],
ca_signature: vec![0xCD; 64], // 模拟 CA 签名
law_document_hashes: vec![vec![0xEF; 48]],
effective_timestamp: 1700000000,
}
}
fn make_tx_data(amount: u64, limit: u64) -> TransactionData {
TransactionData {
amount,
jurisdiction_amount_limit: limit,
kyc_level: 2,
required_kyc_level: 1,
asset_type: "RWA".to_string(),
}
}
#[test]
fn test_plugin_requires_ca_signature() {
// 宪法即是规则:插件必须有 CA 签名,规则来自真实法律
let mut cluster = CrossJurisdictionCeeCluster::new(784);
let mut plugin = make_plugin(784, 100);
plugin.ca_signature = vec![]; // 无签名
assert!(cluster.load_plugin(plugin).is_err());
}
#[test]
fn test_each_jurisdiction_independent_cr() {
// 参与即共识:各辖区独立生成 CR互不依赖
let mut cluster = CrossJurisdictionCeeCluster::new(784);
cluster.load_plugin(make_plugin(784, 100)).unwrap();
cluster.load_plugin(make_plugin(156, 100)).unwrap();
cluster.load_plugin(make_plugin(840, 100)).unwrap();
let tx_id = vec![1u8; 48];
let tx_data = make_tx_data(1000, 100000);
let result = cluster.execute_all_jurisdictions(
&tx_id,
&tx_data,
&[784, 156, 840],
1700000000,
);
// 三个辖区各自独立生成 CR
assert_eq!(result.completed_jurisdictions().len(), 3);
assert!(result.has_result_for(784));
assert!(result.has_result_for(156));
assert!(result.has_result_for(840));
assert!(result.overall_approved);
// 各辖区 CR 哈希不同(各自独立计算)
let cr_784 = &result.jurisdiction_results[&784].cr_hash;
let cr_156 = &result.jurisdiction_results[&156].cr_hash;
assert_ne!(cr_784, cr_156);
}
#[test]
fn test_one_jurisdiction_rejection_fails_overall() {
// 任一辖区拒绝,整体失败(宪法即是规则)
let mut cluster = CrossJurisdictionCeeCluster::new(784);
cluster.load_plugin(make_plugin(784, 100)).unwrap();
cluster.load_plugin(make_plugin(156, 100)).unwrap();
let tx_id = vec![2u8; 48];
// 金额超过辖区限额(模拟辖区法律规定的限额)
let tx_data = make_tx_data(999999, 1000);
let result = cluster.execute_all_jurisdictions(
&tx_id,
&tx_data,
&[784, 156],
1700000000,
);
assert!(!result.overall_approved);
// 两个辖区都拒绝
assert!(!result.jurisdiction_results[&784].approved);
assert!(!result.jurisdiction_results[&156].approved);
}
#[test]
fn test_no_multisig_each_cr_independent() {
// 验证"无多签":每个辖区的 CR 哈希独立计算,不依赖其他辖区
let mut cluster = CrossJurisdictionCeeCluster::new(784);
cluster.load_plugin(make_plugin(784, 100)).unwrap();
let tx_id = vec![3u8; 48];
let tx_data = make_tx_data(500, 100000);
// 单独执行辖区 784不需要等待其他辖区
let cr = cluster.execute_local_jurisdiction(&tx_id, &tx_data, 1700000000);
assert!(cr.is_ok());
let cr = cr.unwrap();
assert!(cr.approved);
assert_eq!(cr.jurisdiction, 784);
assert!(!cr.cr_hash.is_empty());
}
#[test]
fn test_missing_plugin_treated_as_rejection() {
// 无插件 = 无法验证 = 拒绝(宪法即是规则:无规则即违规)
let cluster = CrossJurisdictionCeeCluster::new(784);
// 不加载任何插件
let result = cluster.execute_all_jurisdictions(
&vec![4u8; 48],
&make_tx_data(100, 100000),
&[784],
1700000000,
);
assert!(!result.overall_approved);
assert!(!result.jurisdiction_results[&784].approved);
}
#[test]
fn test_transaction_count_determines_cr_set_size() {
// 交易决定区块大小:处理的交易数量决定 CR 集合大小
let mut cluster = CrossJurisdictionCeeCluster::new(784);
cluster.load_plugin(make_plugin(784, 100)).unwrap();
cluster.load_plugin(make_plugin(156, 100)).unwrap();
// 单辖区交易 → 1个 CR
let result_single = cluster.execute_all_jurisdictions(
&vec![5u8; 48], &make_tx_data(100, 100000), &[784], 1700000000,
);
assert_eq!(result_single.jurisdiction_results.len(), 1);
// 双辖区交易 → 2个独立 CR
let result_double = cluster.execute_all_jurisdictions(
&vec![6u8; 48], &make_tx_data(100, 100000), &[784, 156], 1700000000,
);
assert_eq!(result_double.jurisdiction_results.len(), 2);
}
}

View File

@ -312,3 +312,4 @@ mod tests {
assert_eq!(stats.size, 0); assert_eq!(stats.size, 0);
} }
} }
pub mod cross_jurisdiction_cluster;

View File

@ -426,6 +426,7 @@ name = "nac-constitution-clauses"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"nac-udm", "nac-udm",
"nac-upgrade-framework",
"serde", "serde",
"serde_json", "serde_json",
"sha3", "sha3",
@ -440,12 +441,27 @@ dependencies = [
"chrono", "chrono",
"hex", "hex",
"log", "log",
"nac-upgrade-framework",
"primitive-types", "primitive-types",
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
"sha3", "sha3",
"thiserror", "thiserror 2.0.18",
]
[[package]]
name = "nac-upgrade-framework"
version = "0.1.0"
dependencies = [
"anyhow",
"chrono",
"hex",
"log",
"serde",
"serde_json",
"sha3",
"thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -727,13 +743,33 @@ dependencies = [
"windows-sys", "windows-sys",
] ]
[[package]]
name = "thiserror"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [
"thiserror-impl 1.0.69",
]
[[package]] [[package]]
name = "thiserror" name = "thiserror"
version = "2.0.18" version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl 2.0.18",
]
[[package]]
name = "thiserror-impl"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn",
] ]
[[package]] [[package]]

View File

@ -1,14 +0,0 @@
//! 模块升级实现
use nac_upgrade_framework::{
traits::Upgradeable, UpgradeData, UpgradeRecord, Version, Result, UpgradeError,
};
// 注意:需要在主结构体中添加以下字段:
// - version: Version
// - upgrade_history: Vec<UpgradeRecord>
//
// 并实现 do_upgrade 方法来执行实际的升级逻辑
// 使用宏快速实现Upgradeable trait
// nac_upgrade_framework::impl_upgradeable!(YourStruct, "module-name", Version::new(1, 0, 0));

View File

@ -197,17 +197,20 @@ pub struct UpgradeManager {
proposals: HashMap<u64, UpgradeProposal>, proposals: HashMap<u64, UpgradeProposal>,
/// 下一个提案ID /// 下一个提案ID
next_proposal_id: u64, next_proposal_id: u64,
/// 宪法审查委员会成员 /// 授权辖区CA列表CBPP原则宪法修正须经辖区授权CA签名约法即是治法
review_committee: Vec<String>, /// 不是委员会投票,而是辖区监管机构的数字签名授权
authorized_jurisdiction_cas: Vec<String>,
} }
impl UpgradeManager { impl UpgradeManager {
/// 创建新的升级管理器 /// 创建新的升级管理器
pub fn new(review_committee: Vec<String>) -> Self { /// 创建升级管理器
/// authorized_cas: 授权辖区CA的DID列表由辖区监管机构颁发非投票委员会
pub fn new(authorized_jurisdiction_cas: Vec<String>) -> Self {
Self { Self {
proposals: HashMap::new(), proposals: HashMap::new(),
next_proposal_id: 1, next_proposal_id: 1,
review_committee, authorized_jurisdiction_cas,
} }
} }

View File

@ -0,0 +1,167 @@
// NAC公链宪法增补条款 v2 补丁
// Issue #71 | 版本: 2.0 | 新增 A44-A52 条款 + 修正 A42
// 基于《NAC公链多辖区节点共享方案与技术落地白皮书》
//
// CBPP 四大原则:
// 约法即是治法 — 宪法条款直接约束链行为,无宪法外治理
// 宪法即是规则 — 规则来源于辖区真实法律,不是链上投票
// 参与即是共识 — 节点参与出块即是对宪法规则的背书
// 节点产生区块,交易决定区块大小 — 动态区块,无固定大小
// ============================================================
// 修正条款A42 修正版)
// 原版错误AI模型更新经过"治理投票"
// 修正原因链上投票不能改变国家法律AI模型规则来自辖区监管机构
// ============================================================
clause A42_AiModelUpdate_v2
name: "AI模型更新授权"
description: "AI模型更新必须经辖区监管机构授权签名不经链上投票"
// 约法即是治法:规则来自辖区真实监管要求,不是链上治理决定
predicate: ai_model.update_has_regulator_signature == true
obligation: system.require_regulator_signature_for_ai_update per_epoch
test: A42v2_test_model_regulator_auth
// 替换原 A42_AiModelUpdate原版"治理投票"机制违反CBPP原则
supersedes: A42_AiModelUpdate
// ============================================================
// 第七章多辖区节点共享条款A44-A49
// ============================================================
clause A44_NodeSharingAllowed
name: "多辖区节点共享许可"
description: "允许不同辖区节点共享物理基础设施,前提是各辖区插件独立运行"
// 宪法即是规则:共享许可由宪法条款授权,不是链上投票
predicate: node.shared_infrastructure implies node.plugins_isolated
obligation: system.enforce_plugin_isolation_on_shared_nodes per_block
test: A44_test_node_sharing_with_isolation
clause A45_ResourceAllocationByNegotiation
name: "资源分配辖区协商"
description: "共享节点资源分配方案由辖区代表协商协商结果经辖区政府授权CA签名后成为宪法条款"
// 约法即是治法协商结果由辖区政府授权CA签名直接成为宪法条款无需链上投票
predicate: resource.allocation_has_ca_signature == true
obligation: system.enforce_ca_signed_resource_allocation per_block
test: A45_test_resource_allocation_ca_signed
clause A46_CrossJurisdictionBlockProduction
name: "跨辖区区块生产规则"
description: "涉及多辖区的区块必须在区块头包含所有涉及辖区的独立CR哈希默克尔树根"
// 参与即是共识节点将jurisdiction_merkle_root写入区块头即是对所有辖区CR的背书
// 节点产生区块,交易决定区块大小:默克尔树大小由实际跨辖区交易数量决定
predicate: block.has_cross_jurisdiction_txs implies block.has_jurisdiction_merkle_root
obligation: block.require_jurisdiction_merkle_root per_block
test: A46_test_jurisdiction_merkle_root_required
clause A47_GidsJurisdictionProof
name: "GIDS辖区证明绑定"
description: "节点身份必须绑定辖区证明辖区政府授权CA签名和当前插件哈希"
// 宪法即是规则节点身份由辖区政府授权CA签名确认不是链上治理决定
predicate: node.gids_has_jurisdiction_proof == true
obligation: system.require_gids_jurisdiction_proof per_block
test: A47_test_gids_jurisdiction_proof
clause A48_WasmPluginSandbox
name: "WASM插件沙箱约束"
description: "辖区规则插件在WASM沙箱中执行资源限制由宪法条款规定"
// 约法即是治法:沙箱资源限制是宪法条款,不是运行时配置
predicate: plugin.execution_env == "WASM_SANDBOX"
obligation: system.enforce_wasm_sandbox per_block
test: A48_test_wasm_sandbox_enforced
clause A49_CeeSharedClusterIndependentCr
name: "CEE共享集群独立CR原则"
description: "CEE共享集群并行执行多辖区插件各辖区独立出具CR不存在多签机制"
// 参与即是共识各辖区CEE节点独立执行本辖区插件生成本辖区CR
// 节点将CR打包进区块即完成背书无需多签无需其他辖区确认
predicate: cee.cross_jurisdiction_cr_independent == true
obligation: cee.enforce_independent_cr_per_jurisdiction per_block
test: A49_test_cee_independent_cr_no_multisig
// ============================================================
// 第八章宪法法院条款A50-A52
// ============================================================
clause A50_ConstitutionalCourtJurisdiction
name: "宪法法院管辖范围"
description: "宪法法院负责解决跨辖区法律冲突,裁决依据辖区已注册的真实法律文件哈希"
// 约法即是治法:宪法法院是法律执行机构,不是立法机构
// 链上投票不能改变国家法律,因此裁决不经过投票
predicate: court.ruling_basis == "registered_law_hashes"
obligation: court.require_law_hash_basis per_epoch
test: A50_test_court_ruling_based_on_real_law
clause A51_CourtRulingImmediateEffect
name: "宪法法院裁决即时生效"
description: "宪法法院裁决发布后立即生效,无需链上投票确认"
// 约法即是治法:裁决即是规则,无需额外确认机制
// 链上投票不能改变国家法律,裁决依据真实法律,无需投票背书
predicate: court.ruling_effective_immediately == true
obligation: system.enforce_ruling_without_vote per_block
test: A51_test_ruling_no_vote_required
clause A52_PluginUpdateRequiresRegulatoryAuth
name: "插件更新监管授权"
description: "辖区规则插件更新必须经辖区监管机构授权签名,反映真实法律变更"
// 宪法即是规则:插件规则来自辖区真实法律
// 插件更新 = 法律变更必须由辖区政府授权CA签名不是链上治理决定
predicate: plugin.update_has_regulatory_signature == true
obligation: system.require_regulatory_signature_for_plugin_update per_epoch
test: A52_test_plugin_update_regulatory_auth
// ============================================================
// 测试块(新增条款)
// ============================================================
test A42v2_test_model_regulator_auth {
assert ai_model.update_has_regulator_signature == true
// 验证AI模型更新不经链上投票而是经辖区监管机构授权签名
}
test A44_test_node_sharing_with_isolation {
assert node.shared_infrastructure implies node.plugins_isolated
// 验证:共享节点上各辖区插件严格隔离运行
}
test A45_test_resource_allocation_ca_signed {
assert resource.allocation_has_ca_signature == true
// 验证资源分配方案有辖区政府授权CA签名不是链上投票结果
}
test A46_test_jurisdiction_merkle_root_required {
assert block.has_cross_jurisdiction_txs implies block.has_jurisdiction_merkle_root
// 验证跨辖区区块必须包含jurisdiction_merkle_root
// 验证:默克尔树大小由实际交易数量决定(交易决定区块大小)
}
test A47_test_gids_jurisdiction_proof {
assert node.gids_has_jurisdiction_proof == true
// 验证节点身份绑定辖区政府授权CA签名的辖区证明
}
test A48_test_wasm_sandbox_enforced {
assert plugin.execution_env == "WASM_SANDBOX"
// 验证辖区插件在WASM沙箱中执行
}
test A49_test_cee_independent_cr_no_multisig {
assert cee.cross_jurisdiction_cr_independent == true
// 验证各辖区CR独立生成不存在多签机制
// 参与即是共识节点打包CR进区块即完成背书
}
test A50_test_court_ruling_based_on_real_law {
assert court.ruling_basis == "registered_law_hashes"
// 验证:裁决依据辖区真实法律文件哈希,不是链上治理决定
}
test A51_test_ruling_no_vote_required {
assert court.ruling_effective_immediately == true
// 验证:裁决即时生效,无需链上投票
// 链上投票不能改变国家法律
}
test A52_test_plugin_update_regulatory_auth {
assert plugin.update_has_regulatory_signature == true
// 验证:插件更新必须有辖区监管机构授权签名
}

View File

@ -0,0 +1,415 @@
// nac-csnp-l0/src/gids_jurisdiction_proof.rs
// GIDS 辖区证明增强 + 宪法法院链上裁决
//
// 核心原则:
// 约法即是治法 — 宪法法院裁决依据辖区真实法律文件哈希,裁决即生效
// 宪法即是规则 — 辖区规则来自政府授权 CA 签名的真实法律,不是链上投票
// 链上投票不能改变国家法律 — 宪法法院是法律执行机构,不是立法机构
// 参与即是共识 — 节点将裁决记录打包进区块即是对裁决合法性的背书
use serde::{Deserialize, Serialize};
use sha3::{Digest, Sha3_384};
pub type JurisdictionId = u32;
/// 辖区证明GIDS 增强版)
///
/// 节点身份绑定辖区证明 + 插件哈希,
/// 证明来自辖区政府授权 CA 签名,不是链上治理决定。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JurisdictionProof {
/// 节点 DID全局身份标识符
pub node_did: Vec<u8>,
/// 所属辖区
pub jurisdiction: JurisdictionId,
/// 辖区政府授权 CA 签名(证明节点合法注册于该辖区)
pub jurisdiction_ca_signature: Vec<u8>,
/// 当前加载的辖区插件哈希SHA3-384
pub plugin_hash: Vec<u8>,
/// 插件版本
pub plugin_version: u32,
/// 辖区政府对插件版本的授权签名
/// 插件更新必须经辖区监管机构授权,不是链上治理决定
pub plugin_authorization_signature: Vec<u8>,
/// 证明生效时间戳
pub effective_timestamp: u64,
/// 证明过期时间戳(辖区政府设定,不是链上投票决定)
pub expiry_timestamp: u64,
}
impl JurisdictionProof {
/// 验证辖区证明的基本合法性
pub fn is_valid(&self, current_timestamp: u64) -> ProofValidation {
if self.jurisdiction_ca_signature.is_empty() {
return ProofValidation::Invalid("缺少辖区 CA 签名".to_string());
}
if self.plugin_authorization_signature.is_empty() {
return ProofValidation::Invalid("缺少插件授权签名".to_string());
}
if self.plugin_hash.is_empty() {
return ProofValidation::Invalid("缺少插件哈希".to_string());
}
if current_timestamp > self.expiry_timestamp {
return ProofValidation::Expired {
expired_at: self.expiry_timestamp,
};
}
if current_timestamp < self.effective_timestamp {
return ProofValidation::NotYetEffective {
effective_at: self.effective_timestamp,
};
}
ProofValidation::Valid
}
/// 计算证明哈希(用于链上存证)
pub fn compute_hash(&self) -> Vec<u8> {
let mut hasher = Sha3_384::new();
hasher.update(&self.node_did);
hasher.update(&self.jurisdiction.to_be_bytes());
hasher.update(&self.plugin_hash);
hasher.update(&self.plugin_version.to_be_bytes());
hasher.update(&self.effective_timestamp.to_be_bytes());
hasher.update(&self.expiry_timestamp.to_be_bytes());
hasher.finalize().to_vec()
}
}
/// 辖区证明验证结果
#[derive(Debug, PartialEq)]
pub enum ProofValidation {
Valid,
Invalid(String),
Expired { expired_at: u64 },
NotYetEffective { effective_at: u64 },
}
/// 宪法法院裁决
///
/// 宪法法院是链上的法律执行机构,不是立法机构。
/// 裁决依据:辖区已注册的真实法律文件哈希(链上存证)。
/// 裁决即生效:无需链上投票确认(约法即是治法)。
/// 链上投票不能改变国家法律,因此裁决不经过投票。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ConstitutionalCourtRuling {
/// 裁决 IDSHA3-384
pub ruling_id: Vec<u8>,
/// 案件类型
pub case_type: CourtCaseType,
/// 涉及辖区
pub jurisdictions: Vec<JurisdictionId>,
/// 裁决依据的法律文件哈希列表(链上存证的真实法规)
/// 这些哈希对应辖区政府授权 CA 签名的真实法律文件
pub legal_basis_hashes: Vec<Vec<u8>>,
/// 裁决结论
pub conclusion: RulingConclusion,
/// 裁决理由(引用具体法律条款)
pub reasoning: String,
/// 裁决生效时间戳(裁决即生效,无需等待投票)
pub effective_timestamp: u64,
/// 执行截止时间戳(由宪法条款规定,不是链上投票决定)
pub execution_deadline: u64,
/// 裁决机构签名(宪法法院节点的私钥签名)
pub court_signature: Vec<u8>,
}
/// 宪法法院案件类型
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum CourtCaseType {
/// 辖区规则冲突(不同辖区法律对同一资产类型有互斥要求)
JurisdictionRuleConflict,
/// 节点违规(节点行为违反宪法条款)
NodeViolation,
/// 插件合法性争议(插件规则是否符合辖区真实法律)
PluginLegalityDispute,
/// 跨辖区资产合规争议
CrossJurisdictionComplianceDispute,
}
/// 裁决结论
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub enum RulingConclusion {
/// 支持(申请方合规)
Upheld,
/// 驳回(申请方违规)
Dismissed,
/// 辖区规则冲突:按优先级辖区规则执行
ConflictResolved {
/// 优先适用的辖区(通常为资产注册辖区)
primary_jurisdiction: JurisdictionId,
},
/// 要求辖区更新插件(辖区法律已变更,插件需同步)
PluginUpdateRequired {
jurisdiction: JurisdictionId,
/// 新插件必须经辖区政府重新授权签名
required_by: u64,
},
}
/// 宪法法院
///
/// 负责解决跨辖区法律冲突,裁决依据辖区真实法律文件。
/// 裁决即生效,无需链上投票(链上投票不能改变国家法律)。
pub struct ConstitutionalCourt {
/// 已注册的辖区法律文件哈希(辖区 → 法律文件哈希列表)
/// 这些哈希对应辖区政府授权 CA 签名的真实法律文件
registered_law_hashes: std::collections::HashMap<JurisdictionId, Vec<Vec<u8>>>,
/// 已生效的裁决记录
rulings: Vec<ConstitutionalCourtRuling>,
}
impl ConstitutionalCourt {
pub fn new() -> Self {
Self {
registered_law_hashes: std::collections::HashMap::new(),
rulings: Vec::new(),
}
}
/// 注册辖区法律文件哈希
///
/// 法律文件由辖区政府授权 CA 签名后上传,哈希存证于链上。
/// 这是宪法法院裁决的唯一依据。
pub fn register_law_documents(
&mut self,
jurisdiction: JurisdictionId,
law_hashes: Vec<Vec<u8>>,
ca_signature: &[u8],
) -> Result<(), String> {
if ca_signature.is_empty() {
return Err("法律文件注册必须提供辖区政府授权 CA 签名".to_string());
}
if law_hashes.is_empty() {
return Err("法律文件哈希列表不可为空".to_string());
}
self.registered_law_hashes.insert(jurisdiction, law_hashes);
Ok(())
}
/// 发布裁决
///
/// 裁决依据已注册的辖区法律文件哈希。
/// 裁决即生效,无需链上投票(约法即是治法)。
pub fn issue_ruling(
&mut self,
case_type: CourtCaseType,
jurisdictions: Vec<JurisdictionId>,
conclusion: RulingConclusion,
reasoning: String,
effective_timestamp: u64,
execution_deadline: u64,
court_signature: Vec<u8>,
) -> Result<Vec<u8>, String> {
if court_signature.is_empty() {
return Err("裁决必须有宪法法院节点签名".to_string());
}
// 验证裁决依据的法律文件是否已注册
let mut legal_basis_hashes = Vec::new();
for &jid in &jurisdictions {
if let Some(hashes) = self.registered_law_hashes.get(&jid) {
legal_basis_hashes.extend(hashes.clone());
}
// 注意:即使辖区未注册法律文件,裁决仍可发布
// 但裁决理由中必须说明(宪法即是规则)
}
// 计算裁决 ID
let mut hasher = Sha3_384::new();
hasher.update(&(case_type == CourtCaseType::JurisdictionRuleConflict).to_string().as_bytes());
for &jid in &jurisdictions {
hasher.update(&jid.to_be_bytes());
}
hasher.update(&effective_timestamp.to_be_bytes());
hasher.update(reasoning.as_bytes());
let ruling_id = hasher.finalize().to_vec();
let ruling = ConstitutionalCourtRuling {
ruling_id: ruling_id.clone(),
case_type,
jurisdictions,
legal_basis_hashes,
conclusion,
reasoning,
effective_timestamp,
execution_deadline,
court_signature,
};
self.rulings.push(ruling);
Ok(ruling_id)
}
/// 查询裁决(按裁决 ID
pub fn get_ruling(&self, ruling_id: &[u8]) -> Option<&ConstitutionalCourtRuling> {
self.rulings.iter().find(|r| r.ruling_id == ruling_id)
}
/// 查询辖区的所有相关裁决
pub fn get_rulings_for_jurisdiction(
&self,
jurisdiction: JurisdictionId,
) -> Vec<&ConstitutionalCourtRuling> {
self.rulings
.iter()
.filter(|r| r.jurisdictions.contains(&jurisdiction))
.collect()
}
/// 获取裁决总数
pub fn ruling_count(&self) -> usize {
self.rulings.len()
}
/// 检查辖区是否有已注册的法律文件
pub fn has_registered_laws(&self, jurisdiction: JurisdictionId) -> bool {
self.registered_law_hashes.contains_key(&jurisdiction)
}
}
impl Default for ConstitutionalCourt {
fn default() -> Self {
Self::new()
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_proof(jurisdiction: JurisdictionId, ts: u64) -> JurisdictionProof {
JurisdictionProof {
node_did: vec![0x01; 32],
jurisdiction,
jurisdiction_ca_signature: vec![0xCA; 64],
plugin_hash: vec![0xAB; 48],
plugin_version: 100,
plugin_authorization_signature: vec![0xAU; 64],
effective_timestamp: ts,
expiry_timestamp: ts + 86400 * 365, // 1年有效期
}
}
#[test]
fn test_jurisdiction_proof_valid() {
let proof = make_proof(784, 1700000000);
assert_eq!(proof.is_valid(1700000000), ProofValidation::Valid);
}
#[test]
fn test_jurisdiction_proof_expired() {
let proof = make_proof(784, 1700000000);
// 超过过期时间
let result = proof.is_valid(1700000000 + 86400 * 365 + 1);
assert!(matches!(result, ProofValidation::Expired { .. }));
}
#[test]
fn test_jurisdiction_proof_missing_ca_signature() {
let mut proof = make_proof(784, 1700000000);
proof.jurisdiction_ca_signature = vec![];
assert!(matches!(proof.is_valid(1700000000), ProofValidation::Invalid(_)));
}
#[test]
fn test_court_ruling_no_vote_required() {
// 约法即是治法:裁决即生效,无需投票
let mut court = ConstitutionalCourt::new();
// 注册法律文件(辖区政府授权 CA 签名)
court.register_law_documents(
784,
vec![vec![0xAB; 48]],
&[0xCA; 64],
).unwrap();
// 发布裁决(直接生效,无需投票)
let ruling_id = court.issue_ruling(
CourtCaseType::JurisdictionRuleConflict,
vec![784, 156],
RulingConclusion::ConflictResolved { primary_jurisdiction: 784 },
"依据 UAE VARA 法规第3条资产注册辖区规则优先".to_string(),
1700000000,
1700000000 + 86400 * 30, // 30天执行期
vec![0xCC; 64],
);
assert!(ruling_id.is_ok());
let id = ruling_id.unwrap();
// 裁决立即可查询(无需等待投票)
let ruling = court.get_ruling(&id);
assert!(ruling.is_some());
assert_eq!(court.ruling_count(), 1);
}
#[test]
fn test_court_ruling_requires_court_signature() {
// 裁决必须有宪法法院节点签名
let mut court = ConstitutionalCourt::new();
let result = court.issue_ruling(
CourtCaseType::NodeViolation,
vec![784],
RulingConclusion::Dismissed,
"节点违规".to_string(),
1700000000,
1700000000 + 86400,
vec![], // 无签名
);
assert!(result.is_err());
}
#[test]
fn test_law_registration_requires_ca_signature() {
// 法律文件注册必须有 CA 签名(来自辖区政府授权)
let mut court = ConstitutionalCourt::new();
let result = court.register_law_documents(
784,
vec![vec![0xAB; 48]],
&[], // 无 CA 签名
);
assert!(result.is_err());
}
#[test]
fn test_ruling_references_real_law_hashes() {
// 裁决依据真实法律文件哈希,不是链上投票结果
let mut court = ConstitutionalCourt::new();
let law_hash = vec![0xDE; 48];
court.register_law_documents(784, vec![law_hash.clone()], &[0xCA; 64]).unwrap();
let ruling_id = court.issue_ruling(
CourtCaseType::PluginLegalityDispute,
vec![784],
RulingConclusion::Upheld,
"依据已注册法律文件验证".to_string(),
1700000000,
1700000000 + 86400,
vec![0xCC; 64],
).unwrap();
let ruling = court.get_ruling(&ruling_id).unwrap();
// 裁决中包含真实法律文件哈希作为依据
assert!(ruling.legal_basis_hashes.contains(&law_hash));
}
#[test]
fn test_jurisdiction_query_rulings() {
let mut court = ConstitutionalCourt::new();
court.register_law_documents(784, vec![vec![0xAB; 48]], &[0xCA; 64]).unwrap();
court.register_law_documents(156, vec![vec![0xCD; 48]], &[0xCA; 64]).unwrap();
court.issue_ruling(
CourtCaseType::JurisdictionRuleConflict,
vec![784, 156],
RulingConclusion::ConflictResolved { primary_jurisdiction: 784 },
"辖区冲突裁决".to_string(),
1700000000, 1700000000 + 86400, vec![0xCC; 64],
).unwrap();
// 两个辖区都能查到相关裁决
assert_eq!(court.get_rulings_for_jurisdiction(784).len(), 1);
assert_eq!(court.get_rulings_for_jurisdiction(156).len(), 1);
assert_eq!(court.get_rulings_for_jurisdiction(840).len(), 0); // 无关辖区
}
}

View File

@ -0,0 +1,349 @@
// nac-csnp-l0/src/jurisdiction_router.rs
// CSNP 辖区感知路由与协议转换
//
// 设计原则:
// 宪法即是规则 — 路由规则由辖区宪法条款决定,不是网络层自定义规则
// 约法即是治法 — 协议转换必须保留原始 CR 作为法律证据,不可篡改
// 参与即是共识 — 中继节点转发即是对路由合法性的背书
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
pub type JurisdictionId = u32;
/// 节点网络端点
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NodeEndpoint {
pub node_id: Vec<u8>,
pub jurisdiction: JurisdictionId,
pub address: String,
/// 节点支持的插件版本(来自 GIDS辖区政府授权 CA 签名)
pub plugin_version: u32,
/// 节点是否为中继节点(可执行协议转换)
pub is_relay: bool,
}
/// 辖区路由表(从 GIDS 查询并缓存)
#[derive(Debug, Default)]
pub struct JurisdictionRoutingTable {
/// 辖区 → 节点端点列表
entries: HashMap<JurisdictionId, Vec<NodeEndpoint>>,
}
impl JurisdictionRoutingTable {
pub fn new() -> Self {
Self::default()
}
/// 注册辖区节点(从 GIDS 同步)
pub fn register(&mut self, endpoint: NodeEndpoint) {
self.entries
.entry(endpoint.jurisdiction)
.or_default()
.push(endpoint);
}
/// 查询目标辖区的可用节点列表
pub fn lookup(&self, jurisdiction: JurisdictionId) -> Vec<&NodeEndpoint> {
self.entries
.get(&jurisdiction)
.map(|v| v.iter().collect())
.unwrap_or_default()
}
/// 查询目标辖区的中继节点(用于协议转换)
pub fn lookup_relay(&self, jurisdiction: JurisdictionId) -> Vec<&NodeEndpoint> {
self.lookup(jurisdiction)
.into_iter()
.filter(|n| n.is_relay)
.collect()
}
/// 获取所有已知辖区
pub fn known_jurisdictions(&self) -> Vec<JurisdictionId> {
self.entries.keys().copied().collect()
}
}
/// 协议转换记录
///
/// 当源节点和目标节点辖区插件版本差异过大时,
/// 中继节点执行协议转换,但必须保留原始 CR 作为法律证据。
/// 约法即是治法:转换过程不得修改 CR 内容CR 是法律证明。
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ProtocolConversionRecord {
/// 原始交易 ID
pub tx_id: Vec<u8>,
/// 源辖区
pub source_jurisdiction: JurisdictionId,
/// 目标辖区
pub target_jurisdiction: JurisdictionId,
/// 源插件版本
pub source_plugin_version: u32,
/// 目标插件版本
pub target_plugin_version: u32,
/// 原始 CR不可修改作为法律证据存档
pub original_cr: Vec<u8>,
/// 转换后的交易格式版本
pub converted_format_version: u32,
/// 执行转换的中继节点 ID
pub relay_node_id: Vec<u8>,
/// 转换时间戳
pub timestamp: u64,
}
impl ProtocolConversionRecord {
/// 验证协议转换记录的合法性
/// 核心检查:原始 CR 必须存在且非空(法律证据不可缺失)
pub fn is_valid(&self) -> bool {
!self.original_cr.is_empty()
&& self.source_jurisdiction != self.target_jurisdiction
&& !self.tx_id.is_empty()
&& !self.relay_node_id.is_empty()
}
}
/// 辖区感知路由决策
#[derive(Debug, Clone, PartialEq)]
pub enum RoutingDecision {
/// 直接路由:目标节点与源节点同辖区,或目标辖区插件版本兼容
Direct { target_node_id: Vec<u8> },
/// 中继路由:需要协议转换,通过中继节点转发
Relay {
relay_node_id: Vec<u8>,
target_node_id: Vec<u8>,
},
/// 多播:交易涉及多个辖区,向所有相关辖区广播
Multicast { target_jurisdictions: Vec<JurisdictionId> },
/// 无法路由:目标辖区未知或无可用节点
Unreachable { reason: String },
}
/// 辖区感知路由器
pub struct JurisdictionRouter {
routing_table: JurisdictionRoutingTable,
/// 本节点所属辖区
local_jurisdiction: JurisdictionId,
/// 本节点插件版本
local_plugin_version: u32,
/// 版本兼容阈值(差距超过此值需要协议转换)
version_compat_threshold: u32,
}
impl JurisdictionRouter {
pub fn new(
local_jurisdiction: JurisdictionId,
local_plugin_version: u32,
version_compat_threshold: u32,
) -> Self {
Self {
routing_table: JurisdictionRoutingTable::new(),
local_jurisdiction,
local_plugin_version,
version_compat_threshold,
}
}
/// 注册辖区节点
pub fn register_node(&mut self, endpoint: NodeEndpoint) {
self.routing_table.register(endpoint);
}
/// 为单辖区交易做路由决策
pub fn route_single(
&self,
target_jurisdiction: JurisdictionId,
) -> RoutingDecision {
let nodes = self.routing_table.lookup(target_jurisdiction);
if nodes.is_empty() {
return RoutingDecision::Unreachable {
reason: format!("辖区 {} 无可用节点", target_jurisdiction),
};
}
// 检查版本兼容性
let compatible: Vec<_> = nodes
.iter()
.filter(|n| {
let diff = (n.plugin_version as i64 - self.local_plugin_version as i64).unsigned_abs();
diff <= self.version_compat_threshold as u64
})
.collect();
if !compatible.is_empty() {
// 直接路由:选择第一个兼容节点
return RoutingDecision::Direct {
target_node_id: compatible[0].node_id.clone(),
};
}
// 版本差异过大,需要中继节点执行协议转换
let relay_nodes = self.routing_table.lookup_relay(target_jurisdiction);
if relay_nodes.is_empty() {
// 尝试从本辖区找中继节点
let local_relays = self.routing_table.lookup_relay(self.local_jurisdiction);
if local_relays.is_empty() {
return RoutingDecision::Unreachable {
reason: format!("辖区 {} 版本不兼容且无中继节点", target_jurisdiction),
};
}
return RoutingDecision::Relay {
relay_node_id: local_relays[0].node_id.clone(),
target_node_id: nodes[0].node_id.clone(),
};
}
RoutingDecision::Relay {
relay_node_id: relay_nodes[0].node_id.clone(),
target_node_id: nodes[0].node_id.clone(),
}
}
/// 为跨多辖区交易做多播路由决策
/// 减少重复传播,提高网络效率
pub fn route_multicast(
&self,
target_jurisdictions: &[JurisdictionId],
) -> RoutingDecision {
let reachable: Vec<JurisdictionId> = target_jurisdictions
.iter()
.filter(|&&jid| !self.routing_table.lookup(jid).is_empty())
.copied()
.collect();
if reachable.is_empty() {
return RoutingDecision::Unreachable {
reason: "所有目标辖区均无可用节点".to_string(),
};
}
RoutingDecision::Multicast {
target_jurisdictions: reachable,
}
}
/// 创建协议转换记录(中继节点调用)
/// 转换过程必须保留原始 CR不得修改约法即是治法
pub fn create_conversion_record(
&self,
tx_id: Vec<u8>,
source_jurisdiction: JurisdictionId,
target_jurisdiction: JurisdictionId,
source_plugin_version: u32,
target_plugin_version: u32,
original_cr: Vec<u8>,
relay_node_id: Vec<u8>,
timestamp: u64,
) -> Result<ProtocolConversionRecord, String> {
if original_cr.is_empty() {
return Err("原始 CR 不可为空CR 是法律证据,协议转换不得丢失".to_string());
}
Ok(ProtocolConversionRecord {
tx_id,
source_jurisdiction,
target_jurisdiction,
source_plugin_version,
target_plugin_version,
original_cr,
converted_format_version: target_plugin_version,
relay_node_id,
timestamp,
})
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_node(id: u8, jurisdiction: JurisdictionId, version: u32, is_relay: bool) -> NodeEndpoint {
NodeEndpoint {
node_id: vec![id; 32],
jurisdiction,
address: format!("10.0.0.{}:8080", id),
plugin_version: version,
is_relay,
}
}
#[test]
fn test_direct_route_compatible_version() {
let mut router = JurisdictionRouter::new(784, 100, 10);
router.register_node(make_node(1, 156, 105, false)); // 版本差5在阈值内
let decision = router.route_single(156);
assert!(matches!(decision, RoutingDecision::Direct { .. }));
}
#[test]
fn test_relay_route_incompatible_version() {
let mut router = JurisdictionRouter::new(784, 100, 10);
router.register_node(make_node(1, 156, 200, false)); // 版本差100超阈值
router.register_node(make_node(2, 156, 200, true)); // 中继节点
let decision = router.route_single(156);
assert!(matches!(decision, RoutingDecision::Relay { .. }));
}
#[test]
fn test_unreachable_unknown_jurisdiction() {
let router = JurisdictionRouter::new(784, 100, 10);
let decision = router.route_single(999);
assert!(matches!(decision, RoutingDecision::Unreachable { .. }));
}
#[test]
fn test_multicast_multiple_jurisdictions() {
let mut router = JurisdictionRouter::new(784, 100, 10);
router.register_node(make_node(1, 156, 100, false));
router.register_node(make_node(2, 840, 100, false));
let decision = router.route_multicast(&[156, 840, 999]);
match decision {
RoutingDecision::Multicast { target_jurisdictions } => {
assert_eq!(target_jurisdictions.len(), 2); // 999 不可达被过滤
assert!(target_jurisdictions.contains(&156));
assert!(target_jurisdictions.contains(&840));
}
_ => panic!("应为多播决策"),
}
}
#[test]
fn test_conversion_record_preserves_original_cr() {
// 约法即是治法:协议转换必须保留原始 CR
let router = JurisdictionRouter::new(784, 100, 10);
let original_cr = vec![0xAB; 48];
let record = router.create_conversion_record(
vec![1u8; 48],
784, 156,
100, 200,
original_cr.clone(),
vec![2u8; 32],
1700000000,
);
assert!(record.is_ok());
let rec = record.unwrap();
assert_eq!(rec.original_cr, original_cr); // CR 完整保留
assert!(rec.is_valid());
}
#[test]
fn test_conversion_record_rejects_empty_cr() {
// 空 CR 被拒绝:法律证据不可缺失
let router = JurisdictionRouter::new(784, 100, 10);
let result = router.create_conversion_record(
vec![1u8; 48],
784, 156,
100, 200,
vec![], // 空 CR
vec![2u8; 32],
1700000000,
);
assert!(result.is_err());
}
}

View File

@ -39,3 +39,5 @@ mod tests {
assert!(true); assert!(true);
} }
} }
pub mod jurisdiction_router;
pub mod gids_jurisdiction_proof;

107
nac-jurisdiction-compat/Cargo.lock generated Normal file
View File

@ -0,0 +1,107 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "itoa"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "memchr"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "nac-jurisdiction-compat"
version = "0.1.0"
dependencies = [
"serde",
"serde_json",
]
[[package]]
name = "proc-macro2"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [
"proc-macro2",
]
[[package]]
name = "serde"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"itoa",
"memchr",
"serde",
"serde_core",
"zmij",
]
[[package]]
name = "syn"
version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "zmij"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"

View File

@ -0,0 +1,9 @@
[package]
name = "nac-jurisdiction-compat"
version = "0.1.0"
edition = "2021"
description = "NAC辖区规则跨版本兼容性检测模块 (Issue #76)"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -0,0 +1,406 @@
// NAC 辖区规则跨版本兼容性检测模块Issue #76
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 版本更新必须由辖区授权CA签名更新后立即生效约法即是治法旧版本自动归档
// NAC_Lens 4.0 负责将版本更新通知广播到所有辖区节点
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
/// 规则版本号语义化版本major.minor.patch
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
pub struct RuleVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
/// 版本生效时间戳UTC Unix 毫秒)
pub effective_at: u64,
/// 辖区授权CA签名约法即是治法CA签名即法律生效
pub ca_signature: Vec<u8>,
/// 签发CA的辖区标识
pub issuing_jurisdiction: String,
}
impl RuleVersion {
pub fn new(major: u32, minor: u32, patch: u32, jurisdiction: &str) -> Self {
Self {
major,
minor,
patch,
effective_at: 0,
ca_signature: Vec::new(),
issuing_jurisdiction: jurisdiction.to_string(),
}
}
pub fn to_string(&self) -> String {
format!("{}.{}.{}", self.major, self.minor, self.patch)
}
/// 是否为破坏性变更major 版本升级)
pub fn is_breaking_change(&self, other: &RuleVersion) -> bool {
self.major > other.major
}
/// 是否为向后兼容的功能增加minor 版本升级)
pub fn is_additive_change(&self, other: &RuleVersion) -> bool {
self.major == other.major && self.minor > other.minor
}
/// 是否为补丁修复patch 版本升级)
pub fn is_patch_change(&self, other: &RuleVersion) -> bool {
self.major == other.major && self.minor == other.minor && self.patch > other.patch
}
}
/// 兼容性检测结果
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum CompatibilityResult {
/// 完全兼容:新版本规则对现有交易无影响
FullyCompatible {
old_version: String,
new_version: String,
jurisdiction: String,
},
/// 向后兼容:新增规则,现有交易仍然有效
BackwardCompatible {
old_version: String,
new_version: String,
jurisdiction: String,
/// 新增的规则列表
added_rules: Vec<String>,
},
/// 不兼容:破坏性变更,需要迁移
Incompatible {
old_version: String,
new_version: String,
jurisdiction: String,
/// 被移除或修改的规则
breaking_changes: Vec<BreakingChange>,
/// 受影响的交易类型
affected_asset_types: Vec<String>,
},
/// 需要CA重新授权
RequiresCAReauthorization {
jurisdiction: String,
reason: String,
},
}
/// 破坏性变更描述
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BreakingChange {
pub rule_id: String,
pub change_type: ChangeType,
pub old_value: String,
pub new_value: String,
pub legal_basis: String,
}
/// 变更类型
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ChangeType {
/// 规则被移除
RuleRemoved,
/// 阈值提高(更严格)
ThresholdIncreased,
/// 阈值降低(更宽松)
ThresholdDecreased,
/// KYC要求提高
KycLevelUpgraded,
/// 新增禁止资产类型
AssetTypeProhibited,
/// 新增允许资产类型
AssetTypePermitted,
/// 监管机构变更
RegulatoryAuthorityChanged,
}
/// 辖区规则版本快照(用于兼容性对比)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JurisdictionRuleSnapshot {
pub jurisdiction_code: String,
pub version: RuleVersion,
/// 规则集rule_id -> rule_hash
pub rules: HashMap<String, String>,
/// AML 阈值USD
pub aml_threshold_usd: f64,
/// 最低KYC等级
pub min_kyc_level: String,
/// 允许的资产类型
pub permitted_asset_types: Vec<String>,
/// 禁止的资产类型
pub prohibited_asset_types: Vec<String>,
/// 监管机构
pub regulatory_authority: String,
}
/// 跨版本兼容性检测引擎
pub struct CompatibilityChecker;
impl CompatibilityChecker {
pub fn new() -> Self {
Self
}
/// 检测两个版本快照之间的兼容性
/// 约法即是治法新版本CA签名有效后立即生效此函数评估影响范围
pub fn check_compatibility(
&self,
old_snapshot: &JurisdictionRuleSnapshot,
new_snapshot: &JurisdictionRuleSnapshot,
) -> CompatibilityResult {
// 验证辖区一致性
if old_snapshot.jurisdiction_code != new_snapshot.jurisdiction_code {
return CompatibilityResult::RequiresCAReauthorization {
jurisdiction: new_snapshot.jurisdiction_code.clone(),
reason: "Jurisdiction code mismatch: cross-jurisdiction rule migration requires separate CA authorization".to_string(),
};
}
// 验证CA签名约法即是治法无CA签名的版本不得生效
if new_snapshot.version.ca_signature.is_empty() {
return CompatibilityResult::RequiresCAReauthorization {
jurisdiction: new_snapshot.jurisdiction_code.clone(),
reason: format!(
"Version {} lacks CA signature from {}. Per CBPP principle '约法即是治法', \
rule updates must be authorized by jurisdiction CA before taking effect.",
new_snapshot.version.to_string(),
new_snapshot.version.issuing_jurisdiction
),
};
}
let old_ver = &old_snapshot.version;
let new_ver = &new_snapshot.version;
// 收集破坏性变更
let mut breaking_changes = Vec::new();
let mut added_rules = Vec::new();
let mut affected_asset_types = Vec::new();
// 1. 检查 AML 阈值变化
if (new_snapshot.aml_threshold_usd - old_snapshot.aml_threshold_usd).abs() > f64::EPSILON {
if new_snapshot.aml_threshold_usd < old_snapshot.aml_threshold_usd {
// 阈值降低 = 更严格 = 破坏性变更
breaking_changes.push(BreakingChange {
rule_id: format!("{}_AML_THRESHOLD", old_snapshot.jurisdiction_code),
change_type: ChangeType::ThresholdDecreased,
old_value: format!("{} USD", old_snapshot.aml_threshold_usd),
new_value: format!("{} USD", new_snapshot.aml_threshold_usd),
legal_basis: format!("Regulatory update by {}", new_snapshot.regulatory_authority),
});
affected_asset_types.push("ALL".to_string());
} else {
// 阈值提高 = 更宽松 = 向后兼容
added_rules.push(format!(
"AML threshold relaxed: {} -> {} USD",
old_snapshot.aml_threshold_usd, new_snapshot.aml_threshold_usd
));
}
}
// 2. 检查 KYC 等级变化
if old_snapshot.min_kyc_level != new_snapshot.min_kyc_level {
let old_level = Self::kyc_level_rank(&old_snapshot.min_kyc_level);
let new_level = Self::kyc_level_rank(&new_snapshot.min_kyc_level);
if new_level > old_level {
// KYC要求提高 = 破坏性变更
breaking_changes.push(BreakingChange {
rule_id: format!("{}_KYC_LEVEL", old_snapshot.jurisdiction_code),
change_type: ChangeType::KycLevelUpgraded,
old_value: old_snapshot.min_kyc_level.clone(),
new_value: new_snapshot.min_kyc_level.clone(),
legal_basis: format!("KYC upgrade mandated by {}", new_snapshot.regulatory_authority),
});
affected_asset_types.push("ALL".to_string());
} else {
added_rules.push(format!(
"KYC requirement relaxed: {} -> {}",
old_snapshot.min_kyc_level, new_snapshot.min_kyc_level
));
}
}
// 3. 检查新增禁止资产类型
for asset in &new_snapshot.prohibited_asset_types {
if !old_snapshot.prohibited_asset_types.contains(asset) {
breaking_changes.push(BreakingChange {
rule_id: format!("{}_PROHIBITED_{}", old_snapshot.jurisdiction_code, asset),
change_type: ChangeType::AssetTypeProhibited,
old_value: "permitted".to_string(),
new_value: "prohibited".to_string(),
legal_basis: format!("Asset prohibition by {}", new_snapshot.regulatory_authority),
});
affected_asset_types.push(asset.clone());
}
}
// 4. 检查新增允许资产类型(向后兼容)
for asset in &new_snapshot.permitted_asset_types {
if !old_snapshot.permitted_asset_types.contains(asset) {
added_rules.push(format!("New asset type permitted: {}", asset));
}
}
// 5. 检查监管机构变更
if old_snapshot.regulatory_authority != new_snapshot.regulatory_authority {
breaking_changes.push(BreakingChange {
rule_id: format!("{}_REGULATOR", old_snapshot.jurisdiction_code),
change_type: ChangeType::RegulatoryAuthorityChanged,
old_value: old_snapshot.regulatory_authority.clone(),
new_value: new_snapshot.regulatory_authority.clone(),
legal_basis: "Regulatory authority transfer".to_string(),
});
}
// 判断兼容性级别
if !breaking_changes.is_empty() {
CompatibilityResult::Incompatible {
old_version: old_ver.to_string(),
new_version: new_ver.to_string(),
jurisdiction: old_snapshot.jurisdiction_code.clone(),
breaking_changes,
affected_asset_types,
}
} else if !added_rules.is_empty() {
CompatibilityResult::BackwardCompatible {
old_version: old_ver.to_string(),
new_version: new_ver.to_string(),
jurisdiction: old_snapshot.jurisdiction_code.clone(),
added_rules,
}
} else {
CompatibilityResult::FullyCompatible {
old_version: old_ver.to_string(),
new_version: new_ver.to_string(),
jurisdiction: old_snapshot.jurisdiction_code.clone(),
}
}
}
/// KYC 等级数值化(用于比较)
fn kyc_level_rank(level: &str) -> u8 {
match level {
"None" => 0,
"Basic" => 1,
"Enhanced" => 2,
"Institutional" => 3,
_ => 0,
}
}
/// 批量检测多个辖区的兼容性
pub fn batch_check(
&self,
old_snapshots: &[JurisdictionRuleSnapshot],
new_snapshots: &[JurisdictionRuleSnapshot],
) -> Vec<(String, CompatibilityResult)> {
let old_map: HashMap<&str, &JurisdictionRuleSnapshot> = old_snapshots
.iter()
.map(|s| (s.jurisdiction_code.as_str(), s))
.collect();
new_snapshots
.iter()
.map(|new_s| {
let result = if let Some(old_s) = old_map.get(new_s.jurisdiction_code.as_str()) {
self.check_compatibility(old_s, new_s)
} else {
// 新增辖区,完全兼容
CompatibilityResult::FullyCompatible {
old_version: "N/A".to_string(),
new_version: new_s.version.to_string(),
jurisdiction: new_s.jurisdiction_code.clone(),
}
};
(new_s.jurisdiction_code.clone(), result)
})
.collect()
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_snapshot(code: &str, major: u32, minor: u32, aml: f64, kyc: &str) -> JurisdictionRuleSnapshot {
let mut version = RuleVersion::new(major, minor, 0, code);
version.ca_signature = vec![1u8; 64]; // 模拟CA签名
version.effective_at = 1000000;
JurisdictionRuleSnapshot {
jurisdiction_code: code.to_string(),
version,
rules: HashMap::new(),
aml_threshold_usd: aml,
min_kyc_level: kyc.to_string(),
permitted_asset_types: vec!["RWA_REAL_ESTATE".to_string()],
prohibited_asset_types: vec![],
regulatory_authority: format!("{}_REGULATOR", code),
}
}
#[test]
fn test_fully_compatible_no_changes() {
let checker = CompatibilityChecker::new();
let old = make_snapshot("CN", 1, 0, 10000.0, "Institutional");
let new = make_snapshot("CN", 1, 0, 10000.0, "Institutional");
let result = checker.check_compatibility(&old, &new);
assert!(matches!(result, CompatibilityResult::FullyCompatible { .. }));
}
#[test]
fn test_backward_compatible_threshold_relaxed() {
let checker = CompatibilityChecker::new();
let old = make_snapshot("HK", 1, 0, 10000.0, "Enhanced");
let new = make_snapshot("HK", 1, 1, 20000.0, "Enhanced"); // 阈值提高=更宽松
let result = checker.check_compatibility(&old, &new);
assert!(matches!(result, CompatibilityResult::BackwardCompatible { .. }));
}
#[test]
fn test_incompatible_threshold_tightened() {
let checker = CompatibilityChecker::new();
let old = make_snapshot("SG", 1, 0, 20000.0, "Enhanced");
let new = make_snapshot("SG", 2, 0, 5000.0, "Enhanced"); // 阈值降低=更严格
let result = checker.check_compatibility(&old, &new);
assert!(matches!(result, CompatibilityResult::Incompatible { .. }));
}
#[test]
fn test_incompatible_kyc_upgraded() {
let checker = CompatibilityChecker::new();
let old = make_snapshot("AE", 1, 0, 10000.0, "Enhanced");
let new = make_snapshot("AE", 2, 0, 10000.0, "Institutional"); // KYC提高
let result = checker.check_compatibility(&old, &new);
assert!(matches!(result, CompatibilityResult::Incompatible { .. }));
}
#[test]
fn test_requires_ca_reauthorization_no_signature() {
let checker = CompatibilityChecker::new();
let old = make_snapshot("JP", 1, 0, 10000.0, "Enhanced");
let mut new = make_snapshot("JP", 2, 0, 10000.0, "Enhanced");
new.version.ca_signature = vec![]; // 无CA签名
let result = checker.check_compatibility(&old, &new);
assert!(matches!(result, CompatibilityResult::RequiresCAReauthorization { .. }));
}
#[test]
fn test_batch_check_multiple_jurisdictions() {
let checker = CompatibilityChecker::new();
let old_snapshots = vec![
make_snapshot("CN", 1, 0, 10000.0, "Institutional"),
make_snapshot("HK", 1, 0, 10000.0, "Enhanced"),
];
let new_snapshots = vec![
make_snapshot("CN", 1, 0, 10000.0, "Institutional"), // 无变化
make_snapshot("HK", 1, 1, 15000.0, "Enhanced"), // 宽松变更
make_snapshot("SG", 1, 0, 10000.0, "Enhanced"), // 新增辖区
];
let results = checker.batch_check(&old_snapshots, &new_snapshots);
assert_eq!(results.len(), 3);
assert!(matches!(results[0].1, CompatibilityResult::FullyCompatible { .. }));
assert!(matches!(results[1].1, CompatibilityResult::BackwardCompatible { .. }));
assert!(matches!(results[2].1, CompatibilityResult::FullyCompatible { .. }));
}
}

View File

@ -0,0 +1,58 @@
# 百慕大Bermuda 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | BM |
| 辖区名称 | 百慕大Bermuda |
| 监管机构 | BMABermuda Monetary Authority |
| 关键法律 | Digital Asset Business Act 2018DABA |
| 授权CA | BMA_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 BMA_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 BM 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 BM 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 BM 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| BM_DABA_001 | 数字资产业务须持有BMA颁发的DABA牌照 |
| BM_AML_001 | 反洗钱须符合FATF标准及百慕大AML/ATF法规 |
| BM_INVEST_001 | 保险/再保险资产上链须符合保险法第6条 |
| BM_KYC_001 | KYC须核实客户身份并保留5年记录 |
| BM_REPORT_001 | 季度向BMA提交数字资产业务报告 |
## 支持的资产类型
- 保险资产
- 再保险资产
- 基金份额
- 债券
- 股权
## 禁止活动
- 匿名交易
- 无牌照数字资产业务
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
BM 辖区与其他辖区**完全独立**。跨辖区交易时BM 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 百慕大Bermuda
// 监管机构BMABermuda Monetary Authority
// 关键法律Digital Asset Business Act 2018DABA
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CABMA_CA签名后直接生效无需链上投票
JURISDICTION BM {
name: "百慕大Bermuda"
regulator: "BMABermuda Monetary Authority"
key_law: "Digital Asset Business Act 2018DABA"
ca_authority: "BMA_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["保险资产", "再保险资产", "基金份额", "债券", "股权"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["匿名交易", "无牌照数字资产业务"]
}
CLAUSE BM_DABA_001 {
jurisdiction: "BM"
type: "COMPLIANCE_RULE"
description: "数字资产业务须持有BMA颁发的DABA牌照"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE BM_AML_001 {
jurisdiction: "BM"
type: "COMPLIANCE_RULE"
description: "反洗钱须符合FATF标准及百慕大AML/ATF法规"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE BM_INVEST_001 {
jurisdiction: "BM"
type: "COMPLIANCE_RULE"
description: "保险/再保险资产上链须符合保险法第6条"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE BM_KYC_001 {
jurisdiction: "BM"
type: "COMPLIANCE_RULE"
description: "KYC须核实客户身份并保留5年记录"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE BM_REPORT_001 {
jurisdiction: "BM"
type: "COMPLIANCE_RULE"
description: "季度向BMA提交数字资产业务报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 百慕大Bermuda
// 监管机构BMABermuda Monetary Authority
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义BM辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract BMAssetProtocol {
// 辖区标识
const JURISDICTION: string = "BM";
const REGULATOR: string = "BMABermuda Monetary Authority";
const CA_AUTHORITY: string = "BMA_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须BMA_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["保险资产", "再保险资产", "基金份额", "债券", "股权"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["匿名交易", "无牌照数字资产业务"];
}

View File

@ -7,6 +7,7 @@ name = "nac-jurisdiction-rules"
version = "1.0.0" version = "1.0.0"
dependencies = [ dependencies = [
"serde", "serde",
"thiserror",
] ]
[[package]] [[package]]
@ -68,6 +69,26 @@ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]]
name = "thiserror"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.24" version = "1.0.24"

View File

@ -0,0 +1,57 @@
# 直布罗陀Gibraltar 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | GI |
| 辖区名称 | 直布罗陀Gibraltar |
| 监管机构 | GFSCGibraltar Financial Services Commission |
| 关键法律 | Distributed Ledger Technology Regulatory Framework 2018DLT框架 |
| 授权CA | GFSC_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 GFSC_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 GI 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 GI 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 GI 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| GI_DLT_001 | 使用DLT存储或传输价值须向GFSC申请DLT牌照 |
| GI_AML_001 | 须符合直布罗陀反洗钱法规Proceeds of Crime Act 2015 |
| GI_KYC_001 | KYC须核实客户身份保留5年记录 |
| GI_CUSTODY_001 | 数字资产托管须符合GFSC托管规则 |
| GI_REPORT_001 | 年度向GFSC提交DLT业务报告 |
## 支持的资产类型
- 数字资产
- 代币
- 虚拟货币
- 证券型代币
## 禁止活动
- 无DLT牌照运营
- 匿名交易
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
GI 辖区与其他辖区**完全独立**。跨辖区交易时GI 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 直布罗陀Gibraltar
// 监管机构GFSCGibraltar Financial Services Commission
// 关键法律Distributed Ledger Technology Regulatory Framework 2018DLT框架
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CAGFSC_CA签名后直接生效无需链上投票
JURISDICTION GI {
name: "直布罗陀Gibraltar"
regulator: "GFSCGibraltar Financial Services Commission"
key_law: "Distributed Ledger Technology Regulatory Framework 2018DLT框架"
ca_authority: "GFSC_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["数字资产", "代币", "虚拟货币", "证券型代币"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["无DLT牌照运营", "匿名交易"]
}
CLAUSE GI_DLT_001 {
jurisdiction: "GI"
type: "COMPLIANCE_RULE"
description: "使用DLT存储或传输价值须向GFSC申请DLT牌照"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE GI_AML_001 {
jurisdiction: "GI"
type: "COMPLIANCE_RULE"
description: "须符合直布罗陀反洗钱法规Proceeds of Crime Act 2015"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE GI_KYC_001 {
jurisdiction: "GI"
type: "COMPLIANCE_RULE"
description: "KYC须核实客户身份保留5年记录"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE GI_CUSTODY_001 {
jurisdiction: "GI"
type: "COMPLIANCE_RULE"
description: "数字资产托管须符合GFSC托管规则"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE GI_REPORT_001 {
jurisdiction: "GI"
type: "COMPLIANCE_RULE"
description: "年度向GFSC提交DLT业务报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 直布罗陀Gibraltar
// 监管机构GFSCGibraltar Financial Services Commission
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义GI辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract GIAssetProtocol {
// 辖区标识
const JURISDICTION: string = "GI";
const REGULATOR: string = "GFSCGibraltar Financial Services Commission";
const CA_AUTHORITY: string = "GFSC_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须GFSC_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["数字资产", "代币", "虚拟货币", "证券型代币"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["无DLT牌照运营", "匿名交易"];
}

View File

@ -0,0 +1,57 @@
# 马恩岛Isle of Man 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | IM |
| 辖区名称 | 马恩岛Isle of Man |
| 监管机构 | FSAIsle of Man Financial Services Authority |
| 关键法律 | Designated Businesses (Registration and Oversight) Act 2015 |
| 授权CA | IM_FSA_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 IM_FSA_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 IM 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 IM 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 IM 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| IM_FSA_001 | 数字资产业务须向FSA注册为指定业务 |
| IM_AML_001 | 须符合马恩岛反洗钱法规Anti-Money Laundering Code 2019 |
| IM_KYC_001 | KYC须核实客户身份保留5年记录 |
| IM_CUSTODY_001 | 数字资产托管须符合FSA托管规则 |
| IM_REPORT_001 | 年度向FSA提交合规报告 |
## 支持的资产类型
- 数字资产
- 代币
- 虚拟货币
- 基金份额
## 禁止活动
- 未注册数字资产业务
- 匿名交易
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
IM 辖区与其他辖区**完全独立**。跨辖区交易时IM 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 马恩岛Isle of Man
// 监管机构FSAIsle of Man Financial Services Authority
// 关键法律Designated Businesses (Registration and Oversight) Act 2015
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CAIM_FSA_CA签名后直接生效无需链上投票
JURISDICTION IM {
name: "马恩岛Isle of Man"
regulator: "FSAIsle of Man Financial Services Authority"
key_law: "Designated Businesses (Registration and Oversight) Act 2015"
ca_authority: "IM_FSA_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["数字资产", "代币", "虚拟货币", "基金份额"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["未注册数字资产业务", "匿名交易"]
}
CLAUSE IM_FSA_001 {
jurisdiction: "IM"
type: "COMPLIANCE_RULE"
description: "数字资产业务须向FSA注册为指定业务"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE IM_AML_001 {
jurisdiction: "IM"
type: "COMPLIANCE_RULE"
description: "须符合马恩岛反洗钱法规Anti-Money Laundering Code 2019"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE IM_KYC_001 {
jurisdiction: "IM"
type: "COMPLIANCE_RULE"
description: "KYC须核实客户身份保留5年记录"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE IM_CUSTODY_001 {
jurisdiction: "IM"
type: "COMPLIANCE_RULE"
description: "数字资产托管须符合FSA托管规则"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE IM_REPORT_001 {
jurisdiction: "IM"
type: "COMPLIANCE_RULE"
description: "年度向FSA提交合规报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 马恩岛Isle of Man
// 监管机构FSAIsle of Man Financial Services Authority
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义IM辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract IMAssetProtocol {
// 辖区标识
const JURISDICTION: string = "IM";
const REGULATOR: string = "FSAIsle of Man Financial Services Authority";
const CA_AUTHORITY: string = "IM_FSA_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须IM_FSA_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["数字资产", "代币", "虚拟货币", "基金份额"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["未注册数字资产业务", "匿名交易"];
}

View File

@ -0,0 +1,57 @@
# 泽西岛Jersey 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | JE |
| 辖区名称 | 泽西岛Jersey |
| 监管机构 | JFSCJersey Financial Services Commission |
| 关键法律 | Virtual Asset Service Providers (Jersey) Law 2021 |
| 授权CA | JFSC_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 JFSC_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 JE 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 JE 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 JE 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| JE_VASP_001 | 虚拟资产服务提供商须向JFSC注册 |
| JE_AML_001 | 须符合泽西岛反洗钱法规Money Laundering Order 2008 |
| JE_KYC_001 | KYC须核实受益所有人UBO信息 |
| JE_FUND_001 | 基金资产须符合泽西岛集合投资基金法 |
| JE_REPORT_001 | 年度向JFSC提交合规报告 |
## 支持的资产类型
- 基金份额
- 债券
- 股权
- 虚拟资产
## 禁止活动
- 未注册VASP运营
- 匿名基金
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
JE 辖区与其他辖区**完全独立**。跨辖区交易时JE 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 泽西岛Jersey
// 监管机构JFSCJersey Financial Services Commission
// 关键法律Virtual Asset Service Providers (Jersey) Law 2021
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CAJFSC_CA签名后直接生效无需链上投票
JURISDICTION JE {
name: "泽西岛Jersey"
regulator: "JFSCJersey Financial Services Commission"
key_law: "Virtual Asset Service Providers (Jersey) Law 2021"
ca_authority: "JFSC_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["基金份额", "债券", "股权", "虚拟资产"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["未注册VASP运营", "匿名基金"]
}
CLAUSE JE_VASP_001 {
jurisdiction: "JE"
type: "COMPLIANCE_RULE"
description: "虚拟资产服务提供商须向JFSC注册"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE JE_AML_001 {
jurisdiction: "JE"
type: "COMPLIANCE_RULE"
description: "须符合泽西岛反洗钱法规Money Laundering Order 2008"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE JE_KYC_001 {
jurisdiction: "JE"
type: "COMPLIANCE_RULE"
description: "KYC须核实受益所有人UBO信息"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE JE_FUND_001 {
jurisdiction: "JE"
type: "COMPLIANCE_RULE"
description: "基金资产须符合泽西岛集合投资基金法"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE JE_REPORT_001 {
jurisdiction: "JE"
type: "COMPLIANCE_RULE"
description: "年度向JFSC提交合规报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 泽西岛Jersey
// 监管机构JFSCJersey Financial Services Commission
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义JE辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract JEAssetProtocol {
// 辖区标识
const JURISDICTION: string = "JE";
const REGULATOR: string = "JFSCJersey Financial Services Commission";
const CA_AUTHORITY: string = "JFSC_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须JFSC_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["基金份额", "债券", "股权", "虚拟资产"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["未注册VASP运营", "匿名基金"];
}

View File

@ -0,0 +1,58 @@
# 开曼群岛Cayman Islands 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | KY |
| 辖区名称 | 开曼群岛Cayman Islands |
| 监管机构 | CIMACayman Islands Monetary Authority |
| 关键法律 | Virtual Asset Service Providers Act 2020VASP |
| 授权CA | CIMA_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 CIMA_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 KY 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 KY 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 KY 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| KY_VASP_001 | 虚拟资产服务提供商须向CIMA注册 |
| KY_FUND_001 | 基金资产须符合共同基金法或私募基金法 |
| KY_AML_001 | 须符合反洗钱法规AML Regulations 2020 |
| KY_KYC_001 | KYC须核实受益所有人UBO信息 |
| KY_REPORT_001 | 年度向CIMA提交合规报告 |
## 支持的资产类型
- 基金份额
- 有限合伙权益
- 债券
- 股权
- 虚拟资产
## 禁止活动
- 未注册VASP运营
- 匿名基金
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
KY 辖区与其他辖区**完全独立**。跨辖区交易时KY 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 开曼群岛Cayman Islands
// 监管机构CIMACayman Islands Monetary Authority
// 关键法律Virtual Asset Service Providers Act 2020VASP
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CACIMA_CA签名后直接生效无需链上投票
JURISDICTION KY {
name: "开曼群岛Cayman Islands"
regulator: "CIMACayman Islands Monetary Authority"
key_law: "Virtual Asset Service Providers Act 2020VASP"
ca_authority: "CIMA_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["基金份额", "有限合伙权益", "债券", "股权", "虚拟资产"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["未注册VASP运营", "匿名基金"]
}
CLAUSE KY_VASP_001 {
jurisdiction: "KY"
type: "COMPLIANCE_RULE"
description: "虚拟资产服务提供商须向CIMA注册"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE KY_FUND_001 {
jurisdiction: "KY"
type: "COMPLIANCE_RULE"
description: "基金资产须符合共同基金法或私募基金法"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE KY_AML_001 {
jurisdiction: "KY"
type: "COMPLIANCE_RULE"
description: "须符合反洗钱法规AML Regulations 2020"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE KY_KYC_001 {
jurisdiction: "KY"
type: "COMPLIANCE_RULE"
description: "KYC须核实受益所有人UBO信息"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE KY_REPORT_001 {
jurisdiction: "KY"
type: "COMPLIANCE_RULE"
description: "年度向CIMA提交合规报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 开曼群岛Cayman Islands
// 监管机构CIMACayman Islands Monetary Authority
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义KY辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract KYAssetProtocol {
// 辖区标识
const JURISDICTION: string = "KY";
const REGULATOR: string = "CIMACayman Islands Monetary Authority";
const CA_AUTHORITY: string = "CIMA_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须CIMA_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["基金份额", "有限合伙权益", "债券", "股权", "虚拟资产"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["未注册VASP运营", "匿名基金"];
}

View File

@ -0,0 +1,58 @@
# 卢森堡Luxembourg 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | LU |
| 辖区名称 | 卢森堡Luxembourg |
| 监管机构 | CSSFCommission de Surveillance du Secteur Financier |
| 关键法律 | MiCAEU成员国& UCITS Directive & AIFMD |
| 授权CA | CSSF_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 CSSF_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 LU 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 LU 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 LU 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| LU_CSSF_001 | 数字资产业务须向CSSF申请授权 |
| LU_UCITS_001 | UCITS基金资产须符合UCITS指令第五版 |
| LU_AIFMD_001 | 另类投资基金须符合AIFMD指令 |
| LU_MICA_001 | 加密资产须符合MiCA法规EU成员国 |
| LU_GDPR_001 | 个人数据处理须符合GDPR禁止个人信息直接上链 |
## 支持的资产类型
- UCITS基金份额
- AIF基金份额
- 债券
- 证券型代币
- 加密资产
## 禁止活动
- 未经CSSF授权的数字资产业务
- 个人信息上链
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
LU 辖区与其他辖区**完全独立**。跨辖区交易时LU 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 卢森堡Luxembourg
// 监管机构CSSFCommission de Surveillance du Secteur Financier
// 关键法律MiCAEU成员国& UCITS Directive & AIFMD
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CACSSF_CA签名后直接生效无需链上投票
JURISDICTION LU {
name: "卢森堡Luxembourg"
regulator: "CSSFCommission de Surveillance du Secteur Financier"
key_law: "MiCAEU成员国& UCITS Directive & AIFMD"
ca_authority: "CSSF_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["UCITS基金份额", "AIF基金份额", "债券", "证券型代币", "加密资产"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["未经CSSF授权的数字资产业务", "个人信息上链"]
}
CLAUSE LU_CSSF_001 {
jurisdiction: "LU"
type: "COMPLIANCE_RULE"
description: "数字资产业务须向CSSF申请授权"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE LU_UCITS_001 {
jurisdiction: "LU"
type: "COMPLIANCE_RULE"
description: "UCITS基金资产须符合UCITS指令第五版"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE LU_AIFMD_001 {
jurisdiction: "LU"
type: "COMPLIANCE_RULE"
description: "另类投资基金须符合AIFMD指令"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE LU_MICA_001 {
jurisdiction: "LU"
type: "COMPLIANCE_RULE"
description: "加密资产须符合MiCA法规EU成员国"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE LU_GDPR_001 {
jurisdiction: "LU"
type: "COMPLIANCE_RULE"
description: "个人数据处理须符合GDPR禁止个人信息直接上链"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 卢森堡Luxembourg
// 监管机构CSSFCommission de Surveillance du Secteur Financier
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义LU辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract LUAssetProtocol {
// 辖区标识
const JURISDICTION: string = "LU";
const REGULATOR: string = "CSSFCommission de Surveillance du Secteur Financier";
const CA_AUTHORITY: string = "CSSF_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须CSSF_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["UCITS基金份额", "AIF基金份额", "债券", "证券型代币", "加密资产"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["未经CSSF授权的数字资产业务", "个人信息上链"];
}

View File

@ -0,0 +1,57 @@
# 马耳他Malta 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | MT |
| 辖区名称 | 马耳他Malta |
| 监管机构 | MFSAMalta Financial Services Authority |
| 关键法律 | Virtual Financial Assets Act 2018VFA& MiCAEU成员国适用 |
| 授权CA | MFSA_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 MFSA_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 MT 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 MT 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 MT 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| MT_VFA_001 | 虚拟金融资产须通过MFSA的VFA测试金融工具/电子货币/VFA |
| MT_MICA_001 | 作为EU成员国须同时符合MiCA法规 |
| MT_GDPR_001 | 个人数据处理须符合GDPR禁止个人信息直接上链 |
| MT_AML_001 | 须符合EU第六反洗钱指令6AMLD |
| MT_AGENT_001 | 须通过MFSA认可的VFA代理人提交申请 |
## 支持的资产类型
- 虚拟金融资产
- 证券型代币
- 实用型代币
- 电子货币代币
## 禁止活动
- 未经VFA测试的资产发行
- 个人信息上链
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
MT 辖区与其他辖区**完全独立**。跨辖区交易时MT 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 马耳他Malta
// 监管机构MFSAMalta Financial Services Authority
// 关键法律Virtual Financial Assets Act 2018VFA& MiCAEU成员国适用
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CAMFSA_CA签名后直接生效无需链上投票
JURISDICTION MT {
name: "马耳他Malta"
regulator: "MFSAMalta Financial Services Authority"
key_law: "Virtual Financial Assets Act 2018VFA& MiCAEU成员国适用"
ca_authority: "MFSA_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["虚拟金融资产", "证券型代币", "实用型代币", "电子货币代币"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["未经VFA测试的资产发行", "个人信息上链"]
}
CLAUSE MT_VFA_001 {
jurisdiction: "MT"
type: "COMPLIANCE_RULE"
description: "虚拟金融资产须通过MFSA的VFA测试金融工具/电子货币/VFA"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MT_MICA_001 {
jurisdiction: "MT"
type: "COMPLIANCE_RULE"
description: "作为EU成员国须同时符合MiCA法规"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MT_GDPR_001 {
jurisdiction: "MT"
type: "COMPLIANCE_RULE"
description: "个人数据处理须符合GDPR禁止个人信息直接上链"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MT_AML_001 {
jurisdiction: "MT"
type: "COMPLIANCE_RULE"
description: "须符合EU第六反洗钱指令6AMLD"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MT_AGENT_001 {
jurisdiction: "MT"
type: "COMPLIANCE_RULE"
description: "须通过MFSA认可的VFA代理人提交申请"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 马耳他Malta
// 监管机构MFSAMalta Financial Services Authority
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义MT辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract MTAssetProtocol {
// 辖区标识
const JURISDICTION: string = "MT";
const REGULATOR: string = "MFSAMalta Financial Services Authority";
const CA_AUTHORITY: string = "MFSA_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须MFSA_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["虚拟金融资产", "证券型代币", "实用型代币", "电子货币代币"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["未经VFA测试的资产发行", "个人信息上链"];
}

View File

@ -0,0 +1,58 @@
# 毛里求斯Mauritius 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | MU |
| 辖区名称 | 毛里求斯Mauritius |
| 监管机构 | FSCFinancial Services Commission Mauritius |
| 关键法律 | Virtual Asset and Initial Token Offering Services Act 2021VAITOS |
| 授权CA | MU_FSC_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 MU_FSC_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 MU 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 MU 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 MU 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| MU_VAITOS_001 | 虚拟资产服务须向FSC申请VAITOS牌照 |
| MU_AML_001 | 须符合毛里求斯反洗钱法规FIAMLA 2002 |
| MU_KYC_001 | KYC须核实客户身份保留7年记录 |
| MU_AFRICA_001 | 跨非洲辖区交易须符合非洲联盟数字资产框架 |
| MU_REPORT_001 | 年度向FSC提交VAITOS合规报告 |
## 支持的资产类型
- 虚拟资产
- 代币
- 基金份额
- 债券
- 股权
## 禁止活动
- 未持VAITOS牌照的虚拟资产服务
- 匿名交易
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
MU 辖区与其他辖区**完全独立**。跨辖区交易时MU 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 毛里求斯Mauritius
// 监管机构FSCFinancial Services Commission Mauritius
// 关键法律Virtual Asset and Initial Token Offering Services Act 2021VAITOS
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CAMU_FSC_CA签名后直接生效无需链上投票
JURISDICTION MU {
name: "毛里求斯Mauritius"
regulator: "FSCFinancial Services Commission Mauritius"
key_law: "Virtual Asset and Initial Token Offering Services Act 2021VAITOS"
ca_authority: "MU_FSC_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["虚拟资产", "代币", "基金份额", "债券", "股权"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["未持VAITOS牌照的虚拟资产服务", "匿名交易"]
}
CLAUSE MU_VAITOS_001 {
jurisdiction: "MU"
type: "COMPLIANCE_RULE"
description: "虚拟资产服务须向FSC申请VAITOS牌照"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MU_AML_001 {
jurisdiction: "MU"
type: "COMPLIANCE_RULE"
description: "须符合毛里求斯反洗钱法规FIAMLA 2002"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MU_KYC_001 {
jurisdiction: "MU"
type: "COMPLIANCE_RULE"
description: "KYC须核实客户身份保留7年记录"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MU_AFRICA_001 {
jurisdiction: "MU"
type: "COMPLIANCE_RULE"
description: "跨非洲辖区交易须符合非洲联盟数字资产框架"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE MU_REPORT_001 {
jurisdiction: "MU"
type: "COMPLIANCE_RULE"
description: "年度向FSC提交VAITOS合规报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 毛里求斯Mauritius
// 监管机构FSCFinancial Services Commission Mauritius
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义MU辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract MUAssetProtocol {
// 辖区标识
const JURISDICTION: string = "MU";
const REGULATOR: string = "FSCFinancial Services Commission Mauritius";
const CA_AUTHORITY: string = "MU_FSC_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须MU_FSC_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["虚拟资产", "代币", "基金份额", "债券", "股权"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["未持VAITOS牌照的虚拟资产服务", "匿名交易"];
}

View File

@ -0,0 +1,57 @@
# 巴拿马Panama 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | PA |
| 辖区名称 | 巴拿马Panama |
| 监管机构 | SBPSuperintendencia de Bancos de Panamá |
| 关键法律 | Ley 23 de 2015反洗钱& Decreto Ejecutivo 122 de 2021数字资产 |
| 授权CA | PA_SBP_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 PA_SBP_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 PA 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 PA 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 PA 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| PA_SBP_001 | 数字资产业务须向SBP申请授权 |
| PA_AML_001 | 须符合巴拿马第23号法律反洗钱/反恐融资) |
| PA_KYC_001 | KYC须核实客户身份保留10年记录 |
| PA_FATF_001 | 须符合FATF建议巴拿马已从灰名单移除 |
| PA_REPORT_001 | 季度向SBP提交数字资产业务报告 |
## 支持的资产类型
- 数字资产
- 代币
- 股权
- 债券
## 禁止活动
- 未经SBP授权的数字资产业务
- 匿名交易
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
PA 辖区与其他辖区**完全独立**。跨辖区交易时PA 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 巴拿马Panama
// 监管机构SBPSuperintendencia de Bancos de Panamá
// 关键法律Ley 23 de 2015反洗钱& Decreto Ejecutivo 122 de 2021数字资产
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CAPA_SBP_CA签名后直接生效无需链上投票
JURISDICTION PA {
name: "巴拿马Panama"
regulator: "SBPSuperintendencia de Bancos de Panamá"
key_law: "Ley 23 de 2015反洗钱& Decreto Ejecutivo 122 de 2021数字资产"
ca_authority: "PA_SBP_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["数字资产", "代币", "股权", "债券"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["未经SBP授权的数字资产业务", "匿名交易"]
}
CLAUSE PA_SBP_001 {
jurisdiction: "PA"
type: "COMPLIANCE_RULE"
description: "数字资产业务须向SBP申请授权"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE PA_AML_001 {
jurisdiction: "PA"
type: "COMPLIANCE_RULE"
description: "须符合巴拿马第23号法律反洗钱/反恐融资)"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE PA_KYC_001 {
jurisdiction: "PA"
type: "COMPLIANCE_RULE"
description: "KYC须核实客户身份保留10年记录"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE PA_FATF_001 {
jurisdiction: "PA"
type: "COMPLIANCE_RULE"
description: "须符合FATF建议巴拿马已从灰名单移除"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE PA_REPORT_001 {
jurisdiction: "PA"
type: "COMPLIANCE_RULE"
description: "季度向SBP提交数字资产业务报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 巴拿马Panama
// 监管机构SBPSuperintendencia de Bancos de Panamá
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义PA辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract PAAssetProtocol {
// 辖区标识
const JURISDICTION: string = "PA";
const REGULATOR: string = "SBPSuperintendencia de Bancos de Panamá";
const CA_AUTHORITY: string = "PA_SBP_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须PA_SBP_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["数字资产", "代币", "股权", "债券"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["未经SBP授权的数字资产业务", "匿名交易"];
}

View File

@ -0,0 +1,58 @@
# 英属维京群岛British Virgin Islands 辖区宪法规则
## 基本信息
| 项目 | 内容 |
|------|------|
| 辖区代码 | VG |
| 辖区名称 | 英属维京群岛British Virgin Islands |
| 监管机构 | FSCFinancial Services Commission |
| 关键法律 | BVI Business Companies Act 2004 & Virtual Assets Service Providers Act 2022 |
| 授权CA | VG_FSC_CA |
| 辖区层级 | Tier 2离岸金融中心 |
## CBPP 四大原则在本辖区的体现
**约法即是治法**:本辖区宪法规则由 VG_FSC_CA 签名授权后直接生效,无需链上投票。
**宪法即是规则**:所有在 VG 辖区发生的链上交易,其合法性由本辖区宪法规则判定,没有宪法外的规则。
**参与即是共识**:节点加载本辖区插件并参与区块生产,即代表对 VG 辖区宪法规则的背书,无需额外的多签或投票确认。
**节点产生区块,交易决定区块大小**:区块大小由 VG 辖区的实际交易量动态决定,不设固定上限。
## 宪法规则条款
| 规则编号 | 规则描述 |
|---------|---------|
| VG_VASP_001 | 虚拟资产服务商须向FSC申请VASP牌照 |
| VG_BVI_001 | BVI公司须在公司注册处登记保留受益所有人信息 |
| VG_AML_001 | 须符合防洗钱及恐怖融资(防制)法规 |
| VG_KYC_001 | KYC须核实最终受益人UBO至25%持股门槛 |
| VG_REPORT_001 | 向FSC提交年度合规报告 |
## 支持的资产类型
- 股权
- 债券
- 基金份额
- 虚拟资产
- 知识产权
## 禁止活动
- 无牌照VASP运营
- 匿名壳公司
## 文件说明
| 文件 | 说明 |
|------|------|
| `constitution_rules.cnnl` | CNNL 形式化宪法规则描述 |
| `jurisdiction_plugin.rs` | Rust CEE 验证插件(各辖区独立出具 CR |
| `protocol_template.charter` | Charter 智能合约协议模板 |
| `README.md` | 本文件 |
## 与其他辖区的关系
VG 辖区与其他辖区**完全独立**。跨辖区交易时VG 辖区节点独立出具本辖区的 CR目标辖区节点独立出具目标辖区的 CR双方 CR 各自独立,互不依赖。这是 CBPP"参与即是共识"原则的体现。

View File

@ -0,0 +1,59 @@
// NAC 宪法层辖区规则 — 英属维京群岛British Virgin Islands
// 监管机构FSCFinancial Services Commission
// 关键法律BVI Business Companies Act 2004 & Virtual Assets Service Providers Act 2022
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 生效方式辖区授权CAVG_FSC_CA签名后直接生效无需链上投票
JURISDICTION VG {
name: "英属维京群岛British Virgin Islands"
regulator: "FSCFinancial Services Commission"
key_law: "BVI Business Companies Act 2004 & Virtual Assets Service Providers Act 2022"
ca_authority: "VG_FSC_CA"
tier: "TIER_2"
// 支持的资产类型
supported_asset_types: ["股权", "债券", "基金份额", "虚拟资产", "知识产权"]
// 禁止事项(直接生效,无需投票)
prohibited_activities: ["无牌照VASP运营", "匿名壳公司"]
}
CLAUSE VG_VASP_001 {
jurisdiction: "VG"
type: "COMPLIANCE_RULE"
description: "虚拟资产服务商须向FSC申请VASP牌照"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE VG_BVI_001 {
jurisdiction: "VG"
type: "COMPLIANCE_RULE"
description: "BVI公司须在公司注册处登记保留受益所有人信息"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE VG_AML_001 {
jurisdiction: "VG"
type: "COMPLIANCE_RULE"
description: "须符合防洗钱及恐怖融资(防制)法规"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE VG_KYC_001 {
jurisdiction: "VG"
type: "COMPLIANCE_RULE"
description: "KYC须核实最终受益人UBO至25%持股门槛"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}
CLAUSE VG_REPORT_001 {
jurisdiction: "VG"
type: "COMPLIANCE_RULE"
description: "向FSC提交年度合规报告"
enforcement: "CA_SIGNED" // 辖区授权CA签名后直接生效无需链上投票约法即是治法
effective_immediately: true
}

View File

@ -0,0 +1,101 @@
// Charter 智能合约协议模板 — 英属维京群岛British Virgin Islands
// 监管机构FSCFinancial Services Commission
// CBPP 原则:约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
//
// 本模板定义VG辖区内资产上链的标准协议
// 合规验证由 CEEConstitutional Execution Engine在节点层执行
// 节点参与出块即代表对本辖区宪法规则的背书(参与即是共识)
contract VGAssetProtocol {
// 辖区标识
const JURISDICTION: string = "VG";
const REGULATOR: string = "FSCFinancial Services Commission";
const CA_AUTHORITY: string = "VG_FSC_CA";
// 资产结构
struct Asset {
id: Hash, // 48字节 SHA3-384
owner: Address, // 32字节
asset_type: string,
jurisdiction: string,
compliance_cr: Hash, // 合规收据哈希由CEE出具参与即是共识
created_at: u64,
metadata: bytes,
}
// 合规收据结构由CEE独立出具无需多签
struct ConstitutionalReceipt {
jurisdiction: string,
passed: bool,
applied_rules: []string,
ca_authority: string,
timestamp: u64,
}
// 资产注册(须持有有效合规收据)
// 约法即是治法宪法规则由CEE在节点层强制执行
fn register_asset(
asset_type: string,
metadata: bytes,
compliance_cr: Hash,
) -> Hash {
// 验证合规收据CEE已在节点层验证此处确认收据存在
require(compliance_cr != Hash::zero(), "须提供有效合规收据");
require(asset_type in SUPPORTED_ASSET_TYPES, "不支持的资产类型");
let asset_id = Hash::from_data(caller() ++ asset_type ++ now());
emit AssetRegistered {
id: asset_id,
owner: caller(),
asset_type: asset_type,
jurisdiction: JURISDICTION,
compliance_cr: compliance_cr,
};
return asset_id;
}
// 资产转移(须重新验证合规)
// 参与即是共识:转移交易由节点验证,节点参与出块即代表对宪法规则的背书
fn transfer_asset(
asset_id: Hash,
to: Address,
new_compliance_cr: Hash,
) -> bool {
require(new_compliance_cr != Hash::zero(), "须提供新的合规收据");
emit AssetTransferred {
id: asset_id,
from: caller(),
to: to,
compliance_cr: new_compliance_cr,
};
return true;
}
// 辖区规则更新须辖区授权CA签名直接生效无需链上投票
// 约法即是治法CA签名即是法律授权无需额外的链上治理投票
fn update_jurisdiction_rules(
new_rules_hash: Hash,
ca_signature: bytes,
) -> bool {
require(verify_ca_signature(ca_signature, CA_AUTHORITY), "须VG_FSC_CA签名授权");
emit JurisdictionRulesUpdated {
jurisdiction: JURISDICTION,
new_rules_hash: new_rules_hash,
ca_authority: CA_AUTHORITY,
effective_at: now(), // 签名即生效,无需等待投票
};
return true;
}
// 支持的资产类型
const SUPPORTED_ASSET_TYPES: []string = ["股权", "债券", "基金份额", "虚拟资产", "知识产权"];
// 禁止活动(直接生效)
const PROHIBITED_ACTIVITIES: []string = ["无牌照VASP运营", "匿名壳公司"];
}

View File

@ -0,0 +1,217 @@
// NAC BR 辖区宪法规则验证插件
// 监管机构CVM/BCB (Comissão de Valores Mobiliários / Banco Central do Brasil)
// 法律框架Lei 14.478/2022 (VASP) / Lei 6.385/1976 (Securities)
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识BR辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "BR";
const AML_THRESHOLD_USD: f64 = 10000.0;
/// BR 辖区交易上下文(巴西)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BRTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// BR 辖区宪法规则验证引擎
pub struct BRJurisdictionPlugin;
impl BRJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Enhanced
fn check_kyc_level(tx: &BRTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Enhanced | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Enhanced" == "Enhanced")
}
/// AML 阈值检查10000 USD
fn check_aml_threshold(tx: &BRTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 CVM/BCB (Comissão de Valores Mobiliários / Banco Central do Brasil) 报告
// 约法即是治法:此要求直接来自 Lei 14.478/2022 (VASP) / Lei 6.385/1976 (Securities)
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &BRTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &BRTxContext) -> bool {
// Rule: VASP registration with BCB mandatory
// Rule: CPF/CNPJ identity verification required
// Rule: BRL conversion reporting above BRL 10,000
// Rule: CVM oversight for security tokens
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &BRTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl BRJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &BRTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("BR_KYC: Minimum level Enhanced required per {}",
"CVM/BCB (Comissão de Valores Mobiliários / Banco Central do Brasil)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("BR_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "CVM/BCB (Comissão de Valores Mobiliários / Banco Central do Brasil)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "BR_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "BR_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"CVM/BCB (Comissão de Valores Mobiliários / Banco Central do Brasil)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> BRTxContext {
BRTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_br_valid_transaction() {
let plugin = BRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_br_kyc_insufficient() {
let plugin = BRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_br_aml_threshold_exceeded_unreported() {
let plugin = BRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_br_aml_threshold_reported() {
let plugin = BRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_br_anonymous_rejected() {
let plugin = BRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_br_jurisdiction_code() {
let plugin = BRJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "BR");
}
#[test]
fn test_br_regulatory_authority() {
let plugin = BRJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,217 @@
// NAC ID 辖区宪法规则验证插件
// 监管机构OJK/Bappebti (Otoritas Jasa Keuangan / Commodity Futures Trading Regulatory Agency)
// 法律框架Peraturan Bappebti No. 8/2021 (Crypto Asset Trading)
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识ID辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "ID";
const AML_THRESHOLD_USD: f64 = 10000.0;
/// ID 辖区交易上下文(印度尼西亚)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct IDTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// ID 辖区宪法规则验证引擎
pub struct IDJurisdictionPlugin;
impl IDJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Enhanced
fn check_kyc_level(tx: &IDTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Enhanced | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Enhanced" == "Enhanced")
}
/// AML 阈值检查10000 USD
fn check_aml_threshold(tx: &IDTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 OJK/Bappebti (Otoritas Jasa Keuangan / Commodity Futures Trading Regulatory Agency) 报告
// 约法即是治法:此要求直接来自 Peraturan Bappebti No. 8/2021 (Crypto Asset Trading)
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &IDTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &IDTxContext) -> bool {
// Rule: Only Bappebti-approved crypto assets can be traded (whitelist)
// Rule: Indonesian NIK KYC mandatory
// Rule: IDR reporting above IDR 100,000,000
// Rule: PPATK suspicious transaction reporting mandatory
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &IDTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl IDJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &IDTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("ID_KYC: Minimum level Enhanced required per {}",
"OJK/Bappebti (Otoritas Jasa Keuangan / Commodity Futures Trading Regulatory Agency)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("ID_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "OJK/Bappebti (Otoritas Jasa Keuangan / Commodity Futures Trading Regulatory Agency)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "ID_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "ID_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"OJK/Bappebti (Otoritas Jasa Keuangan / Commodity Futures Trading Regulatory Agency)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> IDTxContext {
IDTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_id_valid_transaction() {
let plugin = IDJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_id_kyc_insufficient() {
let plugin = IDJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_id_aml_threshold_exceeded_unreported() {
let plugin = IDJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_id_aml_threshold_reported() {
let plugin = IDJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_id_anonymous_rejected() {
let plugin = IDJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_id_jurisdiction_code() {
let plugin = IDJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "ID");
}
#[test]
fn test_id_regulatory_authority() {
let plugin = IDJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,217 @@
// NAC IN 辖区宪法规则验证插件
// 监管机构SEBI/RBI (Securities and Exchange Board / Reserve Bank of India)
// 法律框架Finance Act 2022 (VDA 30% tax) / PMLA 2002 / FEMA 1999
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识IN辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "IN";
const AML_THRESHOLD_USD: f64 = 5000.0;
/// IN 辖区交易上下文(印度)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct INTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// IN 辖区宪法规则验证引擎
pub struct INJurisdictionPlugin;
impl INJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Institutional
fn check_kyc_level(tx: &INTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Institutional | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Institutional" == "Enhanced")
}
/// AML 阈值检查5000 USD
fn check_aml_threshold(tx: &INTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 SEBI/RBI (Securities and Exchange Board / Reserve Bank of India) 报告
// 约法即是治法:此要求直接来自 Finance Act 2022 (VDA 30% tax) / PMLA 2002 / FEMA 1999
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &INTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &INTxContext) -> bool {
// Rule: 30% flat tax on VDA gains under Finance Act 2022
// Rule: 1% TDS on VDA transfers above INR 50,000
// Rule: PAN/Aadhaar KYC mandatory
// Rule: FEMA compliance for cross-border transfers
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &INTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl INJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &INTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("IN_KYC: Minimum level Institutional required per {}",
"SEBI/RBI (Securities and Exchange Board / Reserve Bank of India)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("IN_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "SEBI/RBI (Securities and Exchange Board / Reserve Bank of India)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "IN_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "IN_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"SEBI/RBI (Securities and Exchange Board / Reserve Bank of India)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> INTxContext {
INTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_in_valid_transaction() {
let plugin = INJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_in_kyc_insufficient() {
let plugin = INJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_in_aml_threshold_exceeded_unreported() {
let plugin = INJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 6000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_in_aml_threshold_reported() {
let plugin = INJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 6000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_in_anonymous_rejected() {
let plugin = INJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_in_jurisdiction_code() {
let plugin = INJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "IN");
}
#[test]
fn test_in_regulatory_authority() {
let plugin = INJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -25,3 +25,15 @@ pub mod je;
pub mod im; pub mod im;
pub mod pa; pub mod pa;
pub mod mu; pub mod mu;
// Tier 3 Emerging Market Jurisdictions
pub mod br;
pub mod in_jurisdiction; // India ("in" is a Rust keyword)
pub mod th;
pub mod id;
pub mod ng;
pub mod mx;
pub mod za;
pub mod tr;
pub mod sa;
pub mod ru;

View File

@ -0,0 +1,217 @@
// NAC MX 辖区宪法规则验证插件
// 监管机构CNBV/Banxico (Comisión Nacional Bancaria y de Valores / Bank of Mexico)
// 法律框架Ley Fintech 2018 / CNBV Circular 4/2019
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识MX辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "MX";
const AML_THRESHOLD_USD: f64 = 10000.0;
/// MX 辖区交易上下文(墨西哥)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MXTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// MX 辖区宪法规则验证引擎
pub struct MXJurisdictionPlugin;
impl MXJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Enhanced
fn check_kyc_level(tx: &MXTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Enhanced | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Enhanced" == "Enhanced")
}
/// AML 阈值检查10000 USD
fn check_aml_threshold(tx: &MXTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 CNBV/Banxico (Comisión Nacional Bancaria y de Valores / Bank of Mexico) 报告
// 约法即是治法:此要求直接来自 Ley Fintech 2018 / CNBV Circular 4/2019
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &MXTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &MXTxContext) -> bool {
// Rule: ITF license required from CNBV
// Rule: CURP/RFC identity verification mandatory
// Rule: MXN reporting above MXN 200,000
// Rule: UIF suspicious transaction reporting mandatory
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &MXTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl MXJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &MXTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("MX_KYC: Minimum level Enhanced required per {}",
"CNBV/Banxico (Comisión Nacional Bancaria y de Valores / Bank of Mexico)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("MX_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "CNBV/Banxico (Comisión Nacional Bancaria y de Valores / Bank of Mexico)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "MX_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "MX_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"CNBV/Banxico (Comisión Nacional Bancaria y de Valores / Bank of Mexico)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> MXTxContext {
MXTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_mx_valid_transaction() {
let plugin = MXJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_mx_kyc_insufficient() {
let plugin = MXJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_mx_aml_threshold_exceeded_unreported() {
let plugin = MXJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_mx_aml_threshold_reported() {
let plugin = MXJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_mx_anonymous_rejected() {
let plugin = MXJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_mx_jurisdiction_code() {
let plugin = MXJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "MX");
}
#[test]
fn test_mx_regulatory_authority() {
let plugin = MXJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,217 @@
// NAC NG 辖区宪法规则验证插件
// 监管机构SEC Nigeria / CBN (Central Bank of Nigeria)
// 法律框架Investments and Securities Act 2007 / SEC Nigeria Digital Assets Rules 2022
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识NG辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "NG";
const AML_THRESHOLD_USD: f64 = 10000.0;
/// NG 辖区交易上下文(尼日利亚)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NGTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// NG 辖区宪法规则验证引擎
pub struct NGJurisdictionPlugin;
impl NGJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Enhanced
fn check_kyc_level(tx: &NGTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Enhanced | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Enhanced" == "Enhanced")
}
/// AML 阈值检查10000 USD
fn check_aml_threshold(tx: &NGTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 SEC Nigeria / CBN (Central Bank of Nigeria) 报告
// 约法即是治法:此要求直接来自 Investments and Securities Act 2007 / SEC Nigeria Digital Assets Rules 2022
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &NGTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &NGTxContext) -> bool {
// Rule: SEC Nigeria registration required for digital asset platforms
// Rule: BVN (Bank Verification Number) KYC mandatory
// Rule: NGN transactions above NGN 5,000,000 require NFIU reporting
// Rule: EFCC cooperation mandatory
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &NGTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl NGJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &NGTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("NG_KYC: Minimum level Enhanced required per {}",
"SEC Nigeria / CBN (Central Bank of Nigeria)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("NG_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "SEC Nigeria / CBN (Central Bank of Nigeria)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "NG_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "NG_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"SEC Nigeria / CBN (Central Bank of Nigeria)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> NGTxContext {
NGTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_ng_valid_transaction() {
let plugin = NGJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_ng_kyc_insufficient() {
let plugin = NGJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_ng_aml_threshold_exceeded_unreported() {
let plugin = NGJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_ng_aml_threshold_reported() {
let plugin = NGJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_ng_anonymous_rejected() {
let plugin = NGJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_ng_jurisdiction_code() {
let plugin = NGJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "NG");
}
#[test]
fn test_ng_regulatory_authority() {
let plugin = NGJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,217 @@
// NAC RU 辖区宪法规则验证插件
// 监管机构CBR/Rosfinmonitoring (Central Bank of Russia / Federal Financial Monitoring Service)
// 法律框架Federal Law No. 259-FZ on Digital Financial Assets (2021) / Federal Law No. 115-FZ
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识RU辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "RU";
const AML_THRESHOLD_USD: f64 = 5000.0;
/// RU 辖区交易上下文(俄罗斯)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RUTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// RU 辖区宪法规则验证引擎
pub struct RUJurisdictionPlugin;
impl RUJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Institutional
fn check_kyc_level(tx: &RUTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Institutional | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Institutional" == "Enhanced")
}
/// AML 阈值检查5000 USD
fn check_aml_threshold(tx: &RUTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 CBR/Rosfinmonitoring (Central Bank of Russia / Federal Financial Monitoring Service) 报告
// 约法即是治法:此要求直接来自 Federal Law No. 259-FZ on Digital Financial Assets (2021) / Federal Law No. 115-FZ
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &RUTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &RUTxContext) -> bool {
// Rule: DFA issuance requires CBR-licensed operator
// Rule: Russian passport/SNILS KYC mandatory
// Rule: RUB reporting above RUB 600,000
// Rule: Prohibition on using crypto as payment in Russia
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &RUTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl RUJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &RUTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("RU_KYC: Minimum level Institutional required per {}",
"CBR/Rosfinmonitoring (Central Bank of Russia / Federal Financial Monitoring Service)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("RU_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "CBR/Rosfinmonitoring (Central Bank of Russia / Federal Financial Monitoring Service)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "RU_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "RU_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"CBR/Rosfinmonitoring (Central Bank of Russia / Federal Financial Monitoring Service)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> RUTxContext {
RUTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_ru_valid_transaction() {
let plugin = RUJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_ru_kyc_insufficient() {
let plugin = RUJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_ru_aml_threshold_exceeded_unreported() {
let plugin = RUJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 6000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_ru_aml_threshold_reported() {
let plugin = RUJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 6000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_ru_anonymous_rejected() {
let plugin = RUJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_ru_jurisdiction_code() {
let plugin = RUJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "RU");
}
#[test]
fn test_ru_regulatory_authority() {
let plugin = RUJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,232 @@
// NAC SA 辖区宪法规则验证插件
// 监管机构CMA/SAMA (Capital Market Authority / Saudi Arabian Monetary Authority)
// 法律框架Capital Market Law / SAMA Fintech Framework / Vision 2030
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识SA辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "SA";
const AML_THRESHOLD_USD: f64 = 10000.0;
/// SA 辖区交易上下文(沙特阿拉伯)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SATxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
pub is_shariah_compliant: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// SA 辖区宪法规则验证引擎
pub struct SAJurisdictionPlugin;
impl SAJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Institutional
fn check_kyc_level(tx: &SATxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Institutional | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Institutional" == "Enhanced")
}
/// AML 阈值检查10000 USD
fn check_aml_threshold(tx: &SATxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 CMA/SAMA (Capital Market Authority / Saudi Arabian Monetary Authority) 报告
// 约法即是治法:此要求直接来自 Capital Market Law / SAMA Fintech Framework / Vision 2030
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &SATxContext) -> bool {
tx.sanctions_cleared
}
fn check_shariah_compliance(tx: &SATxContext) -> bool {
// 伊斯兰金融合规:禁止 Riba利息仅允许 Shariah 合规资产
// 约法即是治法:此规则直接来自 CMA/SAMA 的伊斯兰金融法规
tx.is_shariah_compliant && !tx.asset_type.contains("interest")
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &SATxContext) -> bool {
// Rule: CMA sandbox participation required
// Rule: Saudi National ID / Iqama KYC mandatory
// Rule: SAR reporting above SAR 37,500
// Rule: Islamic finance Shariah compliance mandatory
// Rule: Prohibition on Riba (interest)
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &SATxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl SAJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &SATxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("SA_KYC: Minimum level Institutional required per {}",
"CMA/SAMA (Capital Market Authority / Saudi Arabian Monetary Authority)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("SA_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "CMA/SAMA (Capital Market Authority / Saudi Arabian Monetary Authority)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "SA_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "SA_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 伊斯兰金融合规检查SA 辖区专属)
if !Self::check_shariah_compliance(tx) {
return ValidationResult::Rejected {
reason: "SA_SHARIAH_COMPLIANCE: Asset must be Shariah-compliant, Riba is prohibited".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"CMA/SAMA (Capital Market Authority / Saudi Arabian Monetary Authority)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> SATxContext {
SATxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
is_shariah_compliant: true,
}
}
#[test]
fn test_sa_valid_transaction() {
let plugin = SAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_sa_kyc_insufficient() {
let plugin = SAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_sa_aml_threshold_exceeded_unreported() {
let plugin = SAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 11000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_sa_aml_threshold_reported() {
let plugin = SAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 11000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_sa_anonymous_rejected() {
let plugin = SAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Institutional, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_sa_jurisdiction_code() {
let plugin = SAJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "SA");
}
#[test]
fn test_sa_regulatory_authority() {
let plugin = SAJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,217 @@
// NAC TH 辖区宪法规则验证插件
// 监管机构SEC Thailand (Securities and Exchange Commission)
// 法律框架Digital Asset Business Act B.E. 2561 (2018)
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识TH辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "TH";
const AML_THRESHOLD_USD: f64 = 15000.0;
/// TH 辖区交易上下文(泰国)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct THTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// TH 辖区宪法规则验证引擎
pub struct THJurisdictionPlugin;
impl THJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Enhanced
fn check_kyc_level(tx: &THTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Enhanced | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Enhanced" == "Enhanced")
}
/// AML 阈值检查15000 USD
fn check_aml_threshold(tx: &THTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 SEC Thailand (Securities and Exchange Commission) 报告
// 约法即是治法:此要求直接来自 Digital Asset Business Act B.E. 2561 (2018)
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &THTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &THTxContext) -> bool {
// Rule: Digital asset exchange license required from SEC Thailand
// Rule: THB reporting above THB 500,000
// Rule: SEC Thailand approval required for ICO/IEO
// Rule: AMLO anti-money laundering reporting mandatory
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &THTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl THJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &THTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("TH_KYC: Minimum level Enhanced required per {}",
"SEC Thailand (Securities and Exchange Commission)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("TH_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "SEC Thailand (Securities and Exchange Commission)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "TH_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "TH_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"SEC Thailand (Securities and Exchange Commission)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> THTxContext {
THTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_th_valid_transaction() {
let plugin = THJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_th_kyc_insufficient() {
let plugin = THJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_th_aml_threshold_exceeded_unreported() {
let plugin = THJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 16000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_th_aml_threshold_reported() {
let plugin = THJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 16000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_th_anonymous_rejected() {
let plugin = THJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_th_jurisdiction_code() {
let plugin = THJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "TH");
}
#[test]
fn test_th_regulatory_authority() {
let plugin = THJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,217 @@
// NAC TR 辖区宪法规则验证插件
// 监管机构SPK/BDDK (Capital Markets Board / Banking Regulation and Supervision Agency)
// 法律框架Capital Markets Law No. 6362 / Crypto Asset Service Providers Regulation 2021
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识TR辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "TR";
const AML_THRESHOLD_USD: f64 = 15000.0;
/// TR 辖区交易上下文(土耳其)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TRTxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// TR 辖区宪法规则验证引擎
pub struct TRJurisdictionPlugin;
impl TRJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Enhanced
fn check_kyc_level(tx: &TRTxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Enhanced | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Enhanced" == "Enhanced")
}
/// AML 阈值检查15000 USD
fn check_aml_threshold(tx: &TRTxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 SPK/BDDK (Capital Markets Board / Banking Regulation and Supervision Agency) 报告
// 约法即是治法:此要求直接来自 Capital Markets Law No. 6362 / Crypto Asset Service Providers Regulation 2021
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &TRTxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &TRTxContext) -> bool {
// Rule: CASP license required from SPK
// Rule: Turkish TC Kimlik No KYC mandatory
// Rule: TRY reporting above TRY 75,000
// Rule: Prohibition on using crypto as payment instruments (CBRT 2021)
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &TRTxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl TRJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &TRTxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("TR_KYC: Minimum level Enhanced required per {}",
"SPK/BDDK (Capital Markets Board / Banking Regulation and Supervision Agency)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("TR_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "SPK/BDDK (Capital Markets Board / Banking Regulation and Supervision Agency)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "TR_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "TR_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"SPK/BDDK (Capital Markets Board / Banking Regulation and Supervision Agency)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> TRTxContext {
TRTxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_tr_valid_transaction() {
let plugin = TRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_tr_kyc_insufficient() {
let plugin = TRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_tr_aml_threshold_exceeded_unreported() {
let plugin = TRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 16000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_tr_aml_threshold_reported() {
let plugin = TRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 16000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_tr_anonymous_rejected() {
let plugin = TRJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_tr_jurisdiction_code() {
let plugin = TRJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "TR");
}
#[test]
fn test_tr_regulatory_authority() {
let plugin = TRJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -0,0 +1,217 @@
// NAC ZA 辖区宪法规则验证插件
// 监管机构FSCA/SARB (Financial Sector Conduct Authority / South African Reserve Bank)
// 法律框架FSCA Declaration 2022 / FICA / POPIA
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// 参与即是共识ZA辖区节点加载此插件参与出块即代表对本辖区宪法规则的背书
// NAC_Lens 4.0 路由层自动处理跨辖区消息传递
use serde::{Deserialize, Serialize};
const JURISDICTION_CODE: &str = "ZA";
const AML_THRESHOLD_USD: f64 = 10000.0;
/// ZA 辖区交易上下文(南非)
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ZATxContext {
pub tx_hash: String,
pub from: [u8; 32],
pub to: [u8; 32],
pub amount_usd: f64,
pub asset_type: String,
pub kyc_level: KycLevel,
pub aml_reported: bool,
pub is_anonymous: bool,
pub is_cross_border: bool,
pub sanctions_cleared: bool,
}
/// KYC 等级
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum KycLevel {
None,
Basic,
Enhanced,
Institutional,
}
/// 验证结果
#[derive(Debug, Clone)]
pub enum ValidationResult {
Approved {
jurisdiction: String,
/// 宪法收据CR参与即是共识节点独立出具无需多签
constitutional_receipt: String,
},
Rejected {
reason: String,
jurisdiction: String,
},
}
/// ZA 辖区宪法规则验证引擎
pub struct ZAJurisdictionPlugin;
impl ZAJurisdictionPlugin {
pub fn new() -> Self {
Self
}
/// KYC 等级验证最低要求Enhanced
fn check_kyc_level(tx: &ZATxContext) -> bool {
matches!(tx.kyc_level, KycLevel::Enhanced | KycLevel::Institutional)
|| (tx.kyc_level == KycLevel::Enhanced && "Enhanced" == "Enhanced")
}
/// AML 阈值检查10000 USD
fn check_aml_threshold(tx: &ZATxContext) -> bool {
if tx.amount_usd > AML_THRESHOLD_USD {
// 超过阈值需要向 FSCA/SARB (Financial Sector Conduct Authority / South African Reserve Bank) 报告
// 约法即是治法:此要求直接来自 FSCA Declaration 2022 / FICA / POPIA
return tx.aml_reported;
}
true
}
/// 制裁名单检查
fn check_sanctions(tx: &ZATxContext) -> bool {
tx.sanctions_cleared
}
/// 辖区特定规则验证
fn check_jurisdiction_rules(tx: &ZATxContext) -> bool {
// Rule: CASP license required from FSCA since 2023
// Rule: FICA KYC compliance mandatory
// Rule: ZAR reporting above ZAR 100,000
// Rule: SARB exchange control for cross-border transfers
// 禁止匿名交易(宪法即是规则)
!tx.is_anonymous
}
/// 出具宪法收据CR
/// 参与即是共识节点独立出具CR无需多签无需链上投票
fn issue_constitutional_receipt(tx: &ZATxContext) -> String {
format!("CR-{}:{}", JURISDICTION_CODE, tx.tx_hash)
}
}
impl ZAJurisdictionPlugin {
/// 主验证入口
pub fn validate(&self, tx: &ZATxContext) -> ValidationResult {
// 1. KYC 验证
if !Self::check_kyc_level(tx) {
return ValidationResult::Rejected {
reason: format!("ZA_KYC: Minimum level Enhanced required per {}",
"FSCA/SARB (Financial Sector Conduct Authority / South African Reserve Bank)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 2. AML 阈值检查
if !Self::check_aml_threshold(tx) {
return ValidationResult::Rejected {
reason: format!("ZA_AML: Transactions above {} USD require reporting to {}",
AML_THRESHOLD_USD, "FSCA/SARB (Financial Sector Conduct Authority / South African Reserve Bank)"),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 3. 制裁名单检查
if !Self::check_sanctions(tx) {
return ValidationResult::Rejected {
reason: "ZA_SANCTIONS: Transaction parties are on sanctions list".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 4. 辖区特定规则
if !Self::check_jurisdiction_rules(tx) {
return ValidationResult::Rejected {
reason: "ZA_RULES: Jurisdiction-specific rule violation".to_string(),
jurisdiction: JURISDICTION_CODE.to_string(),
};
}
// 验证通过,出具 CR参与即是共识
ValidationResult::Approved {
jurisdiction: JURISDICTION_CODE.to_string(),
constitutional_receipt: Self::issue_constitutional_receipt(tx),
}
}
pub fn jurisdiction_code(&self) -> &str {
JURISDICTION_CODE
}
pub fn regulatory_authority(&self) -> &str {
"FSCA/SARB (Financial Sector Conduct Authority / South African Reserve Bank)"
}
}
#[cfg(test)]
mod tests {
use super::*;
fn make_tx(kyc: KycLevel, amount: f64, anonymous: bool, aml: bool) -> ZATxContext {
ZATxContext {
tx_hash: "test_hash_001".to_string(),
from: [0u8; 32],
to: [1u8; 32],
amount_usd: amount,
asset_type: "RWA_REAL_ESTATE".to_string(),
kyc_level: kyc,
aml_reported: aml,
is_anonymous: anonymous,
is_cross_border: false,
sanctions_cleared: true,
}
}
#[test]
fn test_za_valid_transaction() {
let plugin = ZAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_za_kyc_insufficient() {
let plugin = ZAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::None, 1000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_za_aml_threshold_exceeded_unreported() {
let plugin = ZAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_za_aml_threshold_reported() {
let plugin = ZAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 11000.0, false, true);
assert!(matches!(plugin.validate(&tx), ValidationResult::Approved { .. }));
}
#[test]
fn test_za_anonymous_rejected() {
let plugin = ZAJurisdictionPlugin::new();
let tx = make_tx(KycLevel::Enhanced, 100.0, true, false);
assert!(matches!(plugin.validate(&tx), ValidationResult::Rejected { .. }));
}
#[test]
fn test_za_jurisdiction_code() {
let plugin = ZAJurisdictionPlugin::new();
assert_eq!(plugin.jurisdiction_code(), "ZA");
}
#[test]
fn test_za_regulatory_authority() {
let plugin = ZAJurisdictionPlugin::new();
assert!(!plugin.regulatory_authority().is_empty());
}
}

View File

@ -340,15 +340,17 @@ mod tests {
use super::*; use super::*;
use std::env; use std::env;
fn make_manager() -> JurisdictionVersionManager { fn make_manager_with_id(id: &str) -> JurisdictionVersionManager {
let tmp = env::temp_dir().join("nac_version_test"); let tmp = env::temp_dir().join(format!("nac_version_test_{}", id));
// 清理旧数据确保测试隔离
let _ = std::fs::remove_dir_all(&tmp);
let _ = fs::create_dir_all(&tmp); let _ = fs::create_dir_all(&tmp);
JurisdictionVersionManager::new(&tmp) JurisdictionVersionManager::new(&tmp)
} }
#[test] #[test]
fn test_publish_version() { fn test_publish_version() {
let mut mgr = make_manager(); let mut mgr = make_manager_with_id("publish");
let result = mgr.publish_version( let result = mgr.publish_version(
"CN", "CN",
RuleVersion::new(1, 0, 0), RuleVersion::new(1, 0, 0),
@ -369,7 +371,7 @@ mod tests {
#[test] #[test]
fn test_ca_signature_required() { fn test_ca_signature_required() {
let mut mgr = make_manager(); let mut mgr = make_manager_with_id("ca_sig");
// 无CA签名不得发布新版本 // 无CA签名不得发布新版本
let result = mgr.publish_version( let result = mgr.publish_version(
"HK", RuleVersion::new(1, 0, 0), "hash", "SFC_CA", "HK", RuleVersion::new(1, 0, 0), "hash", "SFC_CA",
@ -385,7 +387,7 @@ mod tests {
#[test] #[test]
fn test_version_must_increase() { fn test_version_must_increase() {
let mut mgr = make_manager(); let mut mgr = make_manager_with_id("must_inc");
// 发布 v1.0.0 // 发布 v1.0.0
mgr.publish_version("SG", RuleVersion::new(1, 0, 0), "h1", "MAS_CA", mgr.publish_version("SG", RuleVersion::new(1, 0, 0), "h1", "MAS_CA",
vec![1], "v1", None).unwrap(); vec![1], "v1", None).unwrap();
@ -401,7 +403,7 @@ mod tests {
#[test] #[test]
fn test_old_version_auto_archived() { fn test_old_version_auto_archived() {
let mut mgr = make_manager(); let mut mgr = make_manager_with_id("auto_arch");
// 发布 v1.0.0 // 发布 v1.0.0
mgr.publish_version("AE", RuleVersion::new(1, 0, 0), "h1", "VARA_CA", mgr.publish_version("AE", RuleVersion::new(1, 0, 0), "h1", "VARA_CA",
vec![1], "v1", None).unwrap(); vec![1], "v1", None).unwrap();
@ -424,7 +426,7 @@ mod tests {
#[test] #[test]
fn test_version_history_query() { fn test_version_history_query() {
let mut mgr = make_manager(); let mut mgr = make_manager_with_id("hist_query");
for patch in 0..3u32 { for patch in 0..3u32 {
mgr.publish_version( mgr.publish_version(
"JP", "JP",
@ -445,7 +447,7 @@ mod tests {
#[test] #[test]
fn test_rollback_requires_ca_signature() { fn test_rollback_requires_ca_signature() {
let mut mgr = make_manager(); let mut mgr = make_manager_with_id("rollback");
mgr.publish_version("KR", RuleVersion::new(1, 0, 0), "h1", "FSC_CA", mgr.publish_version("KR", RuleVersion::new(1, 0, 0), "h1", "FSC_CA",
vec![1], "v1", None).unwrap(); vec![1], "v1", None).unwrap();
mgr.publish_version("KR", RuleVersion::new(2, 0, 0), "h2", "FSC_CA", mgr.publish_version("KR", RuleVersion::new(2, 0, 0), "h2", "FSC_CA",

107
nac-lens-jurisdiction-router/Cargo.lock generated Normal file
View File

@ -0,0 +1,107 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "itoa"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "memchr"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "nac-lens-jurisdiction-router"
version = "0.1.0"
dependencies = [
"serde",
"serde_json",
]
[[package]]
name = "proc-macro2"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [
"proc-macro2",
]
[[package]]
name = "serde"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"itoa",
"memchr",
"serde",
"serde_core",
"zmij",
]
[[package]]
name = "syn"
version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "zmij"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"

View File

@ -0,0 +1,9 @@
[package]
name = "nac-lens-jurisdiction-router"
version = "0.1.0"
edition = "2021"
description = "NAC_Lens 4.0辖区路由层集成模块 (Issue #77)"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -0,0 +1,467 @@
// NAC_Lens 4.0 辖区路由层集成模块Issue #77
// 将 jurisdiction_router.rs 集成到 NAC_Lens 消息分发管道
// CBPP原则约法即是治法 | 宪法即是规则 | 参与即是共识 | 节点产生区块交易决定区块大小
// NAC_Lens 是 NAC 原生协议(原 NRPC 已统一更名为 NAC_Lens
// 跨辖区交易源辖区节点和目标辖区节点各自独立出具CR参与即是共识非多签
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
/// NAC_Lens 消息类型
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum NacLensMessageType {
/// 单辖区交易
IntraJurisdiction {
jurisdiction: String,
},
/// 跨辖区交易(源辖区 -> 目标辖区)
CrossJurisdiction {
source_jurisdiction: String,
target_jurisdiction: String,
},
/// 辖区规则更新广播CA签名授权约法即是治法
JurisdictionRuleUpdate {
jurisdiction: String,
new_version: String,
ca_signature: Vec<u8>,
},
/// 宪法收据CR广播参与即是共识
ConstitutionalReceiptBroadcast {
jurisdiction: String,
tx_hash: String,
cr_hash: String,
},
/// 辖区节点注册GIDS辖区证明
NodeRegistration {
jurisdiction: String,
node_id: String,
gids_proof: Vec<u8>,
},
}
/// NAC_Lens 消息信封
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NacLensEnvelope {
/// 协议版本NAC_Lens 4.0
pub protocol_version: String,
/// 消息ID
pub message_id: String,
/// 消息类型
pub message_type: NacLensMessageType,
/// 消息体(序列化的交易或规则数据)
pub payload: Vec<u8>,
/// 发送节点ID
pub sender_node_id: String,
/// 时间戳UTC Unix 毫秒)
pub timestamp: u64,
}
impl NacLensEnvelope {
pub fn new(
message_id: &str,
message_type: NacLensMessageType,
payload: Vec<u8>,
sender_node_id: &str,
) -> Self {
Self {
protocol_version: "NAC_Lens/4.0".to_string(),
message_id: message_id.to_string(),
message_type,
payload,
sender_node_id: sender_node_id.to_string(),
timestamp: 0, // 实际使用时由运行时填充
}
}
}
/// 辖区路由表条目
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JurisdictionRouteEntry {
/// 辖区代码
pub jurisdiction_code: String,
/// 辖区节点列表节点ID -> 节点地址)
pub nodes: HashMap<String, String>,
/// 当前活跃规则版本
pub active_rule_version: String,
/// 路由优先级0=最高)
pub priority: u8,
/// 是否接受跨辖区消息
pub accepts_cross_jurisdiction: bool,
}
/// NAC_Lens 辖区路由器
/// 负责将消息路由到正确的辖区节点,支持跨辖区消息转发
pub struct NacLensJurisdictionRouter {
/// 路由表jurisdiction_code -> RouteEntry
routing_table: HashMap<String, JurisdictionRouteEntry>,
/// 本节点所属辖区
local_jurisdiction: String,
/// 本节点ID
local_node_id: String,
}
impl NacLensJurisdictionRouter {
pub fn new(local_jurisdiction: &str, local_node_id: &str) -> Self {
Self {
routing_table: HashMap::new(),
local_jurisdiction: local_jurisdiction.to_string(),
local_node_id: local_node_id.to_string(),
}
}
/// 注册辖区路由
pub fn register_jurisdiction(&mut self, entry: JurisdictionRouteEntry) {
self.routing_table.insert(entry.jurisdiction_code.clone(), entry);
}
/// 路由消息到目标辖区节点
/// 约法即是治法:路由决策基于宪法规则,不基于节点偏好
pub fn route(&self, envelope: &NacLensEnvelope) -> RoutingDecision {
match &envelope.message_type {
NacLensMessageType::IntraJurisdiction { jurisdiction } => {
self.route_intra_jurisdiction(jurisdiction, envelope)
}
NacLensMessageType::CrossJurisdiction {
source_jurisdiction,
target_jurisdiction,
} => self.route_cross_jurisdiction(source_jurisdiction, target_jurisdiction, envelope),
NacLensMessageType::JurisdictionRuleUpdate {
jurisdiction,
ca_signature,
..
} => {
// 规则更新广播到所有辖区节点CA签名验证通过后立即生效
if ca_signature.is_empty() {
return RoutingDecision::Rejected {
reason: "Rule update rejected: missing CA signature. \
Per CBPP '', rule updates require CA authorization."
.to_string(),
};
}
self.route_rule_update_broadcast(jurisdiction)
}
NacLensMessageType::ConstitutionalReceiptBroadcast {
jurisdiction,
tx_hash,
cr_hash,
} => {
// CR广播广播到所有节点参与即是共识
RoutingDecision::Broadcast {
target_jurisdictions: self.routing_table.keys().cloned().collect(),
message_summary: format!(
"CR broadcast: jurisdiction={}, tx={}, cr={}",
jurisdiction, tx_hash, cr_hash
),
}
}
NacLensMessageType::NodeRegistration {
jurisdiction,
node_id,
gids_proof,
} => {
if gids_proof.is_empty() {
return RoutingDecision::Rejected {
reason: format!(
"Node {} registration rejected: missing GIDS proof for jurisdiction {}",
node_id, jurisdiction
),
};
}
RoutingDecision::Forward {
target_jurisdiction: jurisdiction.clone(),
target_nodes: self
.routing_table
.get(jurisdiction)
.map(|e| e.nodes.keys().cloned().collect())
.unwrap_or_default(),
}
}
}
}
/// 单辖区内部路由
fn route_intra_jurisdiction(
&self,
jurisdiction: &str,
_envelope: &NacLensEnvelope,
) -> RoutingDecision {
if let Some(entry) = self.routing_table.get(jurisdiction) {
RoutingDecision::Forward {
target_jurisdiction: jurisdiction.to_string(),
target_nodes: entry.nodes.keys().cloned().collect(),
}
} else {
RoutingDecision::Rejected {
reason: format!(
"Jurisdiction {} not found in routing table. \
Node must register jurisdiction before routing.",
jurisdiction
),
}
}
}
/// 跨辖区路由
/// 参与即是共识源辖区和目标辖区各自独立处理各自出具CR
fn route_cross_jurisdiction(
&self,
source: &str,
target: &str,
_envelope: &NacLensEnvelope,
) -> RoutingDecision {
let source_entry = self.routing_table.get(source);
let target_entry = self.routing_table.get(target);
match (source_entry, target_entry) {
(Some(_src), Some(tgt)) => {
if !tgt.accepts_cross_jurisdiction {
return RoutingDecision::Rejected {
reason: format!(
"Jurisdiction {} does not accept cross-jurisdiction messages",
target
),
};
}
// 跨辖区:同时转发到源辖区和目标辖区
// 各辖区节点独立出具CR参与即是共识非多签
RoutingDecision::CrossJurisdictionForward {
source_jurisdiction: source.to_string(),
target_jurisdiction: target.to_string(),
source_nodes: self
.routing_table
.get(source)
.map(|e| e.nodes.keys().cloned().collect())
.unwrap_or_default(),
target_nodes: tgt.nodes.keys().cloned().collect(),
}
}
(None, _) => RoutingDecision::Rejected {
reason: format!("Source jurisdiction {} not registered", source),
},
(_, None) => RoutingDecision::Rejected {
reason: format!("Target jurisdiction {} not registered", target),
},
}
}
/// 规则更新广播路由
fn route_rule_update_broadcast(&self, jurisdiction: &str) -> RoutingDecision {
RoutingDecision::Broadcast {
target_jurisdictions: vec![jurisdiction.to_string()],
message_summary: format!(
"Rule update broadcast to all {} nodes (CA-authorized, effective immediately)",
jurisdiction
),
}
}
/// 获取辖区路由表统计
pub fn routing_stats(&self) -> RoutingStats {
let total_nodes: usize = self.routing_table.values().map(|e| e.nodes.len()).sum();
RoutingStats {
registered_jurisdictions: self.routing_table.len(),
total_nodes,
local_jurisdiction: self.local_jurisdiction.clone(),
local_node_id: self.local_node_id.clone(),
}
}
/// 更新辖区规则版本CA签名授权后调用
pub fn update_jurisdiction_version(&mut self, jurisdiction: &str, new_version: &str) -> bool {
if let Some(entry) = self.routing_table.get_mut(jurisdiction) {
entry.active_rule_version = new_version.to_string();
true
} else {
false
}
}
}
/// 路由决策
#[derive(Debug, Clone)]
pub enum RoutingDecision {
/// 转发到指定辖区节点
Forward {
target_jurisdiction: String,
target_nodes: Vec<String>,
},
/// 跨辖区转发(源辖区和目标辖区各自独立处理)
CrossJurisdictionForward {
source_jurisdiction: String,
target_jurisdiction: String,
source_nodes: Vec<String>,
target_nodes: Vec<String>,
},
/// 广播到多个辖区
Broadcast {
target_jurisdictions: Vec<String>,
message_summary: String,
},
/// 拒绝路由
Rejected {
reason: String,
},
}
/// 路由统计信息
#[derive(Debug, Clone)]
pub struct RoutingStats {
pub registered_jurisdictions: usize,
pub total_nodes: usize,
pub local_jurisdiction: String,
pub local_node_id: String,
}
#[cfg(test)]
mod tests {
use super::*;
fn make_router() -> NacLensJurisdictionRouter {
let mut router = NacLensJurisdictionRouter::new("CN", "node_cn_001");
// 注册 CN 辖区
let mut cn_nodes = HashMap::new();
cn_nodes.insert("node_cn_001".to_string(), "192.168.1.1:8080".to_string());
cn_nodes.insert("node_cn_002".to_string(), "192.168.1.2:8080".to_string());
router.register_jurisdiction(JurisdictionRouteEntry {
jurisdiction_code: "CN".to_string(),
nodes: cn_nodes,
active_rule_version: "1.0.0".to_string(),
priority: 0,
accepts_cross_jurisdiction: true,
});
// 注册 HK 辖区
let mut hk_nodes = HashMap::new();
hk_nodes.insert("node_hk_001".to_string(), "10.0.1.1:8080".to_string());
router.register_jurisdiction(JurisdictionRouteEntry {
jurisdiction_code: "HK".to_string(),
nodes: hk_nodes,
active_rule_version: "1.0.0".to_string(),
priority: 0,
accepts_cross_jurisdiction: true,
});
router
}
#[test]
fn test_intra_jurisdiction_routing() {
let router = make_router();
let envelope = NacLensEnvelope::new(
"msg_001",
NacLensMessageType::IntraJurisdiction {
jurisdiction: "CN".to_string(),
},
vec![],
"node_cn_001",
);
let decision = router.route(&envelope);
assert!(matches!(decision, RoutingDecision::Forward { .. }));
if let RoutingDecision::Forward { target_jurisdiction, target_nodes } = decision {
assert_eq!(target_jurisdiction, "CN");
assert_eq!(target_nodes.len(), 2);
}
}
#[test]
fn test_cross_jurisdiction_routing() {
let router = make_router();
let envelope = NacLensEnvelope::new(
"msg_002",
NacLensMessageType::CrossJurisdiction {
source_jurisdiction: "CN".to_string(),
target_jurisdiction: "HK".to_string(),
},
vec![],
"node_cn_001",
);
let decision = router.route(&envelope);
// 跨辖区:各辖区独立处理,参与即是共识
assert!(matches!(decision, RoutingDecision::CrossJurisdictionForward { .. }));
}
#[test]
fn test_rule_update_requires_ca_signature() {
let router = make_router();
let envelope = NacLensEnvelope::new(
"msg_003",
NacLensMessageType::JurisdictionRuleUpdate {
jurisdiction: "CN".to_string(),
new_version: "2.0.0".to_string(),
ca_signature: vec![], // 无签名
},
vec![],
"node_cn_001",
);
let decision = router.route(&envelope);
assert!(matches!(decision, RoutingDecision::Rejected { .. }));
}
#[test]
fn test_rule_update_with_ca_signature() {
let router = make_router();
let envelope = NacLensEnvelope::new(
"msg_004",
NacLensMessageType::JurisdictionRuleUpdate {
jurisdiction: "CN".to_string(),
new_version: "2.0.0".to_string(),
ca_signature: vec![1u8; 64], // 有效CA签名
},
vec![],
"node_cn_001",
);
let decision = router.route(&envelope);
assert!(matches!(decision, RoutingDecision::Broadcast { .. }));
}
#[test]
fn test_unknown_jurisdiction_rejected() {
let router = make_router();
let envelope = NacLensEnvelope::new(
"msg_005",
NacLensMessageType::IntraJurisdiction {
jurisdiction: "UNKNOWN".to_string(),
},
vec![],
"node_cn_001",
);
let decision = router.route(&envelope);
assert!(matches!(decision, RoutingDecision::Rejected { .. }));
}
#[test]
fn test_routing_stats() {
let router = make_router();
let stats = router.routing_stats();
assert_eq!(stats.registered_jurisdictions, 2);
assert_eq!(stats.total_nodes, 3);
assert_eq!(stats.local_jurisdiction, "CN");
}
#[test]
fn test_node_registration_without_gids_rejected() {
let router = make_router();
let envelope = NacLensEnvelope::new(
"msg_006",
NacLensMessageType::NodeRegistration {
jurisdiction: "CN".to_string(),
node_id: "node_new".to_string(),
gids_proof: vec![], // 无GIDS证明
},
vec![],
"node_new",
);
let decision = router.route(&envelope);
assert!(matches!(decision, RoutingDecision::Rejected { .. }));
}
#[test]
fn test_update_jurisdiction_version() {
let mut router = make_router();
let updated = router.update_jurisdiction_version("CN", "2.0.0");
assert!(updated);
let stats = router.routing_stats();
assert_eq!(stats.registered_jurisdictions, 2);
}
}

View File

@ -1,3 +1,4 @@
{"$message_type":"diagnostic","message":"field `alert_threshold` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/resource_sharing.rs","byte_start":4353,"byte_end":4368,"line_start":132,"line_end":132,"column_start":12,"column_end":27,"is_primary":false,"text":[{"text":"pub struct ResourceMonitor {","highlight_start":12,"highlight_end":27}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/resource_sharing.rs","byte_start":4399,"byte_end":4414,"line_start":134,"line_end":134,"column_start":5,"column_end":20,"is_primary":true,"text":[{"text":" alert_threshold: u64, // 超过配额多少时告警,定点数 1e4","highlight_start":5,"highlight_end":20}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: field `alert_threshold` is never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/resource_sharing.rs:134:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m132\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct ResourceMonitor {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m---------------\u001b[0m \u001b[1m\u001b[94mfield in this struct\u001b[0m\n\u001b[1m\u001b[94m133\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pool: ResourcePool,\n\u001b[1m\u001b[94m134\u001b[0m \u001b[1m\u001b[94m|\u001b[0m alert_threshold: u64, // 超过配额多少时告警,定点数 1e4\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n\n"} {"$message_type":"diagnostic","message":"field `alert_threshold` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/resource_sharing.rs","byte_start":4353,"byte_end":4368,"line_start":132,"line_end":132,"column_start":12,"column_end":27,"is_primary":false,"text":[{"text":"pub struct ResourceMonitor {","highlight_start":12,"highlight_end":27}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/resource_sharing.rs","byte_start":4399,"byte_end":4414,"line_start":134,"line_end":134,"column_start":5,"column_end":20,"is_primary":true,"text":[{"text":" alert_threshold: u64, // 超过配额多少时告警,定点数 1e4","highlight_start":5,"highlight_end":20}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: field `alert_threshold` is never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/resource_sharing.rs:134:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m132\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct ResourceMonitor {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m---------------\u001b[0m \u001b[1m\u001b[94mfield in this struct\u001b[0m\n\u001b[1m\u001b[94m133\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pool: ResourcePool,\n\u001b[1m\u001b[94m134\u001b[0m \u001b[1m\u001b[94m|\u001b[0m alert_threshold: u64, // 超过配额多少时告警,定点数 1e4\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n\n"}
{"$message_type":"diagnostic","message":"field `loader` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/plugin.rs","byte_start":1789,"byte_end":1803,"line_start":67,"line_end":67,"column_start":12,"column_end":26,"is_primary":false,"text":[{"text":"pub struct PluginRegistry {","highlight_start":12,"highlight_end":26}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/plugin.rs","byte_start":1810,"byte_end":1816,"line_start":68,"line_end":68,"column_start":5,"column_end":11,"is_primary":true,"text":[{"text":" loader: PluginLoader,","highlight_start":5,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: field `loader` is never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/plugin.rs:68:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m67\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct PluginRegistry {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m--------------\u001b[0m \u001b[1m\u001b[94mfield in this struct\u001b[0m\n\u001b[1m\u001b[94m68\u001b[0m \u001b[1m\u001b[94m|\u001b[0m loader: PluginLoader,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^\u001b[0m\n\n"} {"$message_type":"diagnostic","message":"field `loader` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/plugin.rs","byte_start":1789,"byte_end":1803,"line_start":67,"line_end":67,"column_start":12,"column_end":26,"is_primary":false,"text":[{"text":"pub struct PluginRegistry {","highlight_start":12,"highlight_end":26}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/plugin.rs","byte_start":1810,"byte_end":1816,"line_start":68,"line_end":68,"column_start":5,"column_end":11,"is_primary":true,"text":[{"text":" loader: PluginLoader,","highlight_start":5,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: field `loader` is never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/plugin.rs:68:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m67\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct PluginRegistry {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m--------------\u001b[0m \u001b[1m\u001b[94mfield in this struct\u001b[0m\n\u001b[1m\u001b[94m68\u001b[0m \u001b[1m\u001b[94m|\u001b[0m loader: PluginLoader,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"} {"$message_type":"diagnostic","message":"field `pending_cross_txs` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/node_sharing_enhanced.rs","byte_start":12861,"byte_end":12894,"line_start":378,"line_end":378,"column_start":12,"column_end":45,"is_primary":false,"text":[{"text":"pub struct CrossJurisdictionBlockCoordinator {","highlight_start":12,"highlight_end":45}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/node_sharing_enhanced.rs","byte_start":12937,"byte_end":12954,"line_start":380,"line_end":380,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":" pending_cross_txs: Vec<PendingCrossJurisdictionTx>,","highlight_start":5,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: field `pending_cross_txs` is never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/node_sharing_enhanced.rs:380:5\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m378\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct CrossJurisdictionBlockCoordinator {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m---------------------------------\u001b[0m \u001b[1m\u001b[94mfield in this struct\u001b[0m\n\u001b[1m\u001b[94m379\u001b[0m \u001b[1m\u001b[94m|\u001b[0m /// 待处理的跨辖区交易\n\u001b[1m\u001b[94m380\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pending_cross_txs: Vec<PendingCrossJurisdictionTx>,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"3 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: 3 warnings emitted\u001b[0m\n\n"}

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/anyhow-1a588860b974a585/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/anyhow-1a588860b974a585/out

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/generic-array-01bbe54c11d445df/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/generic-array-01bbe54c11d445df/out

View File

@ -1,5 +1,5 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/generic-array-f8314dea6bb2335e/build_script_build-f8314dea6bb2335e.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/generic-array-f8314dea6bb2335e/build_script_build-f8314dea6bb2335e.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/generic-array-f8314dea6bb2335e/build_script_build-f8314dea6bb2335e: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/generic-array-f8314dea6bb2335e/build_script_build-f8314dea6bb2335e: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/build.rs:

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/libc-0223df3d9f2ad361/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/libc-0223df3d9f2ad361/out

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/num-traits-4d4efe8d0af30f57/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/num-traits-4d4efe8d0af30f57/out

View File

@ -1,5 +1,5 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/num-traits-98921c823c91aed5/build_script_build-98921c823c91aed5.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/num-traits-98921c823c91aed5/build_script_build-98921c823c91aed5.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/num-traits-98921c823c91aed5/build_script_build-98921c823c91aed5: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/num-traits-98921c823c91aed5/build_script_build-98921c823c91aed5: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/build.rs:

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/parking_lot_core-1de25b09392001a5/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/parking_lot_core-1de25b09392001a5/out

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/proc-macro2-035337776c278475/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/proc-macro2-035337776c278475/out

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/quote-48fa4147ea080b77/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/quote-48fa4147ea080b77/out

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/serde-252a9bbeccb60cd9/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/serde-252a9bbeccb60cd9/out

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/serde_json-2c8ea650b6f8d83b/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/serde_json-2c8ea650b6f8d83b/out

View File

@ -1 +1 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/zmij-193018c25ea517ee/out /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/build/zmij-193018c25ea517ee/out

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/anyhow-727625e04efe81e0.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/backtrace.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/chain.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/context.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ensure.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/fmt.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/kind.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ptr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/wrapper.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/anyhow-727625e04efe81e0.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/backtrace.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/chain.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/context.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ensure.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/fmt.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/kind.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ptr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/wrapper.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libanyhow-727625e04efe81e0.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/backtrace.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/chain.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/context.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ensure.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/fmt.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/kind.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ptr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/wrapper.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libanyhow-727625e04efe81e0.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/backtrace.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/chain.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/context.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ensure.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/fmt.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/kind.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/ptr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/wrapper.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/backtrace.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.102/src/backtrace.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/block_buffer-e56fd2da8d4bd510.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/sealed.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/block_buffer-e56fd2da8d4bd510.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/sealed.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libblock_buffer-e56fd2da8d4bd510.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/sealed.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libblock_buffer-e56fd2da8d4bd510.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/sealed.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/sealed.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.10.4/src/sealed.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/chrono-37057a699a1b288e.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/time_delta.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/date.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/formatting.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parsed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/scan.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/strftime.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/locales.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/date/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/internals.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/isoweek.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/fixed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/unix.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/timezone.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/parser.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/rule.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/utc.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/round.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday_set.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/month.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/traits.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/chrono-37057a699a1b288e.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/time_delta.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/date.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/formatting.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parsed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/scan.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/strftime.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/locales.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/date/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/internals.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/isoweek.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/fixed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/unix.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/timezone.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/parser.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/rule.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/utc.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/round.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday_set.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/month.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/traits.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libchrono-37057a699a1b288e.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/time_delta.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/date.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/formatting.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parsed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/scan.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/strftime.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/locales.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/date/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/internals.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/isoweek.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/fixed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/unix.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/timezone.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/parser.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/rule.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/utc.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/round.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday_set.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/month.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/traits.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libchrono-37057a699a1b288e.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/time_delta.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/date.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/formatting.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parsed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/scan.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/strftime.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/format/locales.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/date/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/datetime/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/internals.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/isoweek.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/naive/time/serde.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/fixed.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/unix.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/timezone.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/parser.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/local/tz_info/rule.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/offset/utc.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/round.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/weekday_set.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/month.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/traits.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/time_delta.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/chrono-0.4.44/src/time_delta.rs:

View File

@ -1,5 +1,5 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/crypto_common-9e7096b6b51d0de7.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-common-0.1.7/src/lib.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/crypto_common-9e7096b6b51d0de7.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-common-0.1.7/src/lib.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libcrypto_common-9e7096b6b51d0de7.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-common-0.1.7/src/lib.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libcrypto_common-9e7096b6b51d0de7.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-common-0.1.7/src/lib.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-common-0.1.7/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/crypto-common-0.1.7/src/lib.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/digest-89f9ec62bb4f2bd2.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/ct_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/rt_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/wrapper.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/xof_reader.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/digest.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/digest-89f9ec62bb4f2bd2.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/ct_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/rt_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/wrapper.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/xof_reader.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/digest.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libdigest-89f9ec62bb4f2bd2.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/ct_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/rt_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/wrapper.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/xof_reader.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/digest.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libdigest-89f9ec62bb4f2bd2.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/ct_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/rt_variable.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/wrapper.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api/xof_reader.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/digest.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.10.7/src/core_api.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/errno-3d53664cf0be054b.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/unix.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/errno-3d53664cf0be054b.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/unix.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/liberrno-3d53664cf0be054b.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/unix.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/liberrno-3d53664cf0be054b.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/unix.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/unix.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/errno-0.3.14/src/unix.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/generic_array-ca63266564d72c57.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/hex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/impls.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/arr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/functional.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/iter.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/sequence.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/generic_array-ca63266564d72c57.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/hex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/impls.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/arr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/functional.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/iter.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/sequence.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libgeneric_array-ca63266564d72c57.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/hex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/impls.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/arr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/functional.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/iter.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/sequence.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libgeneric_array-ca63266564d72c57.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/hex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/impls.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/arr.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/functional.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/iter.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/sequence.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/hex.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/generic-array-0.14.7/src/hex.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libc-615dd1ae383c1f11.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/bcm.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/j1939.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/raw.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/keyctl.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/membarrier.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/netlink.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/net/route.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/primitives.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux_l4re_shared.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/generic/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/types.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libc-615dd1ae383c1f11.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/bcm.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/j1939.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/raw.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/keyctl.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/membarrier.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/netlink.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/net/route.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/primitives.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux_l4re_shared.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/generic/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/types.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/liblibc-615dd1ae383c1f11.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/bcm.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/j1939.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/raw.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/keyctl.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/membarrier.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/netlink.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/net/route.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/primitives.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux_l4re_shared.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/generic/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/types.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/liblibc-615dd1ae383c1f11.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/linux_like/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/common/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/bcm.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/error.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/j1939.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/can/raw.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/keyctl.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/membarrier.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/linux_uapi/linux/netlink.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/posix/unistd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/nptl/pthread.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/new/glibc/sysdeps/unix/linux/net/route.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/primitives.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux_l4re_shared.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/unix/linux_like/linux/arch/generic/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/types.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/macros.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.182/src/macros.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/lock_api-f911d1bae82dd445.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/rwlock.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/lock_api-f911d1bae82dd445.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/rwlock.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/liblock_api-f911d1bae82dd445.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/rwlock.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/liblock_api-f911d1bae82dd445.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/rwlock.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/mutex.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.14/src/mutex.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/mio-2e3325d89b8ed339.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/interest.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/poll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/token.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/waker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/event.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/events.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/epoll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/waker/eventfd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/sourcefd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/pipe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/stateless_io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/net.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/tcp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/stream.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/mio-2e3325d89b8ed339.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/interest.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/poll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/token.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/waker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/event.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/events.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/epoll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/waker/eventfd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/sourcefd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/pipe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/stateless_io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/net.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/tcp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/stream.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libmio-2e3325d89b8ed339.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/interest.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/poll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/token.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/waker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/event.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/events.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/epoll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/waker/eventfd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/sourcefd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/pipe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/stateless_io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/net.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/tcp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/stream.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libmio-2e3325d89b8ed339.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/interest.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/poll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/token.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/waker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/event.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/events.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/event/source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/epoll.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/waker/eventfd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/sourcefd.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/pipe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/selector/stateless_io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/net.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/tcp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/sys/unix/uds/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/io_source.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/tcp/stream.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/udp.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/datagram.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/listener.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/net/uds/stream.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/macros.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mio-1.1.1/src/macros.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/nac_multi_jurisdiction-45c9e26cd8054e03.d: src/lib.rs src/jurisdiction.rs src/isolation.rs src/cross_jurisdiction.rs src/resource_sharing.rs src/plugin.rs src/dual_receipt.rs src/discovery.rs src/governance.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/nac_multi_jurisdiction-45c9e26cd8054e03.d: src/lib.rs src/jurisdiction.rs src/isolation.rs src/cross_jurisdiction.rs src/resource_sharing.rs src/plugin.rs src/dual_receipt.rs src/discovery.rs src/governance.rs src/node_sharing_enhanced.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libnac_multi_jurisdiction-45c9e26cd8054e03.rmeta: src/lib.rs src/jurisdiction.rs src/isolation.rs src/cross_jurisdiction.rs src/resource_sharing.rs src/plugin.rs src/dual_receipt.rs src/discovery.rs src/governance.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libnac_multi_jurisdiction-45c9e26cd8054e03.rmeta: src/lib.rs src/jurisdiction.rs src/isolation.rs src/cross_jurisdiction.rs src/resource_sharing.rs src/plugin.rs src/dual_receipt.rs src/discovery.rs src/governance.rs src/node_sharing_enhanced.rs
src/lib.rs: src/lib.rs:
src/jurisdiction.rs: src/jurisdiction.rs:
@ -11,3 +11,4 @@ src/plugin.rs:
src/dual_receipt.rs: src/dual_receipt.rs:
src/discovery.rs: src/discovery.rs:
src/governance.rs: src/governance.rs:
src/node_sharing_enhanced.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/num_traits-8dc318dbb424569b.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/num_traits-8dc318dbb424569b.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libnum_traits-8dc318dbb424569b.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libnum_traits-8dc318dbb424569b.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/bounds.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/cast.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/float.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/identities.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/int.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/bytes.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/checked.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/euclid.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/inv.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/mul_add.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/overflowing.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/saturating.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/ops/wrapping.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/pow.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/real.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/sign.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/num-traits-0.2.19/src/macros.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/parking_lot-be522b7e042862d7.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/condvar.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/elision.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/once.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/deadlock.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/parking_lot-be522b7e042862d7.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/condvar.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/elision.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/once.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/deadlock.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libparking_lot-be522b7e042862d7.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/condvar.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/elision.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/once.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/deadlock.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libparking_lot-be522b7e042862d7.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/condvar.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/elision.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/once.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_fair_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_mutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/raw_rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/remutex.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/rwlock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/deadlock.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/condvar.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot-0.12.5/src/condvar.rs:

View File

@ -1,6 +1,6 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/parking_lot_core-8df1bc202525f0bb.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/parking_lot.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/spinwait.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/word_lock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/linux.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/parking_lot_core-8df1bc202525f0bb.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/parking_lot.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/spinwait.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/word_lock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/linux.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libparking_lot_core-8df1bc202525f0bb.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/parking_lot.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/spinwait.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/word_lock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/linux.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libparking_lot_core-8df1bc202525f0bb.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/parking_lot.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/spinwait.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/mod.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/util.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/word_lock.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/thread_parker/linux.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/parking_lot.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/parking_lot.rs:

View File

@ -1,8 +1,8 @@
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/proc_macro2-85a7fda171dab2c5.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_file.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_location.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/proc_macro2-85a7fda171dab2c5.d: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_file.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_location.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libproc_macro2-85a7fda171dab2c5.rlib: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_file.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_location.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libproc_macro2-85a7fda171dab2c5.rlib: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_file.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_location.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs
/root/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libproc_macro2-85a7fda171dab2c5.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_file.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_location.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs /data/blockchain/NAC_Blockchain/nac-multi-jurisdiction/target/debug/deps/libproc_macro2-85a7fda171dab2c5.rmeta: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/parse.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_file.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/probe/proc_macro_span_location.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/rcvec.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/detection.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/fallback.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/extra.rs /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/wrapper.rs
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/lib.rs:
/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs: /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/proc-macro2-1.0.106/src/marker.rs:

Some files were not shown because too many files have changed in this diff Show More