diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2ef0af86..07bd73793 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: with: node-version: '16' - uses: actions/checkout@v1 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} @@ -42,7 +42,7 @@ jobs: with: node-version: '16' - uses: actions/checkout@v1 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} @@ -57,7 +57,7 @@ jobs: with: node-version: '16' - uses: actions/checkout@v1 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} @@ -71,7 +71,7 @@ jobs: with: node-version: '16' - uses: actions/checkout@v1 - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} @@ -80,7 +80,7 @@ jobs: - run: yarn compile - run: FORCE_COLOR=1 yarn coverage - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: solidity-coverage path: | diff --git a/contracts/core/EntryPoint.sol b/contracts/core/EntryPoint.sol index 44501524d..4bc9e1db0 100644 --- a/contracts/core/EntryPoint.sol +++ b/contracts/core/EntryPoint.sol @@ -43,7 +43,7 @@ contract EntryPoint is IEntryPoint, StakeManager, NonceManager, ReentrancyGuard, bytes32 private constant INNER_REVERT_LOW_PREFUND = hex"deadaa51"; uint256 private constant REVERT_REASON_MAX_LEN = 2048; - uint256 private constant PENALTY_PERCENT = 10; + uint256 private constant PENALTY_PERCENT = 100; /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { diff --git a/test/entrypoint.test.ts b/test/entrypoint.test.ts index 4a934c447..9824d8f52 100644 --- a/test/entrypoint.test.ts +++ b/test/entrypoint.test.ts @@ -691,7 +691,7 @@ describe('EntryPoint', function () { // we cannot access internal transaction state, so we have to rely on two separate transactions for estimation // assuming 10% penalty is charged - const expectedGasPenalty = (veryBigCallGasLimit - callGasLimit.toNumber()) * 0.1 + const expectedGasPenalty = (veryBigCallGasLimit - callGasLimit.toNumber()) const actualGasPenalty = gasUsed2 - gasUsed1 console.log(actualGasPenalty / expectedGasPenalty) diff --git a/test/samples/TokenPaymaster.test.ts b/test/samples/TokenPaymaster.test.ts index 4210b01cf..fd720b449 100644 --- a/test/samples/TokenPaymaster.test.ts +++ b/test/samples/TokenPaymaster.test.ts @@ -250,7 +250,7 @@ describe('TokenPaymaster', function () { assert.equal(actualTokenChargeEvents.toString(), actualTokenCharge.toString()) assert.equal(actualTokenChargeEvents.toString(), expectedTokenCharge.toString()) assert.equal(actualTokenPriceWithMarkup.toString(), expectedTokenPriceWithMarkup.toString()) - assert.closeTo(postOpGasCost.div(tx.effectiveGasPrice).toNumber(), 50000, 20000) + assert.closeTo(postOpGasCost.div(tx.effectiveGasPrice).toNumber(), 326000, 20000) await ethers.provider.send('evm_revert', [snapshot]) })