Service Node
The Service Node is a backend infrastructure component that provides essential functionality for the ZeroLedger protocol:
-
Encryption and Decryption: Handles encryption and decryption of private transaction metadata using quantum-resistant cryptography (vycrypt). When recipients haven't registered their View Accounts in their wallet, Service Node decrypts commitment metadata on their behalf, allowing them to view transaction details without requiring wallet setup.
-
Gas Fee Sponsorship: Paymaster module allows sponsor gas fees for protocol transactions, enabling gasless user experiences. It executes meta-transactions through a trusted forwarder and supports both fully sponsored and fee-based transaction models.
-
Blockchain Event Indexing: Continuously monitors the blockchain for vault contract events and ERC20 transfers events. This allows clients to quickly retrieve transaction history without scanning the entire blockchain.
-
Address activity statistics: Service Node maintains a active wallet addresses interaction statics. Client can uses this info for decoy recipients selection algorithm. Service Node can also provide randomly selected addresses (up to 15 per request) to the client.
-
Decoy Recipient Management: Maintains a database of OFAC-compliant wallet addresses that have interacted with the protocol. When users need decoy recipients for privacy, Service Node randomly selects addresses from this pool (up to 15 per request), ensuring plausible transaction patterns and preventing basic graph analysis attacks.
-
User Metadata Management: Stores and manages user encryption keys and other metadata needed for the protocol to function, including invoice information, activity tracking, and authentication challenges.
Access Restrictions
Current Limitations: The Service Node service is currently restricted to the official ZeroLedger web application only due to CORS (Cross-Origin Resource Sharing) policies. This means:
- Official Web App Only: Only the official ZeroLedger web app can access Service Node endpoints
- CORS Protection: Third-party applications cannot directly integrate with Service Node
- Security Measure: This restriction ensures controlled access and prevents unauthorized usage
Future Plans: An independent Service Node service will be deployed later to enable third-party application integration.
