Issue #78: 将协议层模块迁移到 protocol/ 目录 - nac-udm, nac-cbpp, nac-cbpp-l0/l1, nac-csnp, nac-csnp-l0/l1/service - nac-nvm, nac-nvm-service, nac-constitution-*, nac-lens - 修复 nac-csnp-l0 缺少 sha3 依赖 - 修复 nac-constitution-clauses review_committee 字段名 - 所有 15 个 Rust 协议模块编译通过 Issue #79: 将 RWA 模块迁移到 rwa/ 目录 - nac-rwa-legal-model, nac-rwa-jurisdiction-adapters, nac-rwa-contract-templates - nac-rwa-bilateral-rules, nac-rwa-sharia-compliance, nac-jurisdiction-rules/compat/version - nac-lens-jurisdiction-router, nac-rwa-exchange, nac-asset-onboarding, nac-multi-jurisdiction - 更新所有 Cargo.toml 路径引用 - nac-onboarding-system 归档(历史遗留编译问题) - nac-api-server 路径更新并重新部署 目录结构: protocol/ rwa/ services/ ops/ sdk/ _archive/
This commit is contained in:
parent
a489b88f78
commit
74d88fc80f
File diff suppressed because it is too large
Load Diff
|
|
@ -49,7 +49,7 @@ bcrypt = "0.15"
|
||||||
actix-web-actors = "4.2"
|
actix-web-actors = "4.2"
|
||||||
|
|
||||||
# NAC SDK(调用适配器)
|
# NAC SDK(调用适配器)
|
||||||
nac-sdk = { path = "../nac-sdk" }
|
nac-sdk = { path = "../../sdk/nac-sdk" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
actix-rt = "2.9"
|
actix-rt = "2.9"
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
// NAC资产一键上链系统 - 主程序
|
// NAC资产一键上链系统 - 主程序
|
||||||
|
|
||||||
use actix_web::{web, App, HttpServer, middleware::Logger};
|
use actix_web::{web, App, HttpServer, middleware::Logger};
|
||||||
|
|
@ -11,7 +11,7 @@ nac-upgrade-framework = { path = "../nac-upgrade-framework" }
|
||||||
# NAC核心依赖(暂时注释,待模块实现后启用)
|
# NAC核心依赖(暂时注释,待模块实现后启用)
|
||||||
# nac-types = { path = "../nac-types" }
|
# nac-types = { path = "../nac-types" }
|
||||||
# nac-crypto = { path = "../nac-crypto" }
|
# nac-crypto = { path = "../nac-crypto" }
|
||||||
# nac-constitution = { path = "../nac-constitution" }
|
# nac-constitution = { path = "../protocol/nac-constitution" }
|
||||||
|
|
||||||
# 异步运行时
|
# 异步运行时
|
||||||
tokio = { version = "1.35", features = ["full"] }
|
tokio = { version = "1.35", features = ["full"] }
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@ authors = ["NAC Development Team"]
|
||||||
description = "NAC CBPP (Constitutional Block Production Protocol) L0 Layer Implementation"
|
description = "NAC CBPP (Constitutional Block Production Protocol) L0 Layer Implementation"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nac-upgrade-framework = { path = "../nac-upgrade-framework" }
|
nac-upgrade-framework = { path = "../../nac-upgrade-framework" }
|
||||||
# NAC core dependencies
|
# NAC core dependencies
|
||||||
nac-udm = { path = "../nac-udm" }
|
nac-udm = { path = "../nac-udm" }
|
||||||
nac-serde = { path = "../nac-serde" }
|
nac-serde = { path = "../../sdk/nac-serde" }
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
quinn = "0.10"
|
quinn = "0.10"
|
||||||
|
|
@ -7,7 +7,7 @@ edition = "2021"
|
||||||
warnings = "allow"
|
warnings = "allow"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nac-upgrade-framework = { path = "../nac-upgrade-framework" }
|
nac-upgrade-framework = { path = "../../nac-upgrade-framework" }
|
||||||
nac-udm = { path = "../nac-udm" }
|
nac-udm = { path = "../nac-udm" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
@ -6,7 +6,7 @@ authors = ["NAC公链开发小组"]
|
||||||
description = "宪政区块生产协议(CBPP)- NAC共识机制"
|
description = "宪政区块生产协议(CBPP)- NAC共识机制"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nac-upgrade-framework = { path = "../nac-upgrade-framework" }
|
nac-upgrade-framework = { path = "../../nac-upgrade-framework" }
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
@ -7,7 +7,7 @@ edition = "2021"
|
||||||
warnings = "allow"
|
warnings = "allow"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nac-upgrade-framework = { path = "../nac-upgrade-framework" }
|
nac-upgrade-framework = { path = "../../nac-upgrade-framework" }
|
||||||
nac-udm = { path = "../nac-udm" }
|
nac-udm = { path = "../nac-udm" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
@ -265,7 +265,7 @@ impl UpgradeManager {
|
||||||
constitutionality_analysis: String,
|
constitutionality_analysis: String,
|
||||||
) -> Result<(), String> {
|
) -> Result<(), String> {
|
||||||
// 检查审查者权限
|
// 检查审查者权限
|
||||||
if !self.review_committee.contains(&reviewer) {
|
if !self.authorized_jurisdiction_cas.contains(&reviewer) {
|
||||||
return Err(format!("{} 不是审查委员会成员", reviewer));
|
return Err(format!("{} 不是审查委员会成员", reviewer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -285,7 +285,7 @@ impl UpgradeManager {
|
||||||
|
|
||||||
// 检查是否所有审查委员都已审查
|
// 检查是否所有审查委员都已审查
|
||||||
let reviewed_count = proposal.review_results.len();
|
let reviewed_count = proposal.review_results.len();
|
||||||
if reviewed_count >= self.review_committee.len() {
|
if reviewed_count >= self.authorized_jurisdiction_cas.len() {
|
||||||
// 计算通过率
|
// 计算通过率
|
||||||
let approved_count = proposal.review_results
|
let approved_count = proposal.review_results
|
||||||
.iter()
|
.iter()
|
||||||
|
|
@ -293,7 +293,7 @@ impl UpgradeManager {
|
||||||
.count();
|
.count();
|
||||||
|
|
||||||
// 需要超过2/3通过
|
// 需要超过2/3通过
|
||||||
let threshold = (self.review_committee.len() * 2 + 2) / 3;
|
let threshold = (self.authorized_jurisdiction_cas.len() * 2 + 2) / 3;
|
||||||
let final_approved = approved_count >= threshold;
|
let final_approved = approved_count >= threshold;
|
||||||
|
|
||||||
proposal.complete_review(final_approved)?;
|
proposal.complete_review(final_approved)?;
|
||||||
|
|
@ -11,12 +11,27 @@ 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 = "autocfg"
|
name = "autocfg"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "block-buffer"
|
||||||
|
version = "0.10.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||||
|
dependencies = [
|
||||||
|
"generic-array",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bumpalo"
|
name = "bumpalo"
|
||||||
version = "3.20.1"
|
version = "3.20.1"
|
||||||
|
|
@ -59,12 +74,57 @@ version = "0.8.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cpufeatures"
|
||||||
|
version = "0.2.17"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crypto-common"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
|
||||||
|
dependencies = [
|
||||||
|
"generic-array",
|
||||||
|
"typenum",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "digest"
|
||||||
|
version = "0.10.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||||
|
dependencies = [
|
||||||
|
"block-buffer",
|
||||||
|
"crypto-common",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "find-msvc-tools"
|
name = "find-msvc-tools"
|
||||||
version = "0.1.9"
|
version = "0.1.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "generic-array"
|
||||||
|
version = "0.14.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
||||||
|
dependencies = [
|
||||||
|
"typenum",
|
||||||
|
"version_check",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hex"
|
||||||
|
version = "0.4.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iana-time-zone"
|
name = "iana-time-zone"
|
||||||
version = "0.1.65"
|
version = "0.1.65"
|
||||||
|
|
@ -105,6 +165,15 @@ dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "keccak"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653"
|
||||||
|
dependencies = [
|
||||||
|
"cpufeatures",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.182"
|
version = "0.2.182"
|
||||||
|
|
@ -128,6 +197,7 @@ name = "nac-constitution-macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
|
"nac-upgrade-framework",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -135,6 +205,20 @@ dependencies = [
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nac-upgrade-framework"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"chrono",
|
||||||
|
"hex",
|
||||||
|
"log",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sha3",
|
||||||
|
"thiserror",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-traits"
|
name = "num-traits"
|
||||||
version = "0.2.19"
|
version = "0.2.19"
|
||||||
|
|
@ -217,6 +301,16 @@ dependencies = [
|
||||||
"zmij",
|
"zmij",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sha3"
|
||||||
|
version = "0.10.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60"
|
||||||
|
dependencies = [
|
||||||
|
"digest",
|
||||||
|
"keccak",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "shlex"
|
name = "shlex"
|
||||||
version = "1.3.0"
|
version = "1.3.0"
|
||||||
|
|
@ -234,12 +328,44 @@ 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]]
|
||||||
|
name = "typenum"
|
||||||
|
version = "1.19.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.23"
|
version = "1.0.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
|
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "version_check"
|
||||||
|
version = "0.9.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen"
|
name = "wasm-bindgen"
|
||||||
version = "0.2.108"
|
version = "0.2.108"
|
||||||
|
|
@ -10,7 +10,7 @@ license = "MIT"
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nac-upgrade-framework = { path = "../nac-upgrade-framework" }
|
nac-upgrade-framework = { path = "../../nac-upgrade-framework" }
|
||||||
syn = { version = "2.0", features = ["full"] }
|
syn = { version = "2.0", features = ["full"] }
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue