EspressoSystems / espresso-sequencer

96 stars 68 forks source link

I05: Inability to reduce stateHistoryRetentionPeriod #2076

Open alysiahuggins opened 1 week ago

alysiahuggins commented 1 week ago

Affected Code: LightClient.sol (line 441)

Summary: The function setstateHistoryRetentionPeriod wrongly when reducing the retention period, which can lock in a large value if set by mistake.

Suggestion: Instead of reverting when the retention period decreases, updateStateHistory could be called with the last finalized state to delete the newly outdated states.

Comments: This was intentional for this version of the escape hatch but will address later.

alysiahuggins commented 1 day ago

This will not be addressed right now however we have created an issue to set a max state history retention period allowed https://github.com/EspressoSystems/espresso-sequencer/issues/2114