This commit is contained in:
Robin Salen 2023-09-18 09:59:48 -04:00
parent 5a1b05acfb
commit c4be838af4
No known key found for this signature in database
GPG Key ID: FB87BACFB3CB2007
2 changed files with 9 additions and 5 deletions

View File

@ -905,7 +905,9 @@ where
&self.root.public_values,
&all_proof.public_values,
)
.map_err(|_| anyhow::Error::msg("Invalid conversion when setting public_values target."))?;
.map_err(|_| {
anyhow::Error::msg("Invalid conversion when setting public values targets.")
})?;
let root_proof = self.root.circuit.prove(root_inputs)?;
@ -944,7 +946,9 @@ where
&self.aggregation.public_values,
&public_values,
)
.map_err(|_| anyhow::Error::msg("Invalid conversion when setting public values target."))?;
.map_err(|_| {
anyhow::Error::msg("Invalid conversion when setting public values targets.")
})?;
let aggregation_proof = self.aggregation.circuit.prove(agg_inputs)?;
Ok((aggregation_proof, public_values))
@ -1005,7 +1009,7 @@ where
set_public_value_targets(&mut block_inputs, &self.block.public_values, &public_values)
.map_err(|_| {
anyhow::Error::msg("Invalid conversion when setting public values target.")
anyhow::Error::msg("Invalid conversion when setting public values targets.")
})?;
let block_proof = self.block.circuit.prove(block_inputs)?;

View File

@ -48,7 +48,7 @@ pub fn trace_rows_to_poly_values<F: Field, const COLUMNS: usize>(
}
/// Returns the lowest LE 32-bit limb of a `U256` as a field element,
/// and errors in case the integer is actually greater.
/// and errors if the integer is actually greater.
pub(crate) fn u256_lowest_limb<F: Field>(u256: U256) -> Result<F, ProgramError> {
if TryInto::<u32>::try_into(u256).is_err() {
return Err(ProgramError::IntegerTooLarge);
@ -58,7 +58,7 @@ pub(crate) fn u256_lowest_limb<F: Field>(u256: U256) -> Result<F, ProgramError>
}
/// Returns the lowest LE 64-bit word of a `U256` as two field elements
/// each storing a 32-bit limb, and errors in case the integer is actually greater.
/// each storing a 32-bit limb, and errors if the integer is actually greater.
pub(crate) fn u256_lowest_word<F: Field>(u256: U256) -> Result<(F, F), ProgramError> {
if TryInto::<u64>::try_into(u256).is_err() {
return Err(ProgramError::IntegerTooLarge);