Skip to content

Handle duplicate block submission in submitBlocksToDA #1472

Description

@Manav-Aggarwal

The PR moves this line out of the loop. The problem now is that the variable blocks does not get updated after an attempt to submit block to the DA layer. This may lead to submit multiple times the same rollup block to the DA layer. See the following scenario:
The sequencer calls submitBlocksToDA.
The function reads pendingBlocks , which returns blocks A, B and C.
The function calls SubmitBlocks and is able to submit A and B.
By these lines, then submitted==false. Thus, the function tries to submit again A, B and C beacuse the variable blocks is not updated with the already published blocks.
It may be enough to change this line to something like blocks := blocks[:res.SubmittedCount] and the references to submittedBlocks accordingly. But the fix should be thought carefully, this is just a recommendation after a quick review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions