Crate miden_test_utils

Source

Re-exports§

pub use proptest;

Modules§

collections
crypto
host
math
rand
serde

Macros§

assert_assembler_diagnostic
assert_diagnostic_lines
Like assembly::assert_diagnostic, but matches each non-empty line of the rendered output to a corresponding pattern.
assert_eq
Asserts that two expressions are equal to each other (using PartialEq).
assert_ne
Asserts that two expressions are not equal to each other (using PartialEq).
assert_str_eq
Asserts that two expressions are equal to each other (using PartialEq).
build_debug_test
Returns a Test struct in debug mode from the provided source string and any specified stack and advice inputs.
build_op_test
Returns a Test struct in non debug mode from a string of one or more operations and any specified stack and advice inputs.
build_test
Returns a Test struct in non debug mode from the provided source string, and any specified stack and advice inputs.
build_test_by_mode
Returns a Test struct in the specified debug or non-debug mode using the provided source string and any specified stack and advice inputs.
expect_assembly_error
Asserts that running the given assembler test will result in the expected error.
expect_exec_error_matches
Asserts that running the given execution test will result in the expected error.

Structs§

AdviceInputs
ContextId
Represents the ID of an execution context
ExecutionOptions
A set of parameters specifying execution parameters of the VM.
ExecutionTrace
Execution trace which is generated when a program is executed on the VM.
Felt
Represents base field element in the field using Montgomery representation.
LibraryPath
Path to a module or a procedure.
MemAdviceProvider
An in-memory [AdviceProvider] implementation which uses BTreeMaps as its backing storage.
MerkleTreeVC
A fully-balanced Merkle tree.
Process
ProvingOptions
A set of parameters specifying how Miden VM execution proofs are to be generated.
Report
Core Diagnostic wrapper type.
SourceFile
A SourceFile represents a single file stored in a super::SourceManager
StackInputs
Defines the initial state of the VM’s operand stack.
StackOutputs
Output container for Miden VM programs.
Test
This is a container for the data required to run tests, which allows for running several different types of tests.
VmStateIterator
Iterator that iterates through vm state at each step of the execution.

Enums§

AcceptableOptions
ExecutionError
ProcessState
VerifierError
Represents an error returned by the verifier during an execution of the protocol.

Constants§

EMPTY_WORD
Array of field elements representing word of ZEROs in the Miden base field.
MIN_STACK_DEPTH
Represents:
ONE
Field element representing ONE in the Miden base filed.
STATE_WIDTH
Number of field element needed to represent the sponge state for the hash function.
TRUNCATE_STACK_PROC
A source code of the truncate_stack procedure.
U32_BOUND
A value just over what a u32 integer can hold.
WORD_SIZE
Number of field elements in a word.
ZERO
Field element representing ZERO in the Miden base filed.

Traits§

AdviceProvider
Defines behavior of an advice provider.
FieldElement
Defines an element in a finite field.
IntoBytes
SourceManager
StarkField
Defines an element in a STARK-friendly finite field.
ToElements

Functions§

build_expected_hash
build_expected_perm
Given a hasher state, perform one permutation.
felt_slice_to_ints
Converts a slice of Felts into a vector of u64 values.
group_slice_elements
Transmutes a slice of n elements into a slice of n / N elements, each of which is an array of N elements.
hash_elements
Returns a hash of the provided list of field elements.
prop_randw
A proptest strategy for generating a random word with 4 values of type T.
prove
Executes and proves the specified program and returns the result together with a STARK-based proof of the program’s execution.
push_inputs
resize_to_min_stack_depth
verify
Returns the security level of the proof if the specified program was executed correctly against the specified inputs and outputs.

Type Aliases§

QuadFelt
Word
A group of four field elements in the Miden base field.

Attribute Macros§

test_case
Generates tests for given set of data