[go: up one dir, main page]

SCORU: Implementation of sliding window mechanism in Sc_rollup_inbox_repr.remember might be buggy

The following discussion from https://gitlab.com/nomadic-labs/tezos/-/merge_requests/509 should be addressed:

  • @iguerNL started a discussion: (+1 comment)

    I don't understand here if we are trying to implement a "sliding window interval" with history or not here.

    If yes, it seems bizarre for me, because we're doing (counter + 1) - 1. So,

    • at the next call, we'll override the mapping counter |-> ptr' in sequence, and
    • will have two bindings ptr |-> counter and ptr' |-> counter in events

More details,

Depending on how the bug is fixed, we can distinguish two issues:

  1. When the structure is full, the last element is removed/overwritten instead of removing the first/oldest element
  2. Depending on how the first bug above is fixed, we should handle overflows

Fixing

  1. MR !5925 (merged) rename some history type's fields to auto-document, and add some doc-strings
  2. MR !5916 (merged) unit tests that exhibit a/two bug/s
  3. MR !5944 (merged) to fix the two issues

Merging

Probably better to merge in this order: 1, 3, 2 to have the tests after the fixes.

Older proposed solution

Edited by Mohamed IGUERNLALA