{"id":30884317,"url":"https://github.com/dhruvldrp9/blockchain","last_synced_at":"2025-09-08T10:15:44.779Z","repository":{"id":286391361,"uuid":"953877397","full_name":"dhruvldrp9/BlockChain","owner":"dhruvldrp9","description":"BlockChain is a secure, distributed, and production-ready blockchain system with Proof-of-Work, wallet encryption, peer-to-peer networking, RESTful APIs, and PostgreSQL persistence.","archived":false,"fork":false,"pushed_at":"2025-05-07T18:21:29.000Z","size":1156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T02:56:42.597Z","etag":null,"topics":["blockchain","dht-based","digital-signature","distributed-ledger","opensource","p2p","pow","pow-consensus","proof-of-work","python","python3","rsa","sha-256","sha3-256","sheild-coin","sheildcoin","wallet-encryption"],"latest_commit_sha":null,"homepage":"https://block-hive.github.io/ShieldCoin/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhruvldrp9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-24T08:16:48.000Z","updated_at":"2025-05-24T10:34:59.000Z","dependencies_parsed_at":"2025-04-06T07:27:58.938Z","dependency_job_id":"9c8db94d-e665-4f44-9a08-7f471811da9b","html_url":"https://github.com/dhruvldrp9/BlockChain","commit_stats":null,"previous_names":["dhruvldrp9/blockchain"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dhruvldrp9/BlockChain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvldrp9%2FBlockChain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvldrp9%2FBlockChain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvldrp9%2FBlockChain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvldrp9%2FBlockChain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhruvldrp9","download_url":"https://codeload.github.com/dhruvldrp9/BlockChain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvldrp9%2FBlockChain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274167695,"owners_count":25234120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","dht-based","digital-signature","distributed-ledger","opensource","p2p","pow","pow-consensus","proof-of-work","python","python3","rsa","sha-256","sha3-256","sheild-coin","sheildcoin","wallet-encryption"],"created_at":"2025-09-08T10:15:42.880Z","updated_at":"2025-09-08T10:15:44.769Z","avatar_url":"https://github.com/dhruvldrp9.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlockChain - Secure Distributed Ledger System\n\nA complete, secure, and production-ready blockchain implementation featuring transaction processing, proof-of-work consensus, wallet management, and a distributed peer-to-peer network.\n\n## Features\n\n- **Complete Blockchain Implementation**\n  - Proof-of-Work consensus algorithm\n  - Dynamic difficulty adjustment\n  - Secure transaction validation\n  - Mining rewards and fee structures\n\n- **Cryptographic Security**\n  - Strong RSA-3072 based wallet encryption\n  - SHA-256 and SHA3-256 hashing for blockchain integrity\n  - Digital signatures for transaction verification\n  - Password-protected wallet storage\n\n- **Distributed Network**\n  - Peer-to-peer architecture via DHT (Distributed Hash Table)\n  - Automatic node discovery and synchronization\n  - Chain validation and conflict resolution\n  - Automatic bootstrap node detection\n\n- **RESTful API**\n  - Full blockchain management API\n  - Wallet creation and management\n  - Transaction creation and verification\n  - Block mining capabilities\n  - Node status monitoring\n\n- **Database Persistence**\n  - PostgreSQL database integration\n  - Transaction pool persistence\n  - Chain and wallet storage\n  - Connection pooling and failure recovery\n\n## System Requirements\n\n- Python 3.8+\n- PostgreSQL 12+\n- Network connectivity for distributed operations\n- 2GB+ RAM recommended for mining operations\n\n## Installation\n\n### Setting up the environment\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/BlockChain.git\ncd BlockChain\n\n# Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n### Database Setup\n\n1. Create a PostgreSQL database:\n\n```sql\nCREATE DATABASE blockchain;\nCREATE USER blockchain_user WITH PASSWORD 'your_password';\nGRANT ALL PRIVILEGES ON DATABASE blockchain TO blockchain_user;\n```\n\n2. Configure the database connection in `blockchain/config.py`:\n\n```python\nDATABASE_CONFIG = {\n    'host': 'localhost',\n    'port': 5432,\n    'database': 'blockchain',\n    'user': 'blockchain_user',\n    'password': 'your_password'\n}\n```\n\n## Running the Blockchain\n\n### Starting a Bootstrap Node\n\n```bash\npython -m blockchain.api.app --host 0.0.0.0 --port 5000 --dht-port 6000\n```\n\nThis will start a bootstrap node that creates the initial blockchain with a genesis block.\n\n### Joining an Existing Network\n\n```bash\npython -m blockchain.api.app --host 0.0.0.0 --port 5001 --dht-port 6001 --bootstrap 127.0.0.1:6000\n```\n\nReplace `192.168.1.100:6000` with the IP and DHT port of a running bootstrap node.\n\n## Basic Usage\n\nOnce your node is running, you can interact with the blockchain using the API:\n\n### Creating a Wallet\n\n```bash\ncurl http://localhost:5000/wallet/new\n```\n\nThis will return a new wallet containing:\n- Public address\n- Public key\n- Private key (store securely!)\n\n### Creating a Transaction\n\n```bash\ncurl -X POST http://localhost:5000/transactions/new \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"sender\": \"PUBLIC_KEY_HERE\", \n    \"recipient\": \"RECIPIENT_ADDRESS_HERE\", \n    \"amount\": 10,\n    \"signature\": \"SIGNATURE_HERE\"\n  }'\n```\n\n### Mining a Block\n\n```bash\ncurl http://localhost:5000/mine?address=YOUR_WALLET_ADDRESS\n```\n\nThis will mine a new block with pending transactions and credit mining rewards to the specified address.\n\n### Viewing the Blockchain\n\n```bash\ncurl http://localhost:5000/chain\n```\n\n## Security Considerations\n\n- Always encrypt and securely store wallet private keys\n- Run nodes on secure, firewalled servers\n- Consider implementing additional authentication for production use\n- Monitor for suspicious transaction patterns\n- Regularly backup blockchain database\n\n## Documentation\n\nFor more detailed documentation, see:\n\n- [API Documentation](docs/API.md) - Complete API reference\n- [Security Guide](docs/SECURITY.md) - Security features and best practices\n- [Architecture Overview](docs/ARCHITECTURE.md) - System architecture and design\n- [Advanced Configuration](docs/CONFIGURATION.md) - Advanced configuration options\n- [Development Guide](docs/DEVELOPMENT.md) - Guide for developers extending the system\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contact\n\nFor questions or support, please contact [dhruv.ldrp9@gmail.com](mailto:dhruv.ldrp9@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvldrp9%2Fblockchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhruvldrp9%2Fblockchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvldrp9%2Fblockchain/lists"}