Commit 05c71381 authored by Robert Hambrock's avatar Robert Hambrock Committed by GitHub
Browse files

pallet-mmr: fix batch proof failures (#11840)

* pallet-mmr: extend batch proof verification test

covers all possible 2-leaf combinations now, including current
verification failures that batch proof item count limit is too low
sometimes.

* raise upper bound on proof item number

as described in
https://github.com/paritytech/substrate/issues/11753#issuecomment-1179838174

* test for powerset of leaves

* refactor batch proof verification test

* test all batch proofs for mmr sizes up to n=13

* limit mmr size to reduce batch proof test duration

* use saturating integer addition for proof check

* extract common chain building in batch proof tests

note: right now, since not killing old chain, it keeps growing by 7
blocks for every leaf selection (added after proof generation), hence
heavier to compute.

* only add blocks after a proof generation once

* increase batch proof testing range

* register offchain extensions only once

* fmt & remove unused util
parent c3812f40
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment