miden-core-lib 0.24.2

Miden VM core library
Documentation
1
2
3
4
5
6
7

## miden::core::sys
| Procedure | Description |
| ----------- | ------------- |
| truncate_stack | Removes elements deep in the stack until the depth of the stack is exactly 16. The elements<br />are removed in such a way that the top 16 elements of the stack remain unchanged. If the stack<br />would otherwise contain more than 16 elements at the end of execution, then adding a call to this<br />function at the end will reduce the size of the public inputs that are shared with the verifier.<br /><br />Input: Stack with 16 or more elements.<br />Output: Stack with only the original top 16 elements.<br /><br />Cycles: 17 + 11 * overflow_words, where `overflow_words` is the number of words needed to drop.<br /> |
| drop_stack_top | Drop 16 values from the stack.<br /> |
| log_precompile_request | Folds a precompile commitment into the rolling transcript via `log_precompile` and removes<br />the helper words produced by the instruction.<br /><br />Computes the per-call statement word `STMNT = Poseidon2::merge(COMM, TAG)` from the supplied<br />commitment halves, seats it at stack[4..8] (the HPERM rate1 lanes), and lets the underlying<br />`log_precompile` opcode fold it into the transcript state. Pads stack[0..4] and stack[8..12]<br />with zero words so the opcode's writes there don't clobber data deeper in the stack.<br /><br />Input: `[COMM, TAG, ...]`<br />Output: Stack with `COMM` and `TAG` consumed and the three helper words produced by<br />`log_precompile` dropped.<br /> |