Skip to content

FRI: decode with shards and positions instead of blocks

i'm building the CLI and it's basically impossible to create a fri::Block with a dummy proof and commitment, which are not used in fri::decode...

this MR changes the signature of fri::decode from

pub fn decode<F: PrimeField, H: Hasher>(blocks: Vec<Block<F, H>>, n: usize) -> Vec<u8>

to

pub fn decode<F: PrimeField>(
    shards: Vec<fec::Shard<F>>,
    positions: Vec<usize>,
    n: usize,
) -> Vec<u8>

Note

all tests, examples and benchmarks have been fixed accordingly

Important

this introduces extra .clone

Edited by STEVAN Antoine

Merge request reports

Loading