1pub const PROTOCOL_VERSION: &str = "1.0.0";
6
7pub const BANDWIDTH_PROOF_PROTOCOL: &str = "/chie/bandwidth-proof/1.0.0";
9
10pub const CONTENT_ANNOUNCEMENT_PROTOCOL: &str = "/chie/content-announce/1.0.0";
12
13pub const DHT_QUERY_TIMEOUT_MS: u64 = 30_000;
16
17pub const MAX_DHT_PEERS: usize = 20;
19
20pub const REPUTATION_DECAY_RATE: f32 = 0.01;
22
23pub const MIN_REPUTATION: f32 = 0.0;
25
26pub const MAX_REPUTATION: f32 = 100.0;
28
29pub const DEFAULT_REPUTATION: f32 = 50.0;
31
32pub const BASE_POINTS_PER_GB: f64 = 10.0;
35
36pub const MAX_DEMAND_MULTIPLIER: f64 = 3.0;
38
39pub const MIN_DEMAND_MULTIPLIER: f64 = 0.5;
41
42pub const LATENCY_PENALTY_THRESHOLD_MS: u32 = 500;
44
45pub const LATENCY_PENALTY_MULTIPLIER: f64 = 0.5;
47
48pub const PLATFORM_FEE_PERCENTAGE: f64 = 0.10;
50
51pub const CREATOR_SHARE_PERCENTAGE: f64 = 0.20;
53
54pub const MIN_FREE_DISK_SPACE: u64 = 1024 * 1024 * 1024;
57
58pub const DEFAULT_STORAGE_ALLOCATION: u64 = 10 * 1024 * 1024 * 1024;
60
61pub const DEFAULT_BANDWIDTH_LIMIT_BPS: u64 = 100 * 1_000_000;
63
64pub const MAX_CONCURRENT_TRANSFERS: usize = 10;
66
67pub const CHUNK_REQUEST_TIMEOUT_MS: u64 = 10_000;
69
70pub const MAX_PROOFS_PER_PEER_PER_HOUR: u32 = 1000;
73
74pub const MAX_FAILED_REQUESTS: u32 = 10;
76
77pub const TEMP_BAN_DURATION_SECS: u64 = 3600;
79
80pub const PERMANENT_BAN_THRESHOLD: u32 = 3;
82
83pub const ANOMALY_Z_SCORE_THRESHOLD: f64 = 3.0;
86
87pub const MIN_SAMPLES_FOR_STATS: usize = 30;
89
90pub const MAX_BANDWIDTH_DEVIATION_PERCENT: f64 = 200.0;
92
93pub const NONCE_CACHE_TTL_SECS: u64 = 600;
96
97pub const MAX_NONCE_CACHE_SIZE: usize = 100_000;
99
100pub const DB_POOL_SIZE: u32 = 10;
102
103pub const DB_QUERY_TIMEOUT_SECS: u64 = 30;
105
106pub const MAX_PREVIEW_IMAGES: usize = 10;
109
110pub const MAX_PREVIEW_IMAGE_SIZE: usize = 5 * 1024 * 1024;
112
113pub const MIN_CONTENT_PRICE: u64 = 1;
115
116pub const MAX_CONTENT_PRICE: u64 = 1_000_000;
118
119pub const MIN_USERNAME_LENGTH: usize = 3;
122
123pub const MAX_USERNAME_LENGTH: usize = 20;
125
126pub const MIN_PASSWORD_LENGTH: usize = 8;
128
129pub const MAX_PASSWORD_LENGTH: usize = 128;
131
132pub const MAX_EMAIL_LENGTH: usize = 254;
134
135pub const MAX_API_KEYS_PER_USER: usize = 5;
137
138pub const DEFAULT_PAGE_SIZE: u64 = 20;
141
142pub const MAX_PAGE_SIZE: u64 = 100;
144
145pub const MAX_PROOF_SUBMISSION_RETRIES: u32 = 3;
148
149pub const BASE_BACKOFF_DELAY_MS: u64 = 1000;
151
152pub const MAX_BACKOFF_DELAY_MS: u64 = 60_000;
154
155pub const GOSSIPSUB_CONTENT_ANNOUNCE_TOPIC: &str = "chie/content/announce";
158
159pub const GOSSIPSUB_PEER_DISCOVERY_TOPIC: &str = "chie/peer/discovery";
161
162pub const GOSSIPSUB_DEMAND_UPDATE_TOPIC: &str = "chie/demand/update";
164
165pub const METRICS_COLLECTION_INTERVAL_SECS: u64 = 60;
168
169pub const METRICS_RETENTION_DAYS: u32 = 7;
171
172pub const HEALTH_CHECK_INTERVAL_SECS: u64 = 30;
174
175pub const MIN_CONTENT_AGE_FOR_GC_SECS: u64 = 30 * 24 * 3600;
178
179pub const MIN_SEEDER_COUNT: u32 = 3;
181
182pub const PROFITABILITY_CHECK_INTERVAL_SECS: u64 = 24 * 3600;
184
185pub const MAX_PARALLEL_ENCRYPTION_JOBS: usize = 4;
188
189pub const JOB_RETRY_ATTEMPTS: u32 = 3;
191
192pub const JOB_TIMEOUT_SECS: u64 = 600;