Take a look at https://github.com/code-423n4/2024-03-zksync/blob/4f0ba34f34a864c354c7e8c47643ed8f4a250e13/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgradeGenesis.sol#L20-L41
This function is used to change the protocol version, only case atttached here is the fact that if _newProtocolVersion >= previousProtocolVersion, does not hold true, the execution errors out with New protocol version is not greater than the current one instead of New protocol version is not greater than or equal to the current one.
Inaccurate error messages, code confusion.
Apply these changes to https://github.com/code-423n4/2024-03-zksync/blob/4f0ba34f34a864c354c7e8c47643ed8f4a250e13/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgradeGenesis.sol#L20-L41
For this audit, 12 reports were submitted by wardens detailing gas optimizations. The report highlighted below by lsaudit received the top score from the judge.
The following wardens also submitted reports: ChaseTheLight, slvDev, Pechenite, DadeKuma, hihen, oualidpro, Sathish9098, rjs, aua_oo7, Bauchibred, and K42.
To improve the report readability and its transparency - the report is divided into two sections. The first section contains issues evaluated during the manual process of code-review. It focuses on two types of findings:
The second section - is related to automated findings. These findings - will - most likely - be ignored and their proposed fixes not implemented, because they significantly affect the code readability and provide just a minimal gas savings. These findings describe issues like: using assembly for simple operations, marking constructors as payable, etc. Nonetheless, weve decide to contain them in the report for the completeness.
Since during the automated process - we have been using own tooling, weve decide to simplify some of its detectors and re-write them as a simple grep commands. To improve the report quality and readability, weve decide to not list the exact instances found during the automated process - but instead, weve provided a simple grep instruction, which allows to identified those issue by the reader.
Finding marked as [AUTOMATED-FINDING-N] describes how to use grep to identify most of the instances related to each finding. Please notice, that those grep instructions wont identify every affected instance - but in most cases - they will report enough results to understand the crux of the issue.
In the automated findings, weve piped our grep detectors by | wc -l, just to demonstrate how many instances are affected. To list exact lines affected, please remove it from the command.
