-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathCargo.toml
More file actions
196 lines (162 loc) · 5.14 KB
/
Cargo.toml
File metadata and controls
196 lines (162 loc) · 5.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
[package]
name = "ant-node"
version = "0.7.0"
edition = "2021"
authors = ["David Irvine <david.irvine@maidsafe.net>"]
description = "Pure quantum-proof network node for the Autonomi decentralized network"
license = "MIT OR Apache-2.0"
repository = "https://github.com/WithAutonomi/ant-node"
keywords = ["p2p", "decentralized", "quantum-safe", "post-quantum", "dht"]
categories = ["network-programming", "cryptography"]
rust-version = "1.75"
[lib]
name = "ant_node"
path = "src/lib.rs"
[[bin]]
name = "ant-node"
path = "src/bin/ant-node/main.rs"
[[bin]]
name = "ant-keygen"
path = "src/bin/keygen.rs"
[[bin]]
name = "ant-devnet"
path = "src/bin/ant-devnet/main.rs"
[dependencies]
# Core (provides EVERYTHING: networking, DHT, security, trust, storage)
saorsa-core = "0.18.1"
saorsa-pqc = "0.5"
# Payment verification - autonomi network lookup + EVM payment
ant-evm = "0.1.19"
evmlib = "0.4.9"
xor_name = "5"
libp2p = "0.56" # For PeerId in payment proofs
multihash = "0.19" # For identity multihash in PeerId construction
# Caching - LRU cache for verified XorNames
lru = "0.16.3"
parking_lot = "0.12" # Efficient mutex for cache
# Storage - LMDB via heed for content-addressed chunk store
heed = "0.22"
# Migration: Decrypt ant-node data (read-only)
aes-gcm-siv = "0.11"
hkdf = "0.12"
self_encryption = "0.35.0"
blake3 = "1"
# Async runtime
tokio = { version = "1.35", features = ["full", "signal"] }
tokio-util = { version = "0.7", features = ["rt"] }
futures = "0.3"
# CLI
clap = { version = "4.5", features = ["derive", "env"] }
# Configuration
serde = { version = "1", features = ["derive"] }
toml = "0.8"
directories = "5"
# Auto-upgrade
reqwest = { version = "0.13", features = ["json", "rustls"], default-features = false }
semver = "1"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-appender = "0.2"
# Error handling
thiserror = "2"
color-eyre = "0.6"
# Serialization
rmp-serde = "1"
hex = "0.4"
# Utilities
bytes = "1"
chrono = { version = "0.4", features = ["serde"] }
tempfile = "3"
rand = "0.8"
serde_json = "1"
# Archive extraction for auto-upgrade
flate2 = "1"
tar = "0.4"
zip = "2"
# SHA-256 hashing for binary cache integrity
sha2 = "0.10"
# Cross-platform file locking for upgrade caches
fs2 = "0.4"
# Protocol serialization
postcard = { version = "1.1.3", features = ["use-std"] }
[target.'cfg(windows)'.dependencies]
self-replace = "1"
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6"
objc2-foundation = { version = "0.3", features = ["NSProcessInfo", "NSString"] }
[dev-dependencies]
tokio-test = "0.4"
proptest = "1"
alloy = { version = "1", features = ["node-bindings"] }
serial_test = "3"
# E2E test infrastructure (run with --features test-utils)
[[test]]
name = "e2e"
path = "tests/e2e/mod.rs"
required-features = ["test-utils"]
[features]
default = []
# Enable additional diagnostics for development
dev = []
# Expose test helpers (cache_insert, payment_verifier accessor) for
# integration tests and downstream test harnesses.
test-utils = []
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true
[profile.dev]
# Faster builds for development
opt-level = 1
[lints.rust]
unsafe_code = "deny"
missing_docs = "warn"
[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
# Allow async functions that will have await statements added later
unused_async = "allow"
# Allow slightly complex functions during initial development
cognitive_complexity = "allow"
# Allow non-const functions during initial development (may need runtime features later)
missing_const_for_fn = "allow"
# Debian package metadata (cargo-deb)
[package.metadata.deb]
maintainer = "David Irvine <david.irvine@maidsafe.net>"
copyright = "2024-2025 Autonomi"
license-file = ["LICENSE-MIT", "0"]
extended-description = """
Ant Node is a pure quantum-proof network node for the Autonomi decentralized network.
It provides secure, private, and censorship-resistant data storage using post-quantum
cryptography (ML-DSA-65, ML-KEM-768). Features include:
- Quantum-resistant authentication and encryption
- Distributed Hash Table (DHT) with anti-Sybil protection
- Automatic upgrades with staged rollout
- Bootstrap node support for testnet deployment
"""
section = "net"
priority = "optional"
assets = [
["target/release/ant-node", "usr/bin/", "755"],
["target/release/ant-keygen", "usr/bin/", "755"],
["README.md", "usr/share/doc/ant-node/", "644"],
]
conf-files = ["/etc/ant/config.toml"]
depends = "$auto"
systemd-units = { enable = true }
# RPM package metadata (cargo-generate-rpm)
[package.metadata.generate-rpm]
assets = [
{ source = "target/release/ant-node", dest = "/usr/bin/ant-node", mode = "755" },
{ source = "target/release/ant-keygen", dest = "/usr/bin/ant-keygen", mode = "755" },
{ source = "README.md", dest = "/usr/share/doc/ant-node/README.md", mode = "644" },
{ source = "systemd/ant-node.service", dest = "/usr/lib/systemd/system/ant-node.service", mode = "644" },
]
[package.metadata.generate-rpm.requires]
# Runtime dependencies auto-detected