Open
Description
Lets say we have a checkpoint trace that is
- key: ..., value: ...
- key: 100, value: 10
then we push key: 101, value: 20
. This creates a new entry
- key: ..., value: ...
- key: 100, value: 10
- key: 101, value: 20
then we push key: 101, value: 10
. This updates the last new entry
- key: ..., value: ...
- key: 100, value: 10
- key: 101, value: 10
Instead of updating the last entry, we should see that it equal the one before, and therefore we should probably delete the entry with key 101. This would add the invariant that "two consecutive checkpoints cannot have the same value"
This may usefull when some balance/delegation is affected by a flash loan or similar operation (in-out transfers that cancel out)