Skip to main content

zync_core/
endpoints.rs

1//! Public lightwalletd endpoints for cross-verification.
2//!
3//! Geographically diverse nodes from independent operators.
4//! Cross-verification requires >2/3 agreement (BFT majority) to detect
5//! single-server eclipse attacks. Using nodes from different providers
6//! and regions makes coordinated lying harder.
7
8// zec.rocks (operated by Zcash community)
9pub const LIGHTWALLETD_ZEC_ROCKS: &str = "https://zec.rocks";
10pub const LIGHTWALLETD_ZEC_ROCKS_NA: &str = "https://na.zec.rocks";
11pub const LIGHTWALLETD_ZEC_ROCKS_EU: &str = "https://eu.zec.rocks";
12pub const LIGHTWALLETD_ZEC_ROCKS_AP: &str = "https://ap.zec.rocks";
13pub const LIGHTWALLETD_ZEC_ROCKS_SA: &str = "https://sa.zec.rocks";
14
15// stardust (operated by Chainsafe)
16pub const LIGHTWALLETD_STARDUST_US: &str = "https://us.zec.stardust.rest";
17pub const LIGHTWALLETD_STARDUST_EU: &str = "https://eu.zec.stardust.rest";
18pub const LIGHTWALLETD_STARDUST_EU2: &str = "https://eu2.zec.stardust.rest";
19pub const LIGHTWALLETD_STARDUST_JP: &str = "https://jp.zec.stardust.rest";
20
21// testnet
22pub const LIGHTWALLETD_TESTNET: &str = "https://testnet.zec.rocks";
23
24/// Default cross-verification endpoints for mainnet.
25///
26/// One node per region from each provider for geographic and operator diversity.
27/// All use port 443 with TLS.
28pub const CROSSVERIFY_MAINNET: &[&str] = &[
29    LIGHTWALLETD_ZEC_ROCKS_NA, // zec.rocks, North America
30    LIGHTWALLETD_ZEC_ROCKS_EU, // zec.rocks, Europe
31    LIGHTWALLETD_ZEC_ROCKS_AP, // zec.rocks, Asia Pacific
32    LIGHTWALLETD_STARDUST_US,  // stardust, US
33    LIGHTWALLETD_STARDUST_EU,  // stardust, Europe
34    LIGHTWALLETD_STARDUST_JP,  // stardust, Japan
35];
36
37/// Default cross-verification endpoints for testnet.
38pub const CROSSVERIFY_TESTNET: &[&str] = &[LIGHTWALLETD_TESTNET];