Scoru: relax dissection's distribution rule
Context
Fixes #3406 (closed)
Currently the node from
[
(Some x, 0);
(Some y, 62);
(None, 63)
]
produces
[
(Some x, 0);
(Some _, 1);
(Some _, 2);
...
(Some _, 30);
(Some y, 62);
]
However, the last dissection has a length of 33
, which is more than 62/2
. Thus, it fails in the check dissection.
With the fix I propose for the rollup node, the dissection would rather be
[
(Some x, 0);
(Some _, 31);
(Some _, 32);
....
(Some _, 61);
(Some y, 62);
]
Using a special jump on the first section length by using the remainder of trace lengt
and number_of_sections
, we have a distance for this section of 31
. That is, we get in this bad scenario half + 1
distance at most.
However, half + 1
is still bad regarding the protocol check at the moment. I propose here also to relax this rule. To be honest, it does not change much if the maximum distance for a section is half
of half + 1
.
Manually testing the MR
I mirrored this implementation for the PBT tests in !5851 (merged). Using the randomness of these tests, we gain confidence on this dissection's building.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR