You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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!
The text was updated successfully, but these errors were encountered:
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.
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!
The text was updated successfully, but these errors were encountered: