Open hats-bug-reporter[bot] opened 3 weeks ago
Github username: -- Twitter username: dod4ufn Submission hash (on-chain): 0x28e7489aaa6f851dab0f1ef245b5887370a9d7572b54056fe109248e2e373a35 Severity: low
Description: Description\
The usage of v == 27 || v == 28 is not suggested. This issue has been successfully submitted in other contests and considered a valid low.
v == 27 || v == 28
Reference: https://code4rena.com/reports/2022-11-non-fungible#n-11-stop-using-v--27--v--28-or-v--27--v--28
In the ProofOfHumanityOld file:
if (v < 27) v += 27; require(v == 27 || v == 28, "Invalid signature");
So looking at the reference of your reference it is in order to save gas (this being also checked by the precompile).
As per the contest rules, the following are out of scope: Gas optimization.
Github username: -- Twitter username: dod4ufn Submission hash (on-chain): 0x28e7489aaa6f851dab0f1ef245b5887370a9d7572b54056fe109248e2e373a35 Severity: low
Description: Description\
The usage of
v == 27 || v == 28
is not suggested. This issue has been successfully submitted in other contests and considered a valid low.Reference: https://code4rena.com/reports/2022-11-non-fungible#n-11-stop-using-v--27--v--28-or-v--27--v--28
In the ProofOfHumanityOld file: