Closed mmv08 closed 1 year ago
Totals | |
---|---|
Change from base Build 6352468698: | 0.01% |
Covered Lines: | 338 |
Relevant Lines: | 358 |
I have no idea why the lint action is failing, and it doesn't display any error. Also, locally, it doesn't exit with the code 1.
Do we know if this adds any overhead on the contract size and gas costs?
Before changes:
Safe 23569 bytes (limit is 24576)
SafeL2 24411 bytes (limit is 24576)
After changes:
Safe 23599 bytes (limit is 24576)
SafeL2 24441 bytes (limit is 24576)
So, it increases the code size by 30 bytes. Regarding the gas costs, I'm not sure. We don't have benchmarks set up for contract signers. I can try setting up some, but it also heavily varies on the actual verification logic in the contract
Actually, it did increase gas costs for EOA signers as well: Before:
Ether - transfer
Used 21000n gas for >transfer<
✔ with an EOA (224ms)
Used 58754n gas for >transfer<
✔ with a single owner Safe
Used 64571n gas for >transfer<
✔ with a single owner and guard Safe
Used 65820n gas for >transfer<
✔ with a 2 out of 2 Safe
Used 72875n gas for >transfer<
✔ with a 3 out of 3 Safe
Used 72863n gas for >transfer<
✔ with a 3 out of 5 Safe
After:
Ether - transfer
Used 21000n gas for >transfer<
✔ with an EOA (213ms)
Used 58777n gas for >transfer<
✔ with a single owner Safe
Used 64606n gas for >transfer<
✔ with a single owner and guard Safe
Used 65855n gas for >transfer<
✔ with a 2 out of 2 Safe
Used 72910n gas for >transfer<
✔ with a 3 out of 3 Safe
Used 72922n gas for >transfer<
✔ with a 3 out of 5 Safe
So, for EOA signers gas costs are increased by 20-40 gas
Interesting, so after reverting the removal of the unused "data" param in checkSignatures
(link), the gas costs are back to normal and even less in the single owner case in some benchmarks:
Ether - transfer
Used 21000n gas for >transfer<
✔ with an EOA (216ms)
Used 58742n gas for >transfer<
✔ with a single owner Safe
Used 64571n gas for >transfer<
✔ with a single owner and guard Safe
Used 65820n gas for >transfer<
✔ with a 2 out of 2 Safe
Used 72875n gas for >transfer<
✔ with a 3 out of 3 Safe
Used 72887n gas for >transfer<
✔ with a 3 out of 5 Safe
@rmeissner I reverted the change
This PR:
checkContractSignature
to allow summarization during formal verification because lots of assembly in the function broke the pointer analysis in the provercheckNSignatures
for each signature individually is equal to callingcheckSignatures
cc @jhoenicke