In August 2022, Sin7y released the
We are excited to make the following announcements:
We have preliminarily completed the PoC of OlaVM, and you can check the relevant engineering implementation and related document design through
We have completed the initial design and implementation of the custom smart contract language Ola-lang, and you can check the related engineering design and related document design through
We have initially completed the integration of Olang into the developer-friendly IDE: Visual Studio Code, allowing developers to write Olang programs on VSCode and then execute proof generation and proof verification processes. You can view the operation tutorial through
And some adjustments:
The project name was officially adjusted from OlaVM to Ola. OlaVM will be a key module in Ola, and other modules include smart contract language Ola-lang, Ola-compiler, Ola-sequencer, etc.
The project goal is expanded from programmable scalability to programmable scalability and privacy. We believe that programmable scalability and privacy will be the next important features of Ethereum and even the blockchain industry.
OlaVM is one of the most significant modules in the Ola system. Whether in a public or private scene, the main function of OlaVM is to execute programs and generate execution traces and valid proofs. Therefore, in order to have a high throughput rate for the entire Ola system, the efficiency of the OlaVM module is very crucial, requiring fast program execution, fast execution trace generation, and most importantly, fast proof generation.
In order to generate proofs quickly, OlaVM must be designed as zk-friendly as possible and involve:
Instruction Set Architecture (ISA) Design
Finite Field Selection
Builtins, referring to predefined calculations that could not be proven efficiently by splitting into CPU instructions
Prophets, referring to nondeterministic calculations that are inefficient to prove but can be verified efficiently.
OlaVM adopted the RISC (Reduce Instruction Set Computer) architecture, which features a small number of instructions, as opposed to the CISC (Complex Instruction Set Computer) architecture. For a detailed comparison between the RISC and CISC architectures, please refer to
Secondly, the frequency of instruction is used. If it is based on the CISC design, more instructions may lead to partial failure in most computing scenarios Instructions are idle or used in a small amount, but the constraints related to these instructions still exist in the entire constraint system, increasing the workload of proof without reason, which returns to the problem mentioned in the first point.
Similar to
For some special simple calculations, when you want to constrain it, you would find that the constraints are very heavy, such as bitwise operations, and keccak calculations that contain a large number of bitwise operations. As the execution trace table has an upper limit in size, the fewer rows occupied by a single execution, the more executions are included in this table.
Therefore, for the zk-unfriendly calculations involved in the transaction execution logic, it needs to be put into a separate table to verify the correctness. This is the idea behind the builtins design. Since we need to identify which data in the trace is consistent with the corresponding builtins, we need to add an additional selector to enable it. OlaVM currently supports bitwise, range check, and comparison builtins. Other builtin types, such as hash, ecdsa, etc., will be supported in the near future.
A great advantage of customized zkVM is that zk-friendly can be applied in any component of the system. The above-mentioned design points are related to the design of the OlaVM itself, and the prophets will be integrated into Ola-complier. For example, it is necessary to set a special write-once memory segment in OlaVM and judge whether it is a prophet code segment when allocating compiler memory.
Here is an example of how the prophet plays its role. If the prover wants to prove "I know the square root of the number y is x", for most virtual machines, since there is no instruction or builtin corresponding to the square function, it can only be realized with virtual machine instructions, and then to generate a proof, since the logic of this calculation is complex, it will increase the workload of the prover.
Fortunately, the verification of this calculation is simple, for example, you only need to introduce two logics: x * x = y. rangecheck(x). This is where prophets come into play. It is like a "prophet" that helps you calculate the results of the current calculation. Then, you only need to introduce the verification logic described above into the program. Figure 1 shows the theoretical performance of different processing methods for the processing of nondeterministic calculations.
It is worth noting that there are essential differences between prophets and builtins.
The verification logic of prophets is in the program while the verification logic of builtins is a circuit.
The prophets will only add a few complexities for prover while the increase of prover complexities by builtins will be much larger.
Finally, the types of calculations solved by the two are also different. Prophets solve nondeterministic calculations, while builtins solve zk-unfriendly calculations.
For more design details, please refer to the
Ola-lang is a high-level language for implementing smart contracts. From the outset, it is designed to be a zk-friendly programming language. It is influenced by Solidity and Rust. It is very easy for developers familiar with these languages to get started as it is statically typed and supports complex user-defined types among other features. With Ola-lang, you can create contracts for a variety of uses.
Security: The results of the program executions are deterministic, declared at the language level/syntax, and guaranteed at the compiler level.
Efficiency: The speed of execution and proof of the program is well balanced to be efficient.
Universal: Easy to use and readable code, it is developer friendly with minimal learning thresholds for developers familiar with mainstream programming languages such as C++/Rust, to quickly get into writing arithmetic programs.
Turing complete: Ola-lang can be used for complex programs such as loops, recursion, etc.
Ola-lang natively supports field operations and plans to support u32, u64, and u256 types based on field elements.
It supports compiling smart contracts to LLVM IR as well as custom IR, which allows the compiler to be separated from the front and back ends for easier optimization.
it supports Prophets, which makes it easy to verify some NP-liked calculations.
it supports Builtins, which makes it easy to deal with zk-unfriendly computation.
it is based on solidity's syntax and the way contracts are written (Solidity's front end may be supported at a later stage.)
The Ola compiler introduces LLVM-IR as the middle end of the compilation, which makes it possible to separate the front and back ends of the compilation and optimize them as much as possible. The architecture of the Ola compiler is shown in the following diagram.
Features |
Status |
---|---|
Simple computation logic |
Completed |
Function calls |
Completed |
U32, U64, U256 libs |
Ongoing |
For Loop, Global variable ... |
Ongoing |
Storage |
Ongoing |
Full-featured Assembler |
Ongoing |
Full-featured LLVM |
Not started |
Builtins |
Not started |
Prophets |
Not started |
Table 1: The Road to Full-Featured OlaVM
In addition to the milestone design above, there are more details that need to be refined. See the
Sin7y Labs is seeking talented and driven individuals to join our team as developers and local ambassadors/community managers. We offer a dynamic and tech-centered work environment, competitive salary and benefits, and opportunities for career growth and development. If you're interested in being a part of a leading technology company and have a passion for zero-knowledge technology, we'd love to hear from you.
To apply, please write to [email protected] and submit your resume and a cover letter outlining your qualifications and interest in the role. Join the
Founded in 2021 and powered by top-notch blockchain developers, Sin7y is a project incubator and blockchain technology research team that explores the most important and cutting-edge technologies, including EVM, Layer2, cross-chain, privacy computing, autonomous payment solutions, etc. We are currently building Ola, a one-stop platform bolstering the Ethereum ecosystem with programmable privacy, programmable scalability, and developer compatibility. If you are interested in talking with us, feel free to join our Discord server or email us at [email protected].