Apocryph is a decentralised three-sided compute marketplace, allowing end-users to deploy their own personal instance of "cloud" software and developers to train AI/ML models or deploy arbitrary software applications to pre-verified machines in the marketplace. All programs would run inside a secure computing enclave that no one else can access (using TEE technology) for a modest fee (however much the machine provider charges; it's a marketplace) and with regular uptime and data storage SLAs; "cloud" software developers are being rewarded for providing the software (essentially use cases) to the marketplace with a fraction of the fees generated by the instances of their software.
📓 For more information you can check our documentation (specs) draft:
This repository was recently moved here from https://github.com/comrade-coop/apocryph, and parts of the documentation/code might still refer to the old location. Use:
git remote set-url origin git://github.com/comrade-coop/apocryph-k8s
or
git remote set-url origin git@github.com:comrade-coop/apocryph-k8s.git
to update your local clone/s to point to the right repository.
Note The following tests have been conducted on Linux.
Before running the various tests, Make sure the following dependencies are installed and available in your PATH:
- curl: tool for transferring data using various network protocols. The name stands for "Client for URL"
- xargs: command that builds and executes command lines from standard input.
- sed: stream editor for filtering and transforming text.
- go: The Go programming language compiler.
- protoc: The protocol buffer compiler, protoc, is used to compile .proto files, which contain service and message definitions.
- protoc-gen-go: tool used in conjunction with protobuf to generate Go code from protobuf definition files
- protoc-gen-connect-go: generates Go code from protobuf files specifically tailored for the Connect RPC.
go install connectrpc.com/connect/cmd/protoc-gen-connect-go@latest - abigen: convert Ethereum ABI definitions into easy to use, type-safe Go packages.
go install github.com/ethereum/go-ethereum/cmd/abigen@latest - turbo: High-performance build system
- kubectl: The Kubernetes command-line tool for managing Kubernetes clusters.
- docker: platform for developing, shipping, and running applications using containerization.
- jq: lightweight and flexible command-line JSON processor.
- kind: tool that runs a single-node Kubernetes cluster locally.
- ctlptl: An utility for declaratively setting up local Kubernetes clusters.
- tilt: A toolkit automating the process of setting up a new local development cluster.
- helm: package manager for Kubernetes
- helmfile: declarative configuration tool for Helm.
- forge, cast, anvil: tools for building Ethereum-based applications.
- ipfs: The InterPlanetary File System
- constellation: Constellation is a Kubernetes engine that provides a secure and confidential way to run Kubernetes clusters. (Needed in
test/e2e/constellation).
Clone and cd into the project:
git clone https://github.com/comrade-coop/apocryph-k8s
cd apocryphRun the following commands to complete all necessary build steps and generate the required files for running the tests.
npm i && turbo sync Rerun
turbo syncwhenever you change files under theproto/andcontracts/folders.
To start a local environment for e.g. integration-testing or evaluating the project, you can use tilt with Tiltfile in the test/e2e folder.
You can use it, for example, by running the following commands:
# Create a kind cluster:
ctlptl create cluster kind --registry=ctlptl-registry --kubernetes-version=v1.31.0
# Start tilt and run the nginx test:
tilt up -- --include ./test/e2e/nginx/TiltfileThe first command will spin up a kind cluster with a local registry. Then, the second command will, after checking that any additional dependencies are met, then deploy all necessary prerequisites into local cluster, and finally deploying a pod from a manifest file into the cluster.
Once you are done playing around with the test, run the following commands to clean up:
# Clean up the local cluster:
tilt down -- --include ./test/e2e/nginx/Tiltfile
# Delete up the local cluster:
ctlptl create delete kindAs it is, this project is still in its infancy, and most non-trivial contributions should be done only after discussing them with the team -- or else risk missing the point. So, if you fancy contributing to the project, please feel free to hop on our Discord server or just open/reply to an issue discussing your concrete ideas for contribution.
Also, see the PUBLISHING.md documentation for more details on the overall structure of the project.