Towards a concrete goal
In building Anoma there are many interesting things we may do to fulfill our goal of building a decentralized operating system. Further, we have chosen a strategy of successive prototypes to help achieve this goal, in doing so we place shorter term priorities of features over a holistic. Due to this we need to operate efficiently with what little time we do have to achieve both our long term and short term goals. This post lays out some concrete plans we have for Juvix that can fulfill our short term demands while meeting our long term dreams.
- I believe Juvix should prioritize:
- Continuing work on the RM backends for Nock, Cairo Etc.
- Focus on operating in Anoma on her terms.
- Focus on tooling when what we have is unacceptable for a certain task.
- General evolution of applications and various libraries to support people in this endeavor.
- I believe the following work has a lower priority due to short term constraints and less thought out plans on how we can practically leverage them:
- Juvix Core as a usable IR
- Lean verification of core programs
Out of the priorities only 1.2.
has been verbally communicated and should be written down as to why at length. the other items in section 1.
have already been mostly agreed upon and written up at length and thus deserve no extra special attention.
I believe we should also justify why topics in 2.
still matter but have a lower priority of focus.
On focusing on operating within Anoma on her terms
The general thesis of this topic is that Anoma is a live operating system, and that we should have Juvix integrated into her in a way that gives value to both Juvix and users who wish to utilize Juvix.
I believe the first major goal in this process is to have the Juvix interactive interpreter be fully integrated with the Chambers (Anoma Client). This is both high leverage and achievable.
The goal on the surface seems quite absurd and far fetched, after all Juvix is a static batch language, how can we integrate the Juvix interpreter which doesn’t even compile down!
The answer is that Anoma is a decent computing platform with the ability to save and interpret code, giving it an inherit advantage to make even “dead” languages “live”!
The requirements from Juvix are thus:
- Be able to provide units of code to be saved in storage
- Have the current interpreter loop talk to the Chambers (client) rather
We already want 1.
as this will drastically reduce the size of code needed to uploaded to the Court (Node) and Chambers (Client) by over 2 orders of magnitude (goes from 10-100KBS to an order of bytes) being a huge win for costs while also demonstrating that the node can effectively store user code. The unit
here would be a module, as we can effectively store each module as a nock core.
The only extra work will be be for 2.
, and I don’t believe this is too much effort, as if we have 1.
then it’s just a matter of having:
- Juvix initiate a full compilation cycle
- Juvix uploading to the Chambers (Client) via Juvix interop: Local environment flow
- Hashing the given compiled modules to effectively find where to reference them from within the interpreter.
- Have every interpreter send really do a grpc request to the client to evaluate some given nock.
We gain a lot from this, as we can have users do normal “data science” work within Juvix, I.E. grab all the resources of a certain kind and do analysis on it. Thus we can show that Anoma isn’t just “upload contracts”, but rather “here is an ecosystem that one can play around with”.
Since the major work for this is work we require in the short term, this ends up aligning both with our longer term vision and short term demands. I heard an estimate of the module compilation changes will take 1 month. Meaning that we can achieve this plan in a 3 month period depending on how busy we get with our other priorities. Further all these ideas are clear and easy to work through with teamwork on the engineering team.
Juvix Core as a usable IR and Lean verification of core programs
Juvix Core as a usable IR would let us store Juvix Core programs within the Court and Chambers. This is quite nice as this opens up the way to Lean verification of core programs
in that we can store the code online and show a proof that the compilation is done correctly and that one juvix program has many different binaries that can be deployed on various RM we have.
While the vision roughly makes sense, my objection for prioritization is two fold:
- The details of this plan are unknown to engineering and I believe specs.
- I’m not sure long term if Juvix Core is the IR we should store online.
- I’m not sure what doing this now with Juvix Core buys us.
The first reason makes it hard to realize within a short time frame as we need to understand the full process and tradeoffs that are made. Further architecture discussions will need to happen within Engineering to give a fully realized model and then discussions with Juvix will then happen. As this is a new flow and user experience that can be derived in system.
The second reason is an argument that Juvix, the compiler, is not in system in any way, it’s a foreign entity, so if we have core programs stored online, what does that give us? To the system it’s an opaque thing as we can’t operate on it. Thus if I wanted to say verify that the proof actually corresponds to the core program, I’d have to leave the dominion of Anoma and check it from outside, making the UX more painful and not realizing what we want in the long term. Thus I’d argue we’ll have to undo this work as I don’t think it makes sense with our long term plans.
The third argument is an argument from I’m unsure what it really buys us. Not uploading core programs doesn’t hurt much, we will already store juvix modules online (see the first item I say we should focus on) and will store cairo circuits online, in which case juvix when we compile her programs can just note it and link it without having to upload it every time. Meaning we lose no capabilities, just some convince and and UX that I believe to be under defined anyways. Thus I’d argue this is still an interesting concept to explore but currently is not well aligned enough with our long term goals nor thought out to satisfy short term demands.