From 9634663798050b46ce7b881212d6525485143f22 Mon Sep 17 00:00:00 2001 From: qd-qd Date: Wed, 10 Jan 2024 15:49:34 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20update=20README=20to=20include?= =?UTF-8?q?=20v0.3.0=20benchmark?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the gas report with the values of the next release, based on the last refactoring. --- README.md | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 10b77ec..3b003d4 100644 --- a/README.md +++ b/README.md @@ -69,25 +69,18 @@ scripts are expected to be run using the `forge script` command. ## Gas reports -These gas reports were produced using the `0.8.19` version of the Solidity compiler (with 100k optimizer runs), specifically for the [`0.1.0`](https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8/webauthn/releases/tag/v0.1.0) version of the library. - - -| test/WebAuthnBase.t.sol:WebAuthnImplementation contract | Deployment Cost | Deployment Size | min | avg | median | max | # calls | -|------------------------------------------------------------|-----------------|-----------------|--------|--------|--------|--------|---------| -| Deployment Cost | 292131 | 1491 | | | | | | -| Function Name | | | | | | | | -| _generateMessage | | | 5194 | 5225 | 5194 | 5385 | 6 | - -This runtime cost corresponds to the real cost added by the WebAuthn signature verification process - -| src/WebAuthn256r1.sol:WebAuthn256r1 contract | Deployment Cost | Deployment Size | min | avg | median | max | # calls | -|------------------------------------------------------------|-----------------|-----------------|--------|--------|--------|--------|---------| -| Deployment Cost | 1889590 | 9470 | | | | | | -| Function Name | | | | | | | | -| verify(bytes1,bytes,bytes,bytes,uint256,uint256,uint256,address)(bool) | | | 80456 | 80456 | 80456 | 80456 | 1 | -| verify(bytes1,bytes,bytes,bytes,uint256,uint256,uint256,uint256,uint256)(bool) | | | 209146 | 209146 | 209146 | 209146 | 1 | - -These costs can be considered end-to-end as it includes the cost of the different implementation in the [secp256r1 library](https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8/secp256r1-verify) +This gas report was produced using the `0.8.19` version of the Solidity compiler (with 100k optimizer runs), specifically for the [`0.3.0`](https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8/webauthn/releases/tag/v0.3.0) version of the library. + +| test/WebAuthnWrapper.sol:WebAuthnWrapper contract | | | | | | +|---------------------------------------------------|-----------------|--------|--------|--------|---------| +| Deployment Cost | Deployment Size | | | | | +| 1321776 | 6634 | | | | | +| Function Name | min | avg | median | max | # calls | +| _generateMessage | 5230 | 5261 | 5230 | 5421 | 6 | +| verify | 209257 | 209257 | 209257 | 209257 | 1 | + +These costs can be considered end-to-end as they include the cost of the [secp256r1 library](https://github.com/0x90d2b2b7fb7599eebb6e7a32980857d8/secp256r1-verify). +Note the library is wrapped in a contract that exposes the different functions of the library, impacting the gas cost of the benchmark. > ℹ️ Tests expected to revert are excluded from the gas report