tasm-lib

Crates.iotasm-lib
lib.rstasm-lib
version0.1.0
sourcesrc
created_at2023-07-06 12:41:35.492545
updated_at2023-07-06 12:41:35.492545
descriptionCode snippets for Triton VM assembly with tests and statistics.
homepage
repository
max_upload_size
id909815
size1,116,956
Jan Ferdinand Sauer (jan-ferdinand)

documentation

README

tasm-lib

This repository contains a collection of functions written in Triton VM assembly (tasm). The functions supplied here emulate the standard library of other programming languages: basic functions that are used a lot.

There are two big projects to be written in tasm. They are not contained in this repository. These projects are:

  • The consensus logic of Neptune
  • The recursive Triton VM STARK verifier (recufier)

This repository helps to benchmark snippets written in tasm in order to gauge the complexity of the (Triton VM) prover.

Please place code in the appropriate directories, or create them if non-existent.

Conventions

U64

A u64 type is stored on the stack as two u32 elements that Triton VM provides native support for. A u64 is stored with the least significant part on top of the stack and the most significant part below it. So if the least significant part is st0, then the most significant part is stored in st1.

Authentication Paths from Secret In

1st element is a length indicator that specifies the authentication path length in number of digests. The length indicator must be a valid u32. Then follows the digests. The digests are ordered as: [digest_0_element_4,digest_0_element_3, digest_0_element_2, digest_0_element_1, digest_0_element_0, digest_1_element_4, digest_1_element_3 ... ].

Runtimes

Runtimes are printed in the JSON files in the benchmarks directory. These are generated by tests labeled as benchmark. If you manage to lower any of the numbers by changing a TASM snippet, please make a pull request, so we can get more efficient algorithms :)

Commit count: 0

cargo fmt