kona icon indicating copy to clipboard operation
kona copied to clipboard

fix(client): Span batch validity guarantees

Open clabby opened this issue 1 year ago • 0 comments

Overview

Currently, we do not address an edge case in span batch validity within the client program. If the disputed block is the first within the span batch, the span batch's validity is not currently enforced.

Span batch validity (as it pertains to safe head updates) relies on all blocks within the span batch being valid prior to the safe head updating. If any L2 block within the span batch is invalid, the entire span batch is rolled back.

In the case where the disputed block is not the first block within the span batch, we only need to execute the disputed block (as we do currently), as the trusted L2 prestate commitment guarantees the validity of the span batch containing both the prestate and disputed block (by virtue of claiming that it is indeed within the safe head, and therefore, that the entire batch was accepted).

However, if the disputed block is the first block within a span batch, the trusted L2 prestate commitment does not make any assertions about the validity of the batch containing the disputed block. To fully enforce consensus rules, when the disputed block is the first block within a span batch, the entire span batch must be executed and validated within kona-client.

In future protocol upgrades, this issue should be addressed, however we currently must conform to active consensus rules.

clabby avatar Aug 05 '24 21:08 clabby