Previously, the log function is to print out the compilation info, such as the type of a variable.
This update is to make it print out the witness value instead, which is more useful for debugging purpose.
For example:
fn mimc7_hash(values: [Field; LEN], key: Field) -> Field {
// Initialize with the key.
let mut res = key;
// Iterate over each value in the input array.
for value in values {
// Update the result with the MIMC hash of the value and the current result.
res = res + (value + mimc7_cipher(value, res));
log(res);
}
// Return the final accumulated result.
return res;
}
Currently it only support logging Field type. These info is rough still.
Later we can make it print out more meta data, such as which file the span belonging to and what type of the var etc.
Previously, the log function is to print out the compilation info, such as the type of a variable.
This update is to make it print out the witness value instead, which is more useful for debugging purpose.
For example:
It will print out:
Currently it only support logging Field type. These info is rough still. Later we can make it print out more meta data, such as which file the span belonging to and what type of the var etc.