[go: up one dir, main page]

Proto/Scoru: re-design the way the proof sliding window is handled

Context

Related to #2981 (closed)

This MR re-designs the way the proof sliding window is handled in the inbox. This is done by:

  • Adding a field size to track the number of elements in the history structure
  • Adding a field oldest_index to track the oldest entry that has been added to the history (and that is still present there)
  • Adapting the remember function to add new entries and GC old one when the structure "overflows" correctly
  • Adapting the history_hashes function used for test to return the entries' hashes in the correct insertion order.

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
Edited by Mohamed IGUERNLALA

Merge request reports

Loading