Skip to content

Commit 8885af9

Browse files
committed
Merge branch 'hardfork/target-osaka' into update/use-0.8.31-clz
2 parents 5860901 + 255570a commit 8885af9

File tree

7 files changed

+1027
-953
lines changed

7 files changed

+1027
-953
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ jobs:
8686
submodules: recursive
8787
- name: Set up environment
8888
uses: ./.github/actions/setup
89+
- name: Check foundry version
90+
run: forge --version
8991
- name: Run tests
9092
run: forge test -vvv
9193

hardhat.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ module.exports = {
103103
// we rely on the `code-size` compiler warning, that will cause a compilation error.
104104
allowUnlimitedContractSize: true,
105105
initialBaseFeePerGas: argv.coverage ? 0 : undefined,
106-
enableRip7212: true,
107106
},
108107
},
109108
exposed: {

package-lock.json

Lines changed: 1021 additions & 933 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"@eslint/compat": "^1.2.1",
6060
"@ethereumjs/mpt": "^10.1.0",
6161
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
62-
"@nomicfoundation/hardhat-ethers": "^3.1.3",
62+
"@nomicfoundation/hardhat-ethers": "^3.0.9",
6363
"@nomicfoundation/hardhat-network-helpers": "^1.0.13",
6464
"@openzeppelin/docs-utils": "^0.1.5",
6565
"@openzeppelin/merkle-tree": "^1.0.7",

scripts/solc-versions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const semver = require('semver');
33
const { range } = require('./helpers');
44

55
module.exports = {
6-
versions: ['0.4.26', '0.5.16', '0.6.12', '0.7.6', '0.8.31']
6+
versions: ['0.4.26', '0.5.16', '0.6.12', '0.7.6', '0.8.33']
77
.map(semver.parse)
88
.flatMap(({ major, minor, patch }) => range(patch + 1).map(p => `${major}.${minor}.${p}`)),
99
compile: (source, version) =>

test/utils/cryptography/P256.t.sol

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ contract P256Test is Test {
1616
(bytes32 r, bytes32 s) = vm.signP256(privateKey, digest);
1717
s = _ensureLowerS(s);
1818
assertTrue(P256.verify(digest, r, s, bytes32(x), bytes32(y)));
19+
assertTrue(P256.verifyNative(digest, r, s, bytes32(x), bytes32(y)));
1920
assertTrue(P256.verifySolidity(digest, r, s, bytes32(x), bytes32(y)));
2021
}
2122

@@ -31,22 +32,6 @@ contract P256Test is Test {
3132
assertTrue((qx0 == bytes32(x) && qy0 == bytes32(y)) || (qx1 == bytes32(x) && qy1 == bytes32(y)));
3233
}
3334

34-
function testVerifyNativeUnsupportedRIP7212(bytes32 digest, uint256 seed) public {
35-
// By default, the precompile at address 0x100 is not supported.
36-
37-
uint256 privateKey = _asPrivateKey(seed);
38-
39-
(uint256 x, uint256 y) = vm.publicKeyP256(privateKey);
40-
(bytes32 r, bytes32 s) = vm.signP256(privateKey, digest);
41-
s = _ensureLowerS(s);
42-
43-
(bool success, bytes memory returndata) = address(this).call(
44-
abi.encodeCall(P256Test.verifyNative, (digest, r, s, bytes32(x), bytes32(y)))
45-
);
46-
assertFalse(success);
47-
assertEq(returndata, abi.encodeWithSelector(Errors.MissingPrecompile.selector, address(0x100)));
48-
}
49-
5035
function _asPrivateKey(uint256 seed) private pure returns (uint256) {
5136
return bound(seed, 1, P256.N - 1);
5237
}

test/utils/cryptography/RSA.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('RSA', function () {
3131
it(`signature length ${length} ${test.extra} ${result ? 'works' : 'fails'}`, async function () {
3232
const data = '0x' + test.Msg;
3333
const sig = '0x' + test.S;
34-
const exp = '0x' + test.e;
34+
const exp = ethers.stripZerosLeft('0x' + test.e); // strip zeros to reduce gas cost of the precompile
3535
const mod = '0x' + test.n;
3636

3737
expect(await this.mock.$pkcs1Sha256(bytes32(ethers.sha256(data)), sig, exp, mod)).to.equal(result);

0 commit comments

Comments
 (0)