Skip to content

Blob batching can be optimized with evaluate_linear_expression #15775

Closed

Description

@TomAFrench

I noticed that we are doing naive addition and multiplication here:

y_acc: self.y_acc.add(other.y_i.mul(self.gamma_pow_acc)),
c_acc: self.c_acc.add(other.c_i.point.mul(BLS12_381Scalar::from_bignum(
self.gamma_pow_acc,
))),

This can be optimized by using the evaluate_linear_expression function in bigcurve to reduce the amount of constraining we're doing here.

https://github.com/noir-lang/noir_bigcurve/blob/54de613621018cd5e775b8a899c7e40013cda3f7/src/lib.nr#L67-L71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-protocol-circuitsComponent: Protocol circuits (kernel & rollup)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions