{"id":14967060,"url":"https://github.com/Golem-Unlimited/gudot","last_synced_at":"2025-10-19T09:31:34.389Z","repository":{"id":37178597,"uuid":"208824868","full_name":"golemfactory/gudot","owner":"golemfactory","description":"Linear regression using FHE gMorph library","archived":false,"fork":false,"pushed_at":"2023-01-20T22:27:13.000Z","size":141,"stargazers_count":2,"open_issues_count":7,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-01T04:27:56.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golemfactory.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}},"created_at":"2019-09-16T14:47:06.000Z","updated_at":"2022-10-27T04:40:08.000Z","dependencies_parsed_at":"2023-02-12T06:00:35.264Z","dependency_job_id":null,"html_url":"https://github.com/golemfactory/gudot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgudot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgudot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgudot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golemfactory%2Fgudot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golemfactory","download_url":"https://codeload.github.com/golemfactory/gudot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869245,"owners_count":16555571,"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","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":[],"created_at":"2024-09-24T13:37:23.969Z","updated_at":"2025-10-19T09:31:29.111Z","avatar_url":"https://github.com/golemfactory.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gudot \nThis is a showcase for feasibility of gMorph/FHE on Golem.\nIt computes linear regression using FHE [gMorph] library.\nThe whole software is experimental and is provided for demonstration purposes only.\nPlease note that we make no claims about security of the encryption scheme.\nIt is included in Golem's workshop on DevCon 5.\n\n[gMorph]: https://github.com/golemfactory/gmorph\n\n![gudot GIF demo](https://i.imgur.com/w9fW3aR.gif)\n\n## Requirements\n* emsdk - installation instructions can be found\n  [here](https://emscripten.org/docs/getting_started/downloads.html)\n* gwasm-runner - you can either build it from source as described\n  [here](https://github.com/golemfactory/gwasm-runner), or download\n  a precompiled binary from [here](https://github.com/golemfactory/gwasm-runner/releases)\n* freetype library - on Ubuntu install package `libfreetype6-dev`\n\n## Building\nAssuming you've got the prerequisites satisfied, in order to build the project, simply run\n\n```\ncargo build --release\n```\n\n## Running\nThe project involves executing several steps in sequence: some steps are done on the host OS (so your machine),\nwhile the main step is performed using gWasm (run on `gwasm-runner`). \n\nFor illustration purposes, every step is executed by a separate command:\n\n```\n$ target/release/gudot generate\nWriting input.json\n\n$ target/release/gudot encrypt\nReading input.json\nWriting enc_input.json\nWriting keys.json\n\n$ gwasm-runner target/release/gudot.wasm -- --subtasks=N\nwork dir: .../split\nReading enc_input.json\nWriting enc_output.json\n\n$ target/release/gudot decrypt\nReading keys.json\nReading enc_output.json\nWriting output.json\n\n$ target/release/gudot regress\nReading output.json\nReading input.json\nFitted model: y = -2.6898656093724984x + 93773.13902413758\nWriting regress.json\n\n$ target/release/gudot plot\nReading input.json\nReading regress.json\nWriting plot.png\n```\n\n## Running on Golem network\n```\n$ gwasm-runner --backend=Brass target/release/gudot.wasm -- --subtasks=N\n```\nWhen running on the Golem network, you may want to adjust some parameters specific to Brass Golem\n(e.g. the path to your Golem's data directory). To do so, you'll need to create a configuration\nfile for the runner. You can find more information on this in the [gwasm-runner README].\n\n[gwasm-runner README]: https://github.com/golemfactory/gwasm-runner/blob/master/README.md#running-on-the-golem-network\n\n## Components\n* `generate` --- creates `input.json` containing sample data in the format `[[x1,...,xn][y1,...,yn]]`\n  (this step is optional - you can provide your own `input.json`);\n* `encrypt` --- generates a secret encryption key (`keys.json`), and encrypts `input.json` yielding `enc_input.json`;\n* `gudot.wasm` --- the main gWasm binary, meant to be run with `gwasm-runner`; it splits the encrypted data;\n  sends parts to providers and combines partial results returned by the providers\n* `decrypt` --- decrypts the received results, producing `output.json`   (reads `keys.json` and `enc_output.json`);\n* `regress` --- calculates parameters `(slope, intercept)` of the fitted linear model, producing `regress.json`\n* `plot` --- plots the regression line along with the input points, producing `plot.png`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGolem-Unlimited%2Fgudot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGolem-Unlimited%2Fgudot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGolem-Unlimited%2Fgudot/lists"}