└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Parity Protocol 2 | 3 | [![Go Version](https://img.shields.io/badge/Go-1.22.7%2B-00ADD8?style=flat-square&logo=go)](https://go.dev/) 4 | [![PostgreSQL](https://img.shields.io/badge/PostgreSQL-14.0%2B-336791?style=flat-square&logo=postgresql)](https://www.postgresql.org/) 5 | [![Docker](https://img.shields.io/badge/Docker-Required-2496ED?style=flat-square&logo=docker)](https://www.docker.com/) 6 | [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE) 7 | 8 | ## Introduction 9 | 10 | Parity Protocol is a cutting-edge distributed computation network that enables secure and verifiable task execution across verified nodes. Built and maintained by Blit Labs, this protocol offers a cloudless architecture that prioritizes security, reliability, and efficient resource utilization. 11 | 12 | 📚 [Read the Complete Documentation](https://blitlabs.xyz/docs) 13 | 14 | ## System Architecture 15 | 16 | The Parity Protocol ecosystem consists of five core components, each serving a specific purpose in the network: 17 | 18 | ### Core Components 19 | 20 | #### 🏃 [parity-runner](https://github.com/theblitlabs/parity-runner) 21 | 22 | - Manages secure task execution in isolated Docker environments 23 | - Provides comprehensive execution metrics and system usage analytics 24 | - Ensures computational integrity and optimal resource allocation 25 | 26 | #### 🖥️ [parity-server](https://github.com/theblitlabs/parity-server) 27 | 28 | - Orchestrates task distribution and validation processes 29 | - Handles node registration and reputation management 30 | - Implements real-time communication via webhooks 31 | 32 | #### 🔌 [parity-client](https://github.com/theblitlabs/parity-client) 33 | 34 | - Delivers a seamless interface for task submission and monitoring 35 | - Provides robust APIs for comprehensive task management 36 | - Features real-time execution tracking and detailed analytics 37 | 38 | #### 💎 [parity-token](https://github.com/theblitlabs/parity-token) 39 | 40 | - Implements a custom ERC20 token for network operations 41 | - Powers protocol economics and staking mechanisms 42 | - Facilitates automated reward distribution 43 | 44 | #### 👛 [parity-wallet](https://github.com/theblitlabs/parity-wallet) 45 | 46 | - Provides secure token management capabilities 47 | - Features enterprise-grade authentication system 48 | - Enables efficient transaction handling 49 | 50 | ### Supporting Tools 51 | 52 | | Tool | Purpose | 53 | | ------------------------------------------------------------- | ------------------------------------------------ | 54 | | [gologger](https://github.com/theblitlabs/gologger) | Advanced structured logging for Go applications | 55 | | [deviceid](https://github.com/theblitlabs/deviceid) | Robust device identification system | 56 | | [keystore](https://github.com/theblitlabs/keystore) | Secure cryptographic key management | 57 | | [go-wallet-sdk](https://github.com/theblitlabs/go-wallet-sdk) | Comprehensive Go SDK for blockchain interactions | 58 | 59 | ## Getting Started 60 | 61 | ### System Requirements 62 | 63 | Before beginning, ensure your system meets these prerequisites: 64 | 65 | - **Go**: Version 1.22.7 or higher 66 | - **PostgreSQL**: Version 14.0 or higher 67 | - **Docker**: Latest stable version 68 | - **Make**: Latest version 69 | - **Git**: Latest version 70 | 71 | ### Installation Guide 72 | 73 | #### 1. Repository Setup 74 | 75 | ```bash 76 | mkdir parity-workspace && cd parity-workspace 77 | 78 | # Clone core repositories 79 | for repo in server runner client token wallet; do 80 | git clone https://github.com/theblitlabs/parity-${repo}.git 81 | done 82 | ``` 83 | 84 | #### 2. Initial Configuration 85 | 86 | ```bash 87 | # Set up token and wallet first 88 | cd parity-token 89 | # Follow README instructions for: 90 | # 1. Token contract deployment 91 | # 2. Parameter configuration 92 | # 3. Initial distribution setup 93 | 94 | cd ../parity-wallet 95 | # Follow README instructions for: 96 | # 1. Wallet infrastructure setup 97 | # 2. Authentication configuration 98 | # 3. Token contract integration 99 | 100 | # Copy example configs for core components 101 | for component in server runner client; do 102 | cp parity-${component}/.env.sample \ 103 | parity-${component}/.env 104 | done 105 | ``` 106 | ##### Deployed Addresses 107 | 108 | For reference, here are the current deployed addresses on Ethereum: 109 | 110 | - **Stake Wallet Address**: `0x261259e9467E042DBBF372906e17b94fC06942f2` 111 | - **Token Contract Address**: `0x844303bcC1a347bE6B409Ae159b4040d84876024` 112 | 113 | 114 | 115 | #### 3. Component Configuration 116 | 117 | Each component requires specific configuration. Follow these steps carefully: 118 | 119 | ##### Server Setup 120 | 121 | 1. Navigate to `parity-server` directory 122 | 2. Open `.env` 123 | 3. Configure according to the [server documentation](https://github.com/theblitlabs/parity-server) 124 | 4. Key focus areas: 125 | - Database configuration 126 | - Blockchain connection parameters 127 | - Network settings 128 | 129 | ##### Runner Setup 130 | 131 | 1. Navigate to `parity-runner` directory 132 | 2. Open `.env` 133 | 3. Configure according to the [runner documentation](https://github.com/theblitlabs/parity-runner) 134 | 4. Key focus areas: 135 | - Docker environment settings 136 | - Server connection parameters 137 | - Resource allocation limits 138 | 139 | ##### Client Setup 140 | 141 | 1. Navigate to `parity-client` directory 142 | 2. Open `.env` 143 | 3. Configure according to the [client documentation](https://github.com/theblitlabs/parity-client) 144 | 4. Key focus areas: 145 | - API configurations 146 | - Server connection details 147 | - Client-specific parameters 148 | 149 | ⚠️ **Important Configuration Notes**: 150 | 151 | - Verify all placeholder values are replaced with actual configurations 152 | - Ensure no port conflicts between components 153 | - Double-check file permissions 154 | - Use secure values for authentication tokens and keys 155 | 156 | #### 4. Launch Services 157 | 158 | Run each component in a separate terminal window: 159 | 160 | ```bash 161 | # Terminal 1: Server 162 | cd parity-server 163 | make build 164 | parity-server auth --private-key YOUR_PRIVATE_KEY 165 | parity-server 166 | 167 | # Terminal 2: Runner 168 | cd parity-runner 169 | make build 170 | parity-runner auth --private-key YOUR_PRIVATE_KEY 171 | parity-runner stake --amount 10 172 | parity-runner 173 | 174 | # Terminal 3: Client 175 | cd parity-client 176 | make build 177 | parity-client 178 | ``` 179 | 180 | ## Contributing 181 | 182 | We welcome contributions from the community! Here's how to get started: 183 | 184 | 1. **Find an Issue** 185 | Browse our repositories for open issues: 186 | 187 | - [parity-server](https://github.com/theblitlabs/parity-server/issues) 188 | - [parity-runner](https://github.com/theblitlabs/parity-runner/issues) 189 | - [parity-client](https://github.com/theblitlabs/parity-client/issues) 190 | - [parity-token](https://github.com/theblitlabs/parity-token/issues) 191 | - [parity-wallet](https://github.com/theblitlabs/parity-wallet/issues) 192 | 193 | 2. **Fork & Clone** 194 | Fork the relevant repository and create your feature branch: 195 | 196 | ```bash 197 | git checkout -b feature/amazing-feature 198 | ``` 199 | 200 | 3. **Set Up Development Environment** 201 | 202 | ```bash 203 | make install-hooks 204 | ``` 205 | 206 | 4. **Submit Your Work** 207 | - Follow [Conventional Commits](https://www.conventionalcommits.org/) guidelines 208 | - Include comprehensive documentation updates 209 | - Provide clear descriptions of changes 210 | - Reference the issue being addressed 211 | 212 | --- 213 | 214 | 📝 For detailed information about each component, please refer to their respective documentation. 215 | --------------------------------------------------------------------------------