[N02] Imprecise gas limits (#86)

clearer definition the guard condition as "all components are<=uint120.max"
fixes #86
This commit is contained in:
Dror Tirosh
2022-03-30 13:23:32 +03:00
committed by GitHub
parent 34669f32ff
commit 59f6eacd26
2 changed files with 5 additions and 5 deletions

View File

@@ -267,7 +267,7 @@ contract EntryPoint is StakeManager {
uint256 preGas = gasleft();
uint256 maxGasValues = userOp.preVerificationGas | userOp.verificationGas |
userOp.callGas | userOp.maxFeePerGas | userOp.maxPriorityFeePerGas;
require(maxGasValues < type(uint120).max, "gas values overflow");
require(maxGasValues <= type(uint120).max, "gas values overflow");
uint256 gasUsedByValidateWalletPrepayment;
uint256 requiredPreFund;
(requiredPreFund, paymentMode) = _getPaymentInfo(userOp);

View File

@@ -13,9 +13,9 @@
·······················|······················|············|··············|·············|···············|··············
| EntryPoint · addStake · 29068 · 46168 · 34768 · 3 · - │
·······················|······················|············|··············|·············|···············|··············
| EntryPoint · handleOps · 98035 · 1185485 · 425964 · 27 · - │
| EntryPoint · handleOps · 98026 · 1185483 · 425964 · 27 · - │
·······················|······················|············|··············|·············|···············|··············
| EntryPoint · simulateValidation · - · - · 999703 · 1 · - │
| EntryPoint · simulateValidation · - · - · 999738 · 1 · - │
·······················|······················|············|··············|·············|···············|··············
| EntryPoint · unstakeDeposit · - · - · 28381 · 1 · - │
·······················|······················|············|··············|·············|···············|··············
@@ -41,7 +41,7 @@
··············································|············|··············|·············|···············|··············
| DepositPaymaster · - · - · 1333412 · 4.4 % · - │
··············································|············|··············|·············|···············|··············
| TokenPaymaster · - · - · 1581358 · 5.3 % · - │
| TokenPaymaster · - · - · 1581382 · 5.3 % · - │
··············································|············|··············|·············|···············|··············
| VerifyingPaymaster · - · - · 1016722 · 3.4 % · - │
| VerifyingPaymaster · - · - · 1016710 · 3.4 % · - │
·---------------------------------------------|------------|--------------|-------------|---------------|-------------·