Skip to content

Commit

Permalink
seems to be running for a while
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Sep 17, 2024
1 parent 6edff0a commit 40329b4
Show file tree
Hide file tree
Showing 5 changed files with 269 additions and 46 deletions.
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /app

ADD pnpm-lock.yaml pnpm-lock.yaml
ADD package.json package.json
ADD package-lock.json package-lock.json
#ADD package-lock.json package-lock.json
ADD tsconfig.examples.json tsconfig.examples.json
ADD tsconfig.json tsconfig.json
ADD tsconfig.mina-signer.json tsconfig.mina-signer.json
Expand All @@ -26,7 +26,16 @@ COPY tests /app/tests
COPY benchmark /app/benchmark
COPY jest /app/jest
COPY dune-project /app/dune-project
RUN npm ci

#RUN pnpm ci
RUN corepack enable
RUN corepack prepare pnpm@latest-9 --activate
RUN pnpm install
# "dev": "npx tsc -p tsconfig.test.json && node src/build/copy-to-dist.js",
RUN npx tsc --help || echo 2
RUN npx tsc --all || echo 2
RUN npx tsc --version
RUN npx tsc -p tsconfig.test.json
RUN pnpm run build
RUN pnpm install jest
RUN pnpm install -g clinic
Expand Down
126 changes: 122 additions & 4 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ o1js uses these types to ensure that the constants used in the protocol are cons
| main | **Yes** |
| develop | No |

When you start your work on o1js, please create the feature branch off of one of the above base branches.
It's encouraged to submit your work-in-progress as a draft PR to raise visibility!
When you start your work on o1js, please create the feature branch off of one of the above base branches.
It's encouraged to submit your work-in-progress as a draft PR to raise visibility!
When working with submodules and various interconnected parts of the stack, ensure you are on the correct branches that are compatible with each other.

**Default to `main` as the base branch**.
Expand Down Expand Up @@ -203,8 +203,8 @@ docker run --rm --pull=missing -it \

See the [Docker Hub repository](https://hub.docker.com/r/o1labs/mina-local-network) for more information.

Next up, get the Mina blockchain accounts information to be used in your zkApp.
After the local network is up and running, you can use the [Lightnet](https://github.com/o1-labs/o1js/blob/ec789794b2067addef6b6f9c9a91c6511e07e37c/src/lib/fetch.ts#L1012) `o1js API namespace` to get the accounts information.
Next up, get the Mina blockchain accounts information to be used in your zkApp.
After the local network is up and running, you can use the [Lightnet](https://github.com/o1-labs/o1js/blob/ec789794b2067addef6b6f9c9a91c6511e07e37c/src/lib/fetch.ts#L1012) `o1js API namespace` to get the accounts information.
See the corresponding example in [src/examples/zkapps/hello-world/run-live.ts](https://github.com/o1-labs/o1js/blob/ec789794b2067addef6b6f9c9a91c6511e07e37c/src/examples/zkapps/hello-world/run-live.ts).

### Profiling o1js
Expand Down Expand Up @@ -236,3 +236,121 @@ After the Node.js process is running, open the Chrome browser and navigate to `c

to update the pnpm lock
`pnpm install --no-frozen-lockfile`


# Idea

see idea.yaml

The idea is to introspect o1js, by observing, orienting, deciding and acting on the internal state and
the external state. We can take the multi headed value network and the policy network of deepmind as inspiration,
from what I understand we can imagine a hydra like system of a hive mind
with many actors or agents in a blockchain network.
Each agent can have multiple accounts, we can model them with mina accounts and keys.
We can store the keys in private variables attached to build jobs on private build servers.
The agents then run in the build job and use the wallet via the key.
The build job is passed in others variable like the current branch or commit, this is basically your github action job context, or gitlab or other build system.

The state of the git tree is part of the hash of the commit.
We can include those hashses in the proof, so we can recursivly hash the repos and subrepos and packages used.

We extract knowledge from the runtime and construct zksnarks about them using o1js itself.

So we can say each account can be linked with a project, and o1js is one such project but it is a foundational
part that creates a whole ecosystem.

So we can think of it as a prelude or setting the stage for the work to be done.

Thus we can create a single hash of the entire o1js system knowledge, including its state, inputs, outputs, environmental bindings, processes, servers, clusters, networks, accounts, deployments, in a reflective vernacular
system that unites the models of different domains.

By using rdf owl ontologies derived from vernacular ast dumps of compiler graphs
we can label and reference versions of this vernacular data type system of unreflected linguistic
data. The paths of unimath unite the model with prolog unification to construct a platonic idea
of unity which we can reference with the uu or universe of universes, in unimath, or the by the symbol of 1, in our imagination. So we can lift all the data types as facets of the universe, each declaration in context
of a stream of output, this stream can self reflect over itself creating a closure of introspective thought,
we can address the moment this way creating self and other references at difference scales and measures.

So we now understand the universe of types, we can think of instances of those types as prototypes,
and we can create content addressable sparse representations of these graphs. We can think of this as the tree of knowledge. This can be seen as the initial accounts or prelude as well in a metaphor. So by thinking about mina accounts we can think about type systems used, and we have a mina account for the mina account as the base template.
each user can publish smart contracts that define new types. We can create a canonical vernacular embedding that
allows a kind of "latin" to speak about other languages in the project.

The point of this is to paint a picture of the idea. to give a story or context to the project.
With rdf now we can construct statements about subjects from any part of the system, even other statements, which can be expressed as objects with no identifier, a blank object constructed out of data, like an empty list being filed with a pair, or a pair of pairs, or a linked list, different types of data can be constructed.

Lets summarize:

create a graphql server for the following,
include interfaces for sparql etc.

for all projects p:
for all version v:
for all modules and submodules m:
for all tests t:
for all functions f:
for all basic blocks b:
for all loops l:
we find ourself in a loop right now. ooda.
we find ourselves on an instruction I,
we have registers R,
we have pointers to memory addresses M,
we have input files IF,
The registers values could be part of cryptographic algorithm.
we have zkp about the:
meaning of the values
distribution of values:
distribution of types:
value -> type
value prototype
examples
cases
use cases
uml modeling
plantuml diagrams
referencing this system right now:
self reference
lexical introspection
choose your own adventure
heros journey
epic stories
meta-meme
introspector
self observation
self confidence
fitness function
logical gymnastics
demonstration of concept
dungeons of thought,
laybyrithm
under groud
archtypes
elixer
heros journey
stream of conciousness
unity of mind
unimath
coq
meta-coq
haskell
template haskell
graphql -server
paths of proof
homotopy type levels
propositions of length of path of proof
uu
. END.
mathematical modelling
neural network modelling
model checkers
rdf ontologies
algebras of types:
enumerations of disjoint unions
fields of probability
or operation
+ operator
products of two events
joint probability
and operation
* operator

96 changes: 96 additions & 0 deletions idea.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
prelude: {}
universe_of_universes:
empty_set:
one: { 1:1 }
two: { 1:1, 2:2 }
three: { 1:1, 2:2, 3:3 }
universe:
world:
projects:
- project:
name: "o1js"
types:
- nodejs-rust-ocaml-wasm-mixed-language-web3-library:
nodejs:
json:
yaml:
ocaml :
introspection:
ppx :
ppx2json:
output: json
rust :
introspection:
syn :
syn-to-ast:
output: json
wasm-compile :
output: wasm
web3 :
wasm :
instances:
- o1js :
version:
build:
docker image:
git submodules:
recursive hashs:
npm packages:
opam packages:
yarn:
pnpm:
jest:
introspection:
clinicjs:
linux perf:
strace:
other tools:
todo: look for more js and ts observability tools
divide: break down into parts
conquer: solve each part individually
integrate:
idea: unite type systems
element:
water:
unity:
singular:

rule:
idea: command and control
repl:
- read
- eval
- print
- loop
ooda:
- observe
- orient
- decide
- act
quine: emit own source code
heideggerian-terms: long-names-that-create-neologisms
memes: self replicating patterns
algebras:
what: formal combinations of objects
terms:
multiplication:
symbol: "*"
idea:
- product
- and
- multiply
- record type
- push on stack
inverse:
division: "%"
addition:
symbol: "+"
idea:
- sum
- or
- disjoint union
- enum
inverse:
subtraction: "-"

observation:
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^4.0.0-next.53",
"typedoc-plugin-merge-modules": "^5.1.0",
"typescript": "^5.4.5"
"typescript": "~5.5.4"
},
"dependencies": {
"blakejs": "1.2.1",
Expand Down
Loading

0 comments on commit 40329b4

Please sign in to comment.