{"id":21964524,"url":"https://github.com/intob/godave","last_synced_at":"2026-02-21T06:03:22.807Z","repository":{"id":239904138,"uuid":"800939888","full_name":"intob/godave","owner":"intob","description":"P2P KV store","archived":false,"fork":false,"pushed_at":"2024-12-11T23:08:19.000Z","size":775,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T17:57:29.785Z","etag":null,"topics":["communication","cryptography","kv-store","p2p","privacy","udp"],"latest_commit_sha":null,"homepage":"https://inneslabs.uk/cs/dave","language":"Go","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/intob.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,"zenodo":null}},"created_at":"2024-05-15T09:39:27.000Z","updated_at":"2025-07-21T04:59:00.000Z","dependencies_parsed_at":"2025-01-26T02:00:48.407Z","dependency_job_id":null,"html_url":"https://github.com/intob/godave","commit_stats":null,"previous_names":["intob/godave"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/intob/godave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intob%2Fgodave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intob%2Fgodave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intob%2Fgodave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intob%2Fgodave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intob","download_url":"https://codeload.github.com/intob/godave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intob%2Fgodave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29674936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T05:54:28.202Z","status":"ssl_error","status_checked_at":"2026-02-21T05:53:42.585Z","response_time":107,"last_error":"SSL_read: 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":["communication","cryptography","kv-store","p2p","privacy","udp"],"created_at":"2024-11-29T12:24:01.015Z","updated_at":"2026-02-21T06:03:22.791Z","avatar_url":"https://github.com/intob.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dave - Distributed Key-Value Store\n\nDave is a peer-to-peer key-value store built on UDP, designed for efficient data distribution and resource allocation using XOR metric and proof-of-work.\n\n## Core Features\n\n- Distributed key-value storage over UDP\n- XOR metric used to prioritise replicas\n- Random storage challenges measure peer reliability\n- Sharding for concurrent processing\n- Automatic peer discovery\n- Data backup and recovery\n- Just two dependencies:\n    - https://github.com/cespare/xxhash/v2\n    - https://github.com/lukechampine/blake3\n\n## Architecture\n\n### Network Protocol\n\n- **Maximum Packet Size**: 1424 bytes to avoid fragmentation\n- **Transport**: UDP with optimised serialization (x4 faster than protobuf)\n- **Peer Management**: Dynamic peer discovery with trust scoring\n- **Data Distribution**: XOR metric for deterministic propagation\n\n### Storage System\n\n- **Sharding**: Concurrent processing with configurable shard capacity\n- **Data Prioritization**: XOR metric and time-bound storage prioritization\n- **Backup**: Automatic data persistence and recovery with configurable backup files\n\n## Configuration\n\n```go\ntype DaveCfg struct {\n\t// A UDP socket. Normally from net.ListenUDP. This interface can be mocked\n\t// to build simulations.\n\tSocket pkt.Socket\n\t// Node private key. The last 32 bytes are the public key. The node ID is\n\t// derived from the first 8 bytes of the public key.\n\tPrivateKey    ed25519.PrivateKey\n\tEdges         []netip.AddrPort // Bootstrap peers.\n\tShardCapacity int64            // Capacity of each of 256 shards in bytes.\n\t// Time-to-live of data. Data older than this will be replaced as needed,\n\t// if new data has a higher priority. Priority is a function of age and\n\t// XOR distance.\n\tTTL            time.Duration\n\tBackupFilename string // Filename of backup file. Leave blank to disable backup.\n\t// Set to nil to disable logging, although this is not reccomended. Currently\n\t// logging is the best way to monitor. In future, the API will be better.\n\tLogger logger.Logger\n}\n```\n\n## Protocol Operations\n\n- **PING/PONG**: Peer liveness and discovery\n- **PUT**: Store data with proof-of-work\n- **GET/GET_ACK**: Retrieve stored data\n- **GETMYADDRPORT/GETMYADDRPORT_ACK**: Get own address:port from a remote\n\n## Trust System\n\n- Reliability is measured using random storage challenges\n- No gossip about reliability to prevent attack vectors\n- Reliability influences peer selection\n- Reliability influences re-propagation\n\n## Pruning and Maintenance\n\n- Periodic pruning of inactive peers\n- Concurrent shard processing\n- Automatic backup management\n\n## Security Features\n\n- Ed25519 signatures for data authenticity\n- Proof-of-work for spam prevention\n- Trust-based peer selection\n- Loopback prevention\n- Peer table poisoning (and by extension Eclipse attack) prevention\n\n## Edge Nodes\n\nEdge nodes serve as bootstrap peers, and are permanently retained in the peer table.\n\n## Performance Considerations\n\n- Concurrent packet processing\n- Concurrent shard processing\n- Configurable pruning intervals\n- Priority heap for data prioritisation, O(log n) inserts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintob%2Fgodave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintob%2Fgodave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintob%2Fgodave/lists"}