Skip to main content

Module utils

Module utils 

Source

Modules§

serde_ark
Workaround for ark_ff failure to implement Serde, and Rust’s failure to allow us to implement it.
serde_ark_option
serde_ark_vec
serde_hex
Serde workaround to encode Vec<u8> as base64 strings in human-readable formats.
serde_jsonify
Serde workaround to encode types as JSON strings in non-human-readable formats.
sumcheck

Structs§

PrintAbi

Constants§

HALF
1/2 for the BN254

Functions§

batch_inverse_montgomery
Computes multiplicative inverses using Montgomery’s batch inversion trick.
human
Pretty print a float using SI-prefixes.
next_power_of_two
Calculates the degree of the next smallest power of two
noir_to_native
Convert a Noir field element to a native FieldElement
pad_to_power_of_two
Pads the vector with 0 so that the number of elements in the vector is a power of 2
uint_to_field
workload_size
Target single-thread workload size for T. Should ideally be a multiple of a cache line (64 bytes) and close to the L1 cache size (32 KB).