Assessment reports>Universal Proof Aggregator>Informational findings>Method ,instances, of ,AssignedBatchEntries, does not follow specification
Category: Code Maturity

Method instances of AssignedBatchEntries does not follow specification

Informational Severity
Informational Impact
N/A Likelihood

Description

In circuits/src/batch_verify/universal/chip.rs, the struct AssignedBatchEntries has the following method implemented:

/// Returns the instances, consuming `self`.
pub fn instance(self) -> Vec<AssignedValue<F>> {
    self.0
        .into_iter()
        .flat_map(|entry| {
            once(entry.len).chain(entry.public_inputs.into_iter())
        })
        .collect()
}

This only returns the lengths of the public inputs and the public inputs themselves. From the description and specification for the universal batch verifier, it would be expected that circuit IDs are also returned.

Impact

In the reviewed in-scope codebase, this method is unused, so there is no impact. Deviation from the specification could cause mistakes after future code changes, however.

Recommendations

We recommend to change the implementation to return the public instances of the universal batch verifier as specified, or alternatively remove this function.

Remediation

This issue has been acknowledged by Nebra, and a fix was implemented in commit 59df2dc3.

Zellic © 2024Back to top ↑