announcing Triton VM v0.35.0

โš“ Neptune    ๐Ÿ“… 2023-10-17    ๐Ÿ‘ค jfs    ๐Ÿ‘๏ธ 1121      

jfs

Warning

This post was published 411 days ago. The infomation described in this article may have changed.

Triton VM v0.35.0 is now live. The main highlights are:

Simpler Sponge Initialization

Up until now, the only way to initialize the Sponge for hashing input of variable length was to use instruction absorb_init. As the name suggests, this instruction not only initializes the Spongeโ€™s state, it also absorbs the stackโ€™s top ten elements. As of this version, this behavior is completely de-coupled: new instruction sponge_init initializes the Sponge state, (existing but renamed) instruction sponge_absorb does the absorbing.

This has immediate runtime effects for the programs that are necessary for Neptune, speeding up variable length hashing by around 16%.

Debug Symbols

As the logic of the programs written for Triton VM grows more complex, debugging options become more important. As of this version, the parser understands the break command. Normal program execution is not affected. While this debugging information is not used yet, the added support makes building a full fledged debugger a lot easier.

Full Changelog

Note: (!) indicates a breaking change.

โœจ Features

  • Better error reporting for failing assert_vector (ee83ab6d)
  • Include debug information when printing Program (d11aa541)
  • (!) Replace instruction absorb_init with sponge_init (aca87471)
  • (!) Add debug instruction break (df6dc4b5)

๐Ÿ› Bug Fixes

  • (!) Use Copy-trait of StarkParameters (70f3d957)
  • Linter v1.73.0 warnings (641ed393)
  • Print all helper variables and Sponge state of VM state (07a54f6e)
  • Disallow changing argument of swap to 0 (bcf61ee6)

๐Ÿ“ Documentation

  • Adapt constraints to new instruction sponge_init (cde031f0)
  • Program and its new methods (5ff137dc)
  • Align specification to code (86a501ea)
  • Delete cheatsheet (e8a5b526)

๐Ÿ”ง Miscellaneous

  • (!) Rename instruction div to div_mod (c3ad923a)
  • Reduce number of as castings (540cf66f)
  • Remove unused impl Display for InstructionToken (1550f8de)
  • Ignore JetBrains IDEโ€™s config files (ddf9e7ad)

โ™ป๏ธ Refactor

  • (!) Move padded_height() into AET (f88d94f3)
  • Store debug information address_to_label in Program (d857e838)
  • Improve readability of Program decoding (e3741d68)
  • Extract VM profiling logic into VMProfiler (97ecef8d)

โœ… Testing

  • Lower number of test cases for some FRI tests (0159a688)
  • Print error of failing assert_vector (9bcdac2d)
  • Separate success and failure of ensure_eq (86b97993)
  • Improve property testing of Sponge instructions (e3d90b8e)
  • Edge case when last Hash Table row is sponge_init (f5f64963)
  • Too many returns crash VM, not VMProfiler (a109b890)
๐Ÿท๏ธ release ๐Ÿท๏ธ triton-vm