The-Distributed-Computing-Project / Distributed-Compute-Coin

A unique cryptocurrency built-in C++, with a system to purchase computing power from miners, bringing distributed super-computing to everyone.
Other
12 stars 3 forks source link

[FEATURE REQUEST] various ideas #6

Open walksanatora opened 1 year ago

walksanatora commented 1 year ago
  1. Rewrite in rust A rewrite in rust could allow cross-platform support (mac/linux/bsd nodes), and eliminated the ever present segfault
  2. Use unprivilaged users (linux, possibly mac) By using a user with lesser permissions it would improve security by also disallowing acess to others uploaded programs
  3. Docker Docker is cross platform, you could use docker to run in a container which guarantees that programs cannot interact with each other, also with docker you can set resource limits per-container
sam-astro commented 1 year ago

That is actually really cool! I personally don't know how to use rust currently, but maybe in the future. My initial idea to use Rust for programs was because of how easy it was to just compile directly on the client system, and preventing unsafe executable distribution while also running in a language as fast as rust made it a good candidate. I also don't have any experience with docker, though I've heard lots about it. I also think the current version that is written in C++ is probably sufficient for most use-cases, though I suppose I am open to changes for the better. Using unprivileged users is also a really great idea, although I'm not sure how to make that cross-platform and implement something similar on windows. And the option of just restricting compute to only linux based systems isn't much of an option, since a huge portion of PC's are windows, as well as the fact windows has much better graphics card support.

walksanatora commented 1 year ago

docker is nice because you could offer "network-limited" compute instances, or the Miner or Runner or whatever can set per-program resource limits https://docs.docker.com/config/containers/resource_constraints/ also by running in docker i think mabey possible support for "untrusted" programs to run (or other programming langs Eg: C, Zig) docker also allows us to depend on project-specific dependicies so if one project needs say libpulse (probally allready on the base system but) you can depend on Only that package also docker on linux would allow for a finer choice of OS, it could be running in Debian/Ubuntu/Alpine/Arch

walksanatora commented 1 year ago

docker has a wide range of containers see: https://hub.docker.com/ (also personally i would like support for a dcc_output directory/env Var)

hmm, if only the folder name was consistent then i could use WORKDIR in docker to CD while creating the image

heck could have them include a build.sh/bat file in the Top of the ZIP that explains how to build the program build.sh would work on mac/linux build.bat would be the build file for windows