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'
insequence
, and - will have two bindings
ptr |-> counter
andptr' |-> counter
inevents
- at the next call, we'll override the mapping
More details,
Depending on how the bug is fixed, we can distinguish two issues:
- When the structure is full, the last element is removed/overwritten instead of removing the first/oldest element
- Depending on how the first bug above is fixed, we should handle overflows
Fixing
-
MR !5925 (merged) rename some history
type's fields to auto-document, and add some doc-strings -
MR !5916 (merged) unit tests that exhibit a/two bug/s -
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
- initial proposed solution: !5269 (closed)
Edited by Mohamed IGUERNLALA