Skip to content

Commit

Permalink
adding onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Sep 8, 2024
1 parent 2ccdd1f commit b5b1a49
Showing 1 changed file with 102 additions and 22 deletions.
124 changes: 102 additions & 22 deletions proposal.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,102 @@
# zkApp-based GitLab/Github Job Runner with Performance Sampling and Zero-Knowledge Proofs

## Short ideas
## Vision

Imagine if you can onboard mina via simple github action that
would setup a wallet for your and put the keys into your variables in a secure and
automated way, this would allow for parameterizing your acount with crypto wallets automatic.
Via zkapps you can set the variables build values and construct contexts for calling functions.

Imagine if you can just add a plugin to your github actions or gitlab
and easily create and deploy mina test networks, wallets and zero
knowledge proof apps that are defined in your existing github or
gitlab build system, it could be used to run the jobs or deploy your
apps or trigger some jobs or add in ai to your ticket system or resell
gitlab build system, it could be used to run the jobs that deploy your
apps or trigger some AI jobs connected to your ticket system or resell
any parts of those and earn tokens.

Step 0. Add MINA test net plugin to your existing github account to
We can make it easy for users to add an action into github or gitlab
that automatically creates a dev wallet, stores the secrets in a
variable, gets money from a faucet, and uses that to deploy a smart
contract that will allow it to be called for money or other conditions
to create an easy way to onboard code into the zkp world.

We can deploy custom private gitlab runners that execute ai agents
talking to llms that respond to user tickets on behalf of users with
secure parameters and delivery of results to ipfs and be paid in mina.

To do this we can wrap authentication to web2 apps in zkapps that
offer specific services to be paid for in mina coin. One web hook
running javascript anywhere can host the zkapp that calls the gitlab
or github cicd. There are quite a few multi-backend systems available
running in containers or in wasm.

## Steps

### Create Mina Build Variables ZKApp

Add MINA wallet plugin to your existing github/gitlab account to
create a private mina wallet for your project itself that
lives in your project secrets. It will need access to your account to create secrets.
This zkapp will allow you to create new wallets in your account.
There will be different onboarding schemes for this:

#### Web Page agent
Enter in your private credentials into parameters of a wasm binary
that runs in your browser and requests the access for you.

#### Command line program

Enter in your private credentials into parameters of a rust or typescript program
that runs in your computer and requests the access for you.

#### Generate instructions for a human

Generate a list of instructions for a human to navigate the website and setup the
credentials manually

#### Github plugin

Create a github plugin or gitlab equivalent that is an app you can grant access to your account.

### Create Mina Protected Blockchain.

Add MINA test net plugin to your existing github account to
create a mina test network and token for your project itself that
lives in your git repo and runs on commit to update it knowledge
arguments and polynomial commitments about your commits and code.
This protected blockchain will live in your account and the keys will be written to secured storage.

### Expose build job on protected blockchain

Add Mina expose build job plugin to your existing github
action and turn your deployment job into a zkapp that is resellable.

This requires an external runner to call it from outside, because it will only be runnable from the caller job.
The runner will use the protected blockchain and write its results to the private storage.

### Caller Job: Create Web Function to call Expose build job on blockchain

Step 1. Add Mina expose build job plugin to your existing github
Add Mina expose build job plugin to your existing github
action and turn your deployment job into a zkapp that is resellable.

Step 2. Add Mina expose webapp second level plugin to your existing
### Expose Webapp plugin

Add Mina expose webapp second level plugin to your existing
github deploy action and turn your deployment resulting system into a
zkapp that is resellable.

Step 3. Use your favorite ai agent in a docker container in a github action
### Attach AI agent
Use your favorite ai agent in a docker container in a github action
to execute on comment and have it have its own wallet and use other resources and pay for them
in the different mina network tokens you hold.

Step 4. We can search and index git repos and construct arguments of knowledge about them as owners or users
### Index git repos and submodules
We can search and index git repos and construct arguments of knowledge about them as owners or users
and publish those in github and find them. We can condense existing git repos and reduce their size, removing blobs or replacing them with descriptors. This will let us search those repos for things.
You can collect the zkps from your submodules and summarize them into your main project.

Step 5. We can create a set of types and instances as prime numbers.
### Create type system
We can create a set of types and instances as prime numbers.
We can then say there are N types in this repo. Each of the types will
be represented as a prime number. The type of types as a prime. So we
can then index them, say prime number type of types is 2. The prime
Expand All @@ -41,21 +109,11 @@ book a type. This means the type numbers depend on the order they are
constructed if there are different primes available, it could lead to
different incompatible schemas.

We can make it easy for users to add an action into github or gitlab
that automatically creates a dev wallet, stores the secrets in a
variable, gets money from a faucet, and uses that to deploy a smart
contract that will allow it to be called for money or other conditions
to create an easy way to onboard code into the zkp world.
### Create donation and faucet pages

We can deploy custom private gitlab runners that execute ai agents
talking to llms that respond to user tickets on behalf of users with
secure parameters and delivery of results to ipfs and be paid in mina.
#### Create donation page for each project

To do this we can wrap authentication to web2 apps in zkapps that
offer specific services to be paid for in mina coin. One web hook
running javascript anywhere can host the zkapp that calls the gitlab
or github cicd. There are quite a few multi-backend systems available
running in containers or in wasm.
To allow for donations. this will run on github pages or gitlab pages.

## Plant UML Diagrams

Expand All @@ -69,6 +127,28 @@ With account A, user registers ZK App Z1 for 0.1 mina fee.

https://docs.minaprotocol.com/zkapps/writing-a-zkapp/introduction-to-zkapps/how-to-deploy-a-zkapp

@startuml
actor Developer
actor GitLabCI as GL
actor MinaBlockchain as MB

Developer -> GL: Add MINA plugin to GitLab CI
GL -> Developer: Plugin added, create MINA account and token
Developer -> MB: Request to create MINA test network and token
MB -> Developer: MINA account and token created

Developer -> GL: Add MINA expose build job plugin to GitLab pipeline
GL -> MB: Trigger zkApp deployment job
MB -> GL: zkApp deployed, zkSNARK generated

Developer -> GL: Add MINA expose webapp plugin to deploy action
GL -> MB: Trigger zkApp deployment on GitLab CI job completion
MB -> Developer: zkApp deployment verified and resellable

Developer -> MB: Use AI agent to execute on GitLab job completion
MB -> GL: AI agent executed, resources paid in MINA tokens
@enduml


### Create tiny web functions as zkapp that :

Expand Down

0 comments on commit b5b1a49

Please sign in to comment.