DAL: test `share_is_trap`
This MR tests the Trap.share_is_trap function:
- checks that the number of traps is as expected over many shards
- checks the edge cases:
traps_fractionis 0 or 1 - benches the running time
For the running time, the DAL benchmark from tezt/tests/dal.ml is updated. Here is the data, see last line:
SRS ............................................................................ 1 1182.488ms 100%
(shards: 512, slot size: 126944, redundancy_factor: 8, page size: 3967) ........ 1 3379.977ms 100%
make ......................................................................... 1 0.005ms 200%
shard precomputation ......................................................... 1 2064.298ms 100%
slot generation .............................................................. 1 1.327ms 101%
polynomial from slot ......................................................... 1 1.667ms 100%
commit ....................................................................... 1 52.522ms 100%
prove commitment ............................................................. 1 204.983ms 100%
shards from polynomial ....................................................... 1 10.415ms 100%
prove shards ................................................................. 1 838.172ms 100%
Reconstruct polynomial ....................................................... 1 40.822ms 100%
verify commitment ............................................................ 1 0.822ms 100%
verify shard (size: 2052) .................................................... 1 2.959ms 100%
verify shard multi (size: 2052) (number_of_shards:1) ......................... 1 3.013ms 100%
verify shard multi (size: 2052) (number_of_shards:5) ......................... 1 3.700ms 101%
verify shard multi (size: 2052) (number_of_shards:20) ........................ 1 5.396ms 100%
verify shard multi (size: 2052) (number_of_shards:100) ....................... 1 12.773ms 100%
verify shard multi (size: 2052) (number_of_shards:512) ....................... 1 42.020ms 100%
prove page ................................................................... 1 45.774ms 100%
verify page .................................................................. 1 4.036ms 100%
share_is_trap (number_of_shards:512) ......................................... 1 43.482ms 100%