juno icon indicating copy to clipboard operation
juno copied to clipboard

Pending Block and State can become out of sync

Open IronGauntlets opened this issue 1 year ago • 1 comments
trafficstars

Pending Block and State are written to the DB this means that any subsequent runs of Juno when pending-poll is disabled would have access to the old Pending Block and State which is no longer relevant.

There are 2 solutions:

  • Stop persisting the pending block and state across multiple runs of Juno and only manage it in memory. This may require a migration to remove the old pending block.
  • Check if the pending block is outdated and return ErrBlockNotFound.

IronGauntlets avatar Apr 03 '24 17:04 IronGauntlets

This should be done along with #1787

IronGauntlets avatar Apr 03 '24 17:04 IronGauntlets