Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Proper handling of invalid forced batches is missing.  #3770

@gimersettle

Description

@gimersettle

Rationale

The ZkEVM system does not properly handle incorrect/invalid forced transactions. The function forceBatches allows a sequencer/user to force a batch of L2 transactions. This function is allowed only for use by the admin address. However, the contract has the functionality to allow any user to send force batches if the trusted sequencer does not work as expected.

We tested this functionality by sending forced batches with an invalid transaction. This causes other valid forced batches not to process as expected. An invalid force batch can include a transaction that does not follow the Polygon's format or is invalid (e.g., not enough funds, invalid nonce, etc. ).

As you can see in the following image, the first forced batch is valid and processed correctly. After sequencing this batch, the smart contract deletes the information related to this batch in the smart contract because it is not needed anymore. However, the second batch contains an invalid transaction (i.e., incorrect nonce). The batch is never been processed as expected and remains in the queue of forced batches with their associated data. The third batch contains a valid transaction that is never processed because forced batches are processed sequentially.

Screenshot 2024-08-15 at 8 40 16 a m

As you can see in the image, I have three forced batches, but only the first one was sequenced. Notice that if the forced batch does not follow the Polygon's encoding format, the sequencer will send an error message to the logs. However, if a transaction is invalid, there is no message, and the batch is not processed.

Implementation

Is there a feature in the system that can handle this problem? Will this problem be addressed shortly? Consider implementing a mechanism to update the forced batch queue even if the sequencer does not process a batch correctly.

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    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