{"id":37089007,"url":"https://github.com/champii/crypto-dht","last_synced_at":"2026-01-14T10:55:25.840Z","repository":{"id":57653099,"uuid":"110580687","full_name":"Champii/crypto-dht","owner":"Champii","description":"Blockchain over DHT in GO","archived":true,"fork":false,"pushed_at":"2023-02-20T20:01:41.000Z","size":53926,"stargazers_count":41,"open_issues_count":1,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-06-20T08:02:03.937Z","etag":null,"topics":["blockchain","decentralized","dht","distributed","go","golang","wallet"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Champii.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":"2017-11-13T17:42:22.000Z","updated_at":"2023-09-08T17:32:33.000Z","dependencies_parsed_at":"2024-06-20T07:00:32.813Z","dependency_job_id":"56fac789-397a-4684-a677-a87e16cbf2ad","html_url":"https://github.com/Champii/crypto-dht","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Champii/crypto-dht","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Champii%2Fcrypto-dht","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Champii%2Fcrypto-dht/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Champii%2Fcrypto-dht/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Champii%2Fcrypto-dht/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Champii","download_url":"https://codeload.github.com/Champii/crypto-dht/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Champii%2Fcrypto-dht/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","decentralized","dht","distributed","go","golang","wallet"],"created_at":"2026-01-14T10:55:25.187Z","updated_at":"2026-01-14T10:55:25.826Z","avatar_url":"https://github.com/Champii.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto-DHT\nExperimental Blockchain over DHT\n\n## Jump To\n\n- [Disclaimer](#disclaimer)\n- [Background](#background)\n- [Features](#features)\n- [Details](#details)\n- [Usage](#usage)\n- [Build](#build)\n  - [Setup](#setup)\n  - [Bundle](#bundle)\n- [Todo](#todo)\n\n## Disclaimer\n\nThis software and the associated DHT are only Proof Of Concept.\nThe repo is quite old and not maintained anymore.\nFeel free to fork it but be prepared for a lot of troubles.\n\n## Background\n\nBitcoin is a quickly growing crypto-currency, gaining interest from the public\nby its capacity to emit some digital money, to transfer that money between wallets,\nto assure a certain anonymity in those transfers,\nand all of that without intervention of any bank or any other third party. (other than part of the network, ofc)\n\nBitcoin based blockchains all share the same characteristic: In order to reach\na consensus, each and every nodes participating in the network have to keep a\nfull copy of the blockchain. Even if this issue has been solved with light wallets\nand other trust-based protocol, a majority of the nodes need to keep a full copy\nof the blockchain in order for the network to keep working well. At this time,\nthis blockchain is now 150GB big. (!) New arrivants have to wait at least one week\nbefore starting to actualy use their wallet.\n\nA Decentralized Hash Table (DHT) is a form of network used to store some content\nin the form of key/value pairs. It differs from classical hash tables by its\ndecentralized and distributed nature. In fact, each node participating in a DHT can fetch and store\naddressable content by key, as well as storing and serving a fraction of that hash table.\n\nThis experimental project try to avoid keeping all the blockchain, but instead\nprefers to store it in a DHT. This way every node has to keep a small\nportion of the blocks, depending on its own address in the DHT, the number of keys stored\nand the number of nodes participating in the network.\n\nEven if the blocks are stored in a decentralized way, every node still have to keep\nsome records when mining time has come:\n- Every block's header, to validate a block when it comes for storage\n- Every UTXOs (Unspent Transaction Output, basicaly forming the balances of\nevery wallet) in order to validate incoming transactions\n- By extension every known address (wallet) that hold or have held some coins\n\nEach of that implies that we have to fetch all the chain at least once, build what\nwe need from it, and throw it away. Then we just have to stay synced with new incoming blocks\nto update our data on the fly.\n\n## Features\n\nBased on my own DHT implementation in GO: [go-dht](https://github.com/champii/go-dht)\n\n- One block every minute\n- Base block revenue is 1.00 coin (100 cents)\n- DHT for block storage.\n\n![Screenshot](https://github.com/champii/crypto-dht/raw/master/screenshot.png \"Screenshot\")\n![Screenshot2](https://github.com/champii/crypto-dht/raw/master/screenshot2.png \"Screenshot2\")\n![Screenshot3](https://github.com/champii/crypto-dht/raw/master/screenshot3.png \"Screenshot3\")\n\n\n\n## Usage\n\n```\nNAME:\n  Crypto-Dht - Experimental Blockchain over DHT\n\nUSAGE:\n  crypto-dht [options]\n\nVERSION:\n  0.1.0\n\nOPTIONS:\n  -c value, --connect value  Connect to node ip:port. If not set, startup a bootstrap node.\n  -l value, --listen value   Listening address and port (default: \"0.0.0.0:3000\")\n  -f value, --folder value   Config Folder (default: \"/home/champii/.crypto-dht\")\n  -s                         Stat mode\n  -m                         Mine\n  -w                         Show wallets and amount\n  -g                         Deactivate GUI\n  -S value, --send value     Send coins from main.key. Must be of the form 'amount:destAddress'\n  -n nodes, --network nodes  Spawn X new nodes network. If -b is not specified, a new network is created. (default: 0)\n  -v level, --verbose level  Verbose level, 0 for CRITICAL and 5 for DEBUG (default: 3)\n  -h, --help                 Print help\n  -V, --version              Print version\n```\n\n## Details\n\n`What happend when a new node connects to the network ?`\n\nTry to figure the network as a circle, with 2^127 possible points on it from\naddress 0x0 to 0xFFFF...\nWhen a node connects to the network (via a bootstrap node), it choose a unique 160bit key as its address and to represent itself.\n\nIf the node does not have a wallet yet, one is created.\n\nIt then starts to ask the bootstrap node for its neighborhood, creating a routing table\nwith the other nodes it discovers along the way. It then starts to populate its\nrouting table further by asking for random values, again adding nodes on its way.\n\nAt this time, it starts to synchronise from the DHT by polling the next block (or the first if this is a new connection)\n\nIts easy to find a block in the DHT:\n\nGiven a block `b1` and a hash function `H`, to find the address `k` of the next block\ninside the DHT, we muse obtain the hash `h1` of that first block with\n\n`h1 = H(b1)`.\n\nAs this hash is not evenly distributed (must be less than the current target), we\nhash it again to obtain the address `k` of the next block:\n\n`k = H(h1)`\n\nWe can start from the hash of the genesis block (that is fixed) and keep going\nby hashing each block hash we got to get the next one etc, etc.\n\nWhen the DHT answers a NOT_FOUND or an error, we stop synchronising.\n\n\n## Build\n\n\n### Setup\n\n```\n$\u003e cd client\n$\u003e npm install\n$\u003e npm run build // You have to run this everytime the client change\n$\u003e cd ..\n$\u003e go build\n```\n\n### Bundle\n\n```\n$\u003e go get -u github.com/asticode/go-astilectron-bundler/...\n$\u003e ./scripts/build.sh\n```\n\nThe output binary will be in `./build/linux-amd64/crypto-dht`\n\n## Todo\n\n- handle forks\n- Dont permanently sync but rather use broadcast to spread and listen to new blocks\n- Get pending transactions from other nodes\n- Fees\n- Scrypt\n- Better GUI\n- Manage wallets\n- Recheck blockchain\n- Config file\n- Daemon ?\n- (Make DHT address the hash of the wallet? anonymity may be compromised, don't allow for multiple connexions with same address)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchampii%2Fcrypto-dht","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchampii%2Fcrypto-dht","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchampii%2Fcrypto-dht/lists"}