Triton VM <p>Triton VM is a STARK engine, featuring a virtual machine, a prover, and a verifier.</p> https://talk.neptune.cash/inn/2 2024-08-10T03:57:58+00:00 Futhark Port and Introduction holindauer 2024-08-10 2024-08-10 19 <p>Hello,</p> <p>My name is Hunter. I am an undergrad from Seattle. I’ve been in communication with Thorkil about porting the stark prover from rust to futhark so it can run on the GPU. </p> <p>Of which I have been developing in this fork: https://github.com/Holindauer/ruthark</p> <p>Currently, I’m starting by porting over the building blocks needed for this task. At the moment, I have ported the Tip5 hash_pair() and hash_10() functions from twenty-first. With my next immediate moves being to tackle BFieldCodec.rs and merkle_tree.rs. </p> <p>Additionally, I was wondering where I would find the polynomial and low degree extension logic within the codebase. And if there is any general advice regarding what order to port different components over in. </p> <p>Good to meet you all, -Hunter</p> Scripting language chancehudson 2024-08-14 2024-08-14 20 <p>Hi, my name is Chance and I work on the privacy and scaling explorations team at the EF. I’ve been looking for a solid STARK proving system for a while and I think TritonVM is probably the most advanced/well built STARK based zkvm out right now.</p> <p>To use this vm I have been designing a simple scripting language to express mathematical relationships. I’m trying to take learnings from pain points in circom, the simplicity of javascript, and the safety/usability of rust. I’ve held off on sharing this for a while because I wasn’t sure if the language could be better than writing raw assembly, but I’m now confident that it can be.</p> <p>One important feature of this language (<code>ashlang</code>) is that each file is a distinct function. The function name is the file stem. This made it easy to assemble files that are written in different languages. In an ashlang project functions can be written either in ashlang, or tasm. Ashlang functions can call tasm functions, and tasm functions can call ashlang functions, provided they manually manipulate the stack in the correct way.</p> <p>I had significant doubts about my ability to write an assembler that can produce tasm that is as efficient as handwrittem tasm, but it turns out these doubts are almost irrelevant. Ashlang can be used to manage the control flow and write the high level structure, then specific functions can be implemented efficiently using tasm.</p> <p>To achieve this tasm source files specify a function signature as the first non-whitespace line. This allows the assembler to statically analyze the program and confirm that the tasm function calls are being passed the correct arguments. You can see an example of this in the <a href="https://github.com/chancehudson/ashlang/blob/chacha/stdlib/u32/shlc.tasm" rel="noopener noreferrer">shift left circular implementation</a>. This function accepts two scalars and returns a single scalar.</p> <p>The language still has some oddities with argument handling and return types. Specifically the arguments are reversed on the stack during calls (so to execute <code>lt</code> a <code>swap 1</code> is necessary), and an extra argument is always passed to account for the case of a function returning a memory based variable. Both of these are simple changes that can be addressed immediately.</p> <p>You can see the larger standard library <a href="https://github.com/chancehudson/ashlang/tree/chacha/stdlib" rel="noopener noreferrer">here</a> there are some example programs in the <code>test-vectors</code> directory in that repo as well. My immediate next steps are refactoring out some debt and fixing the issues i described above. After that I’m planning to make a STARK proof where a user decrypts data, operates on the data, and re-encrypts it (using chacha).</p> <p>I’d love to get feedback from the team. I imagine learnings from the <code>tasm-lib</code> would be almost directly applicable. I’d also like to make the language useful to the team if possible.</p> <p>Thanks</p> announcing Triton VM v0.40.0 jfs 2024-04-16 2024-04-16 17 <p><a href="https://github.com/TritonVM/triton-vm/releases/tag/v0.40.0" rel="noopener noreferrer">Triton VM v0.40.0</a> is now live. The main highlights are:</p> <h1>Performance</h1> <p>This release fixes a previously unknown performance bottleneck when proving programs that perform a lot of RAM I/O. One such program is Triton VM’s very own recursive verifier, making this performance boost mission critical.</p> <p>As another perfomance highlight, Triton VM now consumes considerably less RAM when proving the correct execution of a program.</p> <h1>Profiling</h1> <p>The profiler for Triton assembly programs now reports not only the clock cycle contribution of any encountered subroutine, but the contribution to any of parts critical for prover performance. On any Triton VM program, you can execute <code>.profile()</code> to get the new report. The <code>Display</code> implementation of that report gives you a markdown table listing all the new goodies.</p> <h1>Full Changelog</h1> <h3>✨ Features</h3> <ul> <li>(!) Generate profiles despite unfinished tasks (<a href="https://github.com/TritonVM/triton-vm/commit/f7ebd2cb" rel="noopener noreferrer">f7ebd2cb</a>)</li> <li>(!) Streamline accessing AET’s heights (<a href="https://github.com/TritonVM/triton-vm/commit/3f3a9fd1" rel="noopener noreferrer">3f3a9fd1</a>)</li> <li>(!) Track all relevant tables in VM profiler (<a href="https://github.com/TritonVM/triton-vm/commit/fa38fa8b" rel="noopener noreferrer">fa38fa8b</a>)</li> </ul> <h3>🐛 Bug Fixes</h3> <ul> <li>(!) Don’t treat randomizer polynomial special (<a href="https://github.com/TritonVM/triton-vm/commit/9bbe963b" rel="noopener noreferrer">9bbe963b</a>)</li> </ul> <h3>⚡️ Performance</h3> <ul> <li>Minimize squeezes for combination weights (<a href="https://github.com/TritonVM/triton-vm/commit/50b803c7" rel="noopener noreferrer">50b803c7</a>)</li> <li>Re-organize prover steps (<a href="https://github.com/TritonVM/triton-vm/commit/86a7799f" rel="noopener noreferrer">86a7799f</a>)</li> <li><em>(test)</em> Use minimal size for quotient domain (<a href="https://github.com/TritonVM/triton-vm/commit/727ff8ec" rel="noopener noreferrer">727ff8ec</a>)</li> <li>Use faster polynomial coset evaluation (<a href="https://github.com/TritonVM/triton-vm/commit/29849abe" rel="noopener noreferrer">29849abe</a>)</li> <li>Compute Bézout coefficients faster (<a href="https://github.com/TritonVM/triton-vm/commit/652b7e9c" rel="noopener noreferrer">652b7e9c</a>)</li> </ul> <h3>📚 Documentation</h3> <ul> <li>Add rationale for performed DEEP updates (<a href="https://github.com/TritonVM/triton-vm/commit/74814884" rel="noopener noreferrer">74814884</a>)</li> <li>Update documentation of <code>MasterTable</code> (<a href="https://github.com/TritonVM/triton-vm/commit/d5c2049c" rel="noopener noreferrer">d5c2049c</a>)</li> <li>Describe computation of Bézout coefficients (<a href="https://github.com/TritonVM/triton-vm/commit/06123843" rel="noopener noreferrer">06123843</a>)</li> </ul> <h3>⚙️ Miscellaneous</h3> <ul> <li>Use fewer glob <code>use</code>s (<a href="https://github.com/TritonVM/triton-vm/commit/9ca39513" rel="noopener noreferrer">9ca39513</a>)</li> <li>(!) <em>(circuit)</em> Use challenge’s index (<a href="https://github.com/TritonVM/triton-vm/commit/e05e3ff3" rel="noopener noreferrer">e05e3ff3</a>)</li> <li>(!) <em>(circuit)</em> No <code>Challenges</code> in <code>evaluate</code> (<a href="https://github.com/TritonVM/triton-vm/commit/15a8cd7f" rel="noopener noreferrer">15a8cd7f</a>)</li> <li>Use constant “lookup table height” more (<a href="https://github.com/TritonVM/triton-vm/commit/22834b03" rel="noopener noreferrer">22834b03</a>)</li> <li>Benchmark Bézout coefficient computation (<a href="https://github.com/TritonVM/triton-vm/commit/ab135be4" rel="noopener noreferrer">ab135be4</a>)</li> </ul> <h3>♻️ Refactor</h3> <ul> <li>Deprecate method <code>num_quotients()</code> (<a href="https://github.com/TritonVM/triton-vm/commit/363ae773" rel="noopener noreferrer">363ae773</a>)</li> <li>(!) Use <code>BFieldElement</code>s everywhere (<a href="https://github.com/TritonVM/triton-vm/commit/05bd271a" rel="noopener noreferrer">05bd271a</a>)</li> <li>(!) Make <code>ProofStream</code> non-generic (<a href="https://github.com/TritonVM/triton-vm/commit/bde928d4" rel="noopener noreferrer">bde928d4</a>)</li> <li>(!) Remove deprecated type aliases (<a href="https://github.com/TritonVM/triton-vm/commit/14d08ef8" rel="noopener noreferrer">14d08ef8</a>)</li> <li>(!) Rename <code>TableId</code> variants (<a href="https://github.com/TritonVM/triton-vm/commit/c265cf4d" rel="noopener noreferrer">c265cf4d</a>)</li> <li>Bypass quotient table (<a href="https://github.com/TritonVM/triton-vm/commit/ff305459" rel="noopener noreferrer">ff305459</a>)</li> </ul> <h3>✅ Testing</h3> <ul> <li>Benchmark program with lots of memory I/O (<a href="https://github.com/TritonVM/triton-vm/commit/c7613878" rel="noopener noreferrer">c7613878</a>)</li> </ul> <h3>🎨 Styling</h3> <ul> <li>Improve readability of <code>.verify()</code> slightly (<a href="https://github.com/TritonVM/triton-vm/commit/e0ac1096" rel="noopener noreferrer">e0ac1096</a>)</li> </ul> announcing Triton VM v0.33.0 jfs 2023-08-10 2023-08-10 4 <p><a href="https://github.com/TritonVM/triton-vm/releases/tag/v0.33.0" rel="noopener noreferrer">Triton VM v0.33.0</a> is now live. The main highlights are:</p> <h3>Non-deterministic Initialization of RAM</h3> <p>In all prior versions, the only way for programs to receive input was through public or secret input, i.e. using instructions <code>read_io</code>, <code>divine</code>, or <code>divine_sibling</code>. As of this version, RAM can be initialized before Triton VM starts execution. This means that elements that <em>might</em> need to be processed don’t waste precious clock cycles if they don’t end up being processed, as they can happily live in RAM without ever being read.</p> <p>In future versions of Triton VM, non-deterministic RAM initialization might also be useful to place objects in RAM that depend on the current state of the VM. The zero-knowledge proof system already supports this behavior.</p> <h3>Improved Speed</h3> <p>Through changes to the proof system, better use of parallelization, and more efficient initialization of certain memory objects, the speed of the VM has increased noticeably. Depending on the hardware, the speedup factor should lie somewhere between 3 and 4 compared to the previous version, and almost 10 compared to the version that shipped with the initial release of Neptune’s alphanet.</p>