Skip to main content

interleaved_encode_batch

Function interleaved_encode_batch 

Source
pub fn interleaved_encode_batch<F: ButterflyField>(
    columns: &[F],
    log_message: usize,
    log_inv_rate: usize,
) -> RowMajorMatrix<F>
Expand description

Reed–Solomon encode a message held one folding column at a time.

§Overview

A commitment that folds f variables at a time opens whole folding blocks at once. Its codeword is therefore a matrix of 2^f columns, one row per domain point.

A prover holds the opposite layout, with each column’s coefficients contiguous. That is what binding a prefix of the variables leaves behind.

Bringing the two layouts together as a pass of its own writes the message once more.

The transform this hands the result to skips the layers that cross the padding. So the interleaving rides along with a copy that has to happen anyway.

§Arguments

  • columns: the message’s columns back to back, each 2^log_message values long.
  • log_message: base-two logarithm of the values one column holds.
  • log_inv_rate: dimensions added to the message’s own domain.

§Returns

One row per domain point, holding every column’s value at that point.

§Panics

Panics if there is no column, or if the values do not divide into whole columns. Panics if the extended domain exceeds the bit width of the level.

Panics if the codeword length overflows the address space.