announcing Triton VM v0.35.0
โ Neptune ๐ 2023-10-17 ๐ค jfs ๐๏ธ 1555Triton 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_initwithsponge_init(aca87471) - (!) Add debug instruction
break(df6dc4b5)
๐ Bug Fixes
- (!) Use
Copy-trait ofStarkParameters(70f3d957) - Linter v1.73.0 warnings (641ed393)
- Print all helper variables and Sponge state of VM state (07a54f6e)
- Disallow changing argument of
swapto 0 (bcf61ee6)
๐ Documentation
- Adapt constraints to new instruction
sponge_init(cde031f0) Programand its new methods (5ff137dc)- Align specification to code (86a501ea)
- Delete cheatsheet (e8a5b526)
๐ง Miscellaneous
- (!) Rename instruction
divtodiv_mod(c3ad923a) - Reduce number of
ascastings (540cf66f) - Remove unused
impl Display for InstructionToken(1550f8de) - Ignore JetBrains IDEโs config files (ddf9e7ad)
โป๏ธ Refactor
- (!) Move
padded_height()intoAET(f88d94f3) - Store debug information
address_to_labelinProgram(d857e838) - Improve readability of
Programdecoding (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)
