-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #992 from 0xPolygonMiden/tohrnii-nested-modules
feat: add support for nested modules
- Loading branch information
Showing
6 changed files
with
63 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use.std::crypto::stark::verifier | ||
|
||
#! Verify a STARK proof attesting to the correct execution of a program in the Miden VM. | ||
#! The following simplifying assumptions are currently made: | ||
#! - The blowup is set to 8. | ||
#! - The maximal allowed degree of the remainder polynomial is 7. | ||
#! - Only the input and output stacks, assumed of fixed size equal to 16, are handled in regards | ||
#! to public inputs. | ||
#! - There are two trace segments, main and auxiliary. It is assumed that the main trace segment | ||
#! is 73 columns wide while the auxiliary trace segment is 9 columns wide. | ||
#! - The OOD evaluation frame is composed of two interleaved rows, current and next, each composed | ||
#! of 73 elements representing the main trace portion and 9 elements for the auxiliary trace one. | ||
#! - To boost soundness, the protocol is run on a quadratic extension field and this means that | ||
#! the OOD evaluation frame is composed of elements in a quadratic extension field i.e. tuples. | ||
#! Similarly, elements of the auxiliary trace are quadratic extension field elements. | ||
#! - The following procedure makes use of global memory address beyond 3 * 2^30 and these are | ||
#! defined in `constants.masm`. | ||
#! | ||
#! Input: [log(trace_length), num_queries, log(blowup), grinding] | ||
#! Output: [] | ||
#! Cycles: | ||
#! 1- Remainder codeword size 32: | ||
#! 5000 + num_queries * (40 + num_fri_layers * 76 + 26 + 463) + 83 * num_fri_layers + 10 * log(trace_length) + 1633 | ||
#! 2- Remainder codeword size 64: | ||
#! 5000 + num_queries * (40 + num_fri_layers * 76 + 26 + 463) + 83 * num_fri_layers + 10 * log(trace_length) + 3109 | ||
export.verifier::verify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
## std::crypto::stark | ||
| Procedure | Description | | ||
| ----------- | ------------- | | ||
| verify | Verify a STARK proof attesting to the correct execution of a program in the Miden VM.<br /><br />The following simplifying assumptions are currently made:<br /><br />- The blowup is set to 8.<br /><br />- The maximal allowed degree of the remainder polynomial is 7.<br /><br />- Only the input and output stacks, assumed of fixed size equal to 16, are handled in regards<br /><br />to public inputs.<br /><br />- There are two trace segments, main and auxiliary. It is assumed that the main trace segment<br /><br />is 73 columns wide while the auxiliary trace segment is 9 columns wide.<br /><br />- The OOD evaluation frame is composed of two interleaved rows, current and next, each composed<br /><br />of 73 elements representing the main trace portion and 9 elements for the auxiliary trace one.<br /><br />- To boost soundness, the protocol is run on a quadratic extension field and this means that<br /><br />the OOD evaluation frame is composed of elements in a quadratic extension field i.e. tuples.<br /><br />Similarly, elements of the auxiliary trace are quadratic extension field elements.<br /><br />- The following procedure makes use of global memory address beyond 3 * 2^30 and these are<br /><br />defined in `constants.masm`.<br /><br />Input: [log(trace_length), num_queries, log(blowup), grinding]<br /><br />Output: []<br /><br />Cycles:<br /><br />1- Remainder codeword size 32:<br /><br />5000 + num_queries * (40 + num_fri_layers * 76 + 26 + 463) + 83 * num_fri_layers + 10 * log(trace_length) + 1633<br /><br />2- Remainder codeword size 64:<br /><br />5000 + num_queries * (40 + num_fri_layers * 76 + 26 + 463) + 83 * num_fri_layers + 10 * log(trace_length) + 3109 | |