Based on documentations on how genesis upgrades should work, the transaction is to return the hash of the L2 system contract upgrade transaction after its execution.
Now, take a look at https://github.com/code-423n4/2024-03-zksync/blob/4f0ba34f34a864c354c7e8c47643ed8f4a250e13/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgradeGenesis.sol#L46-L68
This function is an overriden one of the inherited BaseZkSyncUpgrade.upgrade(), case here is that unlike the inherited version where the bytes data to be returned has been explicitly mentioned as txHash, this function does not explicitly name the variable to be returned, leading to all attempts of calling this function to return 0.
Deploying this contract on remix proves this bug case
Passing the value: 0x212226.
We can see that:
And this happens despite both functions having the same implementation.
Borderline low/medium, cause whereas genesis upgrades do not work as expected, we cant seem to find a direct instance where the expected hash being returned is implemented in protocol.
Name the variable to be returned as is done in BaseZkSyncUpgrade.upgrade()` or attach the return at the end of the functions execution, i.e apply these changes to: https://github.com/code-423n4/2024-03-zksync/blob/4f0ba34f34a864c354c7e8c47643ed8f4a250e13/code/contracts/ethereum/contracts/upgrades/BaseZkSyncUpgradeGenesis.sol#L46-L68
Additional Note
