proto/scoru: simplify proof type even more
Context
In this MR purpose is only to simplify the inbox proof type to minimal. With the introduction of sol/eol there is always an inbox for each level. Now both single_level
and next_level
are of a same type, an inclusion proof and a message proof.
The function verifies that for a snapshot
and first_after(l, i)
the proof is valid and returns the payload with the following semantics:
- Before:
(level_tree l) included_in snapshot
AND
| Single_level
( i + 1 < max_index_of (level_tree l) -> Some (message_at (level_tree l) ~index:(i + 1) )
OR ( i + 1 > max_index_of (snapshot) && level_tree l = snapshot -> None )
| Next_level
( message_at (level_tree l) ~index:(i + 1) = None ) -> Some (sol_at (l + 1) ~index:0)
With the simplified inline version we have :
(level_tree l) included_in snapshot
AND (
( i + 1 < max_index_of (level_tree l) -> Some (message_at (level_tree l) ~index:(i + 1)
OR ( i + 1 > max_index_of (level_tree l) && level_tree l = snapshot -> None)
OR ( i + 1 > max_index_of (level_tree l) && level_tree l < snapshot -> Some (sol_at (l + 1) ~index:0))
Manually testing the MR
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