fix typos and improve algebra/semi_avid tests
mainly fixes a few typos and improves algebra and semi_avid tests
changelog
- fix some typos and notes in the documentation
- test more cases for
algebra::split_data_into_field_elementsandalgebra::merge_elements_into_bytes, more data lengths and more modulus respectively - remove a useless
::<Vec<_>>on acollectinfec -
semi_avid::tests- refactor
bls12-381into a constant - write an "attack" function to alter a particular block,
attack<F, G>(block: Block<F, G>, c: usize, base: u128, pow: u64) -> Block<F, G> - pass a list of attacks, i.e.
attacks: Vec<(usize, usize, u128, u64)>, toverify_with_errors_template, use the same as the previous hardcoded one - pass a list of "recodings", i.e.
recodings: Vec<Vec<usize>>, toverify_recoding_templateand assert the number of blocks, e.g.vec![vec![2, 3], vec![3, 5]]means that recoding 2 and 3 together should verify, and same with 3 and 5, and also that there must be at least 6 blocks - pass a list of "recodings", i.e.
recodings: Vec<(Vec<Vec<usize>>, bool)>, toend_to_end_with_recoding_templateand assert the number of blocks and the number of source shards, e.g.vec![(vec![vec![0, 1], vec![2], vec![3]], true)]means that trying to decode with blocks 2, 3 and a recoded block from 0 and 1 should work, and also that there must be at least 4 blocks and at most 3 source shards - pass
kandntorun_template
- refactor
Edited by STEVAN Antoine