From 7c6180efdbebf7c57afee765bbc997c080adb3c0 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sat, 29 Nov 2025 22:38:37 +0400 Subject: [PATCH 1/9] oz update --- foundry.lock | 2 +- lib/openzeppelin-contracts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index 5d1617b..4f75a97 100644 --- a/foundry.lock +++ b/foundry.lock @@ -3,7 +3,7 @@ "rev": "b8f065fda83b8cd94a6b2fec8fcd911dc3b444fd" }, "lib/openzeppelin-contracts": { - "rev": "dc44c9f1a4c3b10af99492eed84f83ed244203f6" + "rev": "fcbae5394ae8ad52d8e580a3477db99814b9d565" }, "lib/rain.intorastring": { "rev": "82bc048226050a0e33c01c9f4282f3349a27e491" diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts index dc44c9f..fcbae53 160000 --- a/lib/openzeppelin-contracts +++ b/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit dc44c9f1a4c3b10af99492eed84f83ed244203f6 +Subproject commit fcbae5394ae8ad52d8e580a3477db99814b9d565 From 94e55bd8b7f96ee72221608a491fcba49fd9ccca Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sat, 29 Nov 2025 22:49:23 +0400 Subject: [PATCH 2/9] update intorastring --- foundry.lock | 2 +- foundry.toml | 2 +- lib/rain.intorastring | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/foundry.lock b/foundry.lock index 4f75a97..d5ece7f 100644 --- a/foundry.lock +++ b/foundry.lock @@ -6,7 +6,7 @@ "rev": "fcbae5394ae8ad52d8e580a3477db99814b9d565" }, "lib/rain.intorastring": { - "rev": "82bc048226050a0e33c01c9f4282f3349a27e491" + "rev": "f92fa66a5f8601bee55692488a198c0a79715707" }, "lib/rain.lib.hash": { "rev": "97609eecc66fe2e30f37e48834eed4a71304af32" diff --git a/foundry.toml b/foundry.toml index d949a5f..1ba7c9f 100644 --- a/foundry.toml +++ b/foundry.toml @@ -15,7 +15,7 @@ solc = "0.8.25" optimizer = true optimizer_runs = 1000000 -evm_version = "paris" +evm_version = "cancun" bytecode_hash = "none" cbor_metadata = false diff --git a/lib/rain.intorastring b/lib/rain.intorastring index 82bc048..f92fa66 160000 --- a/lib/rain.intorastring +++ b/lib/rain.intorastring @@ -1 +1 @@ -Subproject commit 82bc048226050a0e33c01c9f4282f3349a27e491 +Subproject commit f92fa66a5f8601bee55692488a198c0a79715707 From 01e85e60aa07229cd350ff8595b0daad1ed8cd5c Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sat, 29 Nov 2025 23:01:54 +0400 Subject: [PATCH 3/9] fix cancun for oz 5 --- .gas-snapshot | 140 +++++++++++++-------------- src/lib/caller/LibContext.sol | 4 +- test/src/lib/caller/LibContext.t.sol | 4 +- 3 files changed, 74 insertions(+), 74 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index 86d1c5c..c07727f 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,70 +1,70 @@ -LibBloomTest:testLibBloomNoFalseNegatives(bytes32[],uint256,uint256) (runs: 1976, μ: 40655, ~: 35438) -LibBloomTest:testLibBloomVaguelyAvoidsFalsePositives(uint256,uint8) (runs: 2048, μ: 1581001, ~: 22262) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers0() (gas: 427) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1() (gas: 455) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1Fail(bytes) (runs: 2022, μ: 6776, ~: 6596) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersConforming(bytes,uint256,bytes32) (runs: 2048, μ: 18887, ~: 16837) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOffsetPointer(bytes,uint8,bytes32,uint8) (runs: 1339, μ: 25442, ~: 22955) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOpsCount(bytes,uint8,bytes32,uint8) (runs: 1399, μ: 25991, ~: 23574) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptSourcesCount(bytes,uint8,bytes32,uint8) (runs: 1871, μ: 21201, ~: 19864) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersEndGarbage(bytes,bytes) (runs: 2023, μ: 18234, ~: 16943) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersHeaderTruncated(bytes,uint8,bytes32,uint256) (runs: 1464, μ: 27962, ~: 25534) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersInputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1481, μ: 30614, ~: 27673) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOffsetsTruncated(bytes,uint8,uint256) (runs: 1756, μ: 11314, ~: 11319) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOutputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1481, μ: 30611, ~: 27640) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersSourceTruncated(bytes,uint8,bytes32,uint8) (runs: 1399, μ: 26658, ~: 24197) -LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersTrailingOffsetBytes(bytes,bytes,uint8,bytes32) (runs: 1473, μ: 31407, ~: 27697) -LibBytecodeSourceCountTest:testSourceCount0() (gas: 349) -LibBytecodeSourceCountTest:testSourceCount1(bytes) (runs: 2037, μ: 3619, ~: 3616) -LibBytecodeSourceCountTest:testSourceCountReference(bytes) (runs: 2048, μ: 836, ~: 833) -LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1657, μ: 27607, ~: 23995) -LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25469, ~: 22729) -LibBytecodeSourceOpsCountTest:testSourceOpsCount() (gas: 2212) -LibBytecodeSourceOpsCountTest:testSourceOpsCountAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1641, μ: 27558, ~: 23821) -LibBytecodeSourceOpsCountTest:testSourceOpsCountIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25366, ~: 22648) -LibBytecodeSourcePointerTest:testSourcePointerAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1634, μ: 27269, ~: 23675) -LibBytecodeSourcePointerTest:testSourcePointerEmpty0(uint256) (runs: 2048, μ: 5775, ~: 5775) -LibBytecodeSourcePointerTest:testSourcePointerEmpty1(uint256) (runs: 2048, μ: 6158, ~: 6158) -LibBytecodeSourcePointerTest:testSourcePointerIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25195, ~: 22360) -LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetHappy() (gas: 1237) -LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetIndexError() (gas: 95395) -LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetReference(bytes,uint256,uint256,bytes32) (runs: 1639, μ: 26790, ~: 23115) -LibBytecodeSourceStackAllocationTest:testSourceStackAllocationAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1625, μ: 27554, ~: 23875) -LibBytecodeSourceStackAllocationTest:testSourceStackAllocationIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 25197, ~: 22550) -LibContextHashTest:testFuzzHash0() (gas: 3552) -LibContextHashTest:testHash(uint256) (runs: 2048, μ: 282, ~: 282) -LibContextHashTest:testHashGas0() (gas: 208) -LibContextHashTest:testSignedContextArrayHashReferenceImplementation((address,bytes32[],bytes)[]) (runs: 100, μ: 2616738, ~: 2348780) -LibContextHashTest:testSignedContextArrayHashReferenceImplementation0() (gas: 2190) -LibContextHashTest:testSignedContextHashEncodeGas0() (gas: 1683) -LibContextHashTest:testSignedContextHashGas0() (gas: 827) -LibContextHashTest:testSignedContextHashReferenceImplementation((address,bytes32[],bytes)) (runs: 100, μ: 13613, ~: 13205) -LibContextTest:testBase() (gas: 616) -LibContextTest:testBuild0() (gas: 5028) -LibContextTest:testBuildGas0() (gas: 962) -LibContextTest:testBuildStructureReferenceImplementation(bytes32[][]) (runs: 100, μ: 4643768, ~: 4795790) -LibDeployerDiscoverableTest:testTouchDeployerV4Mock() (gas: 184831) -LibEncodedDispatchTest:testRoundTrip(address,uint256,uint16) (runs: 2048, μ: 4498, ~: 4781) -LibEvaluableTest:testEvaluableV2HashDifferent((address,address,address),(address,address,address)) (runs: 2048, μ: 4238, ~: 4238) -LibEvaluableTest:testEvaluableV2HashGas0() (gas: 297) -LibEvaluableTest:testEvaluableV2HashGasSlow0() (gas: 583) -LibEvaluableTest:testEvaluableV2HashSame((address,address,address)) (runs: 2048, μ: 1006, ~: 1006) -LibEvaluableTest:testEvaluableV2HashSensitivity((address,address,address),(address,address,address)) (runs: 2045, μ: 6002, ~: 6002) -LibEvaluableTest:testEvaluableV2KnownHash() (gas: 354) -LibEvaluableTest:testEvaluableV2ReferenceImplementation((address,address,address)) (runs: 2048, μ: 1070, ~: 1070) -LibEvaluableTest:testEvaluableV3BytecodeLengthSensitivity() (gas: 901) -LibEvaluableTest:testEvaluableV3HashDifferent((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 5194, ~: 5192) -LibEvaluableTest:testEvaluableV3HashGas0() (gas: 431) -LibEvaluableTest:testEvaluableV3HashGasSlow0() (gas: 764) -LibEvaluableTest:testEvaluableV3HashSame((address,address,bytes)) (runs: 2048, μ: 1605, ~: 1594) -LibEvaluableTest:testEvaluableV3HashSensitivity((address,address,bytes),(address,address,bytes)) (runs: 2047, μ: 8339, ~: 8312) -LibEvaluableTest:testEvaluableV3KnownHash() (gas: 604) -LibEvaluableTest:testEvaluableV3ReferenceImplementation((address,address,bytes)) (runs: 2048, μ: 1711, ~: 1700) -LibGenParseMetaBuildMetaTest:testBuildMeta((bytes32,string)[]) (runs: 746, μ: 3740032, ~: 2814714) -LibGenParseMetaBuildMetaTest:testRoundMetaExpanderDeeper((bytes32,string)[],uint8,bytes32) (runs: 364, μ: 6840949, ~: 6501238) -LibGenParseMetaBuildMetaTest:testRoundMetaExpanderShallow((bytes32,string)[],uint8,bytes32) (runs: 717, μ: 3598305, ~: 2882702) -LibGenParseMetaFindExpanderTest:testFindExpanderSmall((bytes32,string)[]) (runs: 254, μ: 43912, ~: 33558) -LibNamespaceTest:testQualifyNamespaceGas0(uint256,address) (runs: 2048, μ: 362, ~: 362) -LibNamespaceTest:testQualifyNamespaceGasSlow0(uint256,address) (runs: 2048, μ: 569, ~: 569) -LibNamespaceTest:testQualifyNamespaceReferenceImplementation(uint256,address) (runs: 2048, μ: 726, ~: 726) -LitParseMetaTest:testWordBitmapped(uint256,bytes32) (runs: 2048, μ: 969, ~: 969) \ No newline at end of file +LibBloomTest:testLibBloomNoFalseNegatives(bytes32[],uint256,uint256) (runs: 1970, μ: 40231, ~: 34931) +LibBloomTest:testLibBloomVaguelyAvoidsFalsePositives(uint256,uint8) (runs: 2048, μ: 1552760, ~: 23505) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers0() (gas: 421) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1() (gas: 449) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointers1Fail(bytes) (runs: 2022, μ: 5968, ~: 5949) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersConforming(bytes,uint256,bytes32) (runs: 2048, μ: 18014, ~: 15878) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOffsetPointer(bytes,uint8,bytes32,uint8) (runs: 1349, μ: 23977, ~: 21571) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptOpsCount(bytes,uint8,bytes32,uint8) (runs: 1406, μ: 24561, ~: 22378) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersCorruptSourcesCount(bytes,uint8,bytes32,uint8) (runs: 1875, μ: 20024, ~: 18910) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersEndGarbage(bytes,bytes) (runs: 2023, μ: 17034, ~: 15942) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersHeaderTruncated(bytes,uint8,bytes32,uint256) (runs: 1472, μ: 25909, ~: 23510) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersInputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1482, μ: 28400, ~: 26010) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOffsetsTruncated(bytes,uint8,uint256) (runs: 1755, μ: 10515, ~: 10554) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersOutputsNotMonotonic(bytes,uint8,bytes32,uint256,uint256) (runs: 1482, μ: 28390, ~: 26146) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersSourceTruncated(bytes,uint8,bytes32,uint8) (runs: 1406, μ: 24741, ~: 22550) +LibBytecodeCheckNoOOBPointersTest:testCheckNoOOBPointersTrailingOffsetBytes(bytes,bytes,uint8,bytes32) (runs: 1479, μ: 28945, ~: 25847) +LibBytecodeSourceCountTest:testSourceCount0() (gas: 343) +LibBytecodeSourceCountTest:testSourceCount1(bytes) (runs: 2037, μ: 3611, ~: 3608) +LibBytecodeSourceCountTest:testSourceCountReference(bytes) (runs: 2048, μ: 827, ~: 824) +LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1661, μ: 26341, ~: 22906) +LibBytecodeSourceInputsOutputsTest:testSourceInputsOutputsIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23602, ~: 21047) +LibBytecodeSourceOpsCountTest:testSourceOpsCount() (gas: 2163) +LibBytecodeSourceOpsCountTest:testSourceOpsCountAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1659, μ: 26295, ~: 22735) +LibBytecodeSourceOpsCountTest:testSourceOpsCountIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23606, ~: 21108) +LibBytecodeSourcePointerTest:testSourcePointerAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1640, μ: 26289, ~: 22593) +LibBytecodeSourcePointerTest:testSourcePointerEmpty0(uint256) (runs: 2048, μ: 5407, ~: 5407) +LibBytecodeSourcePointerTest:testSourcePointerEmpty1(uint256) (runs: 2048, μ: 5486, ~: 5486) +LibBytecodeSourcePointerTest:testSourcePointerIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23572, ~: 21102) +LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetHappy() (gas: 1215) +LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetIndexError() (gas: 85666) +LibBytecodeSourceRelativeOffsetTest:testSourceRelativeOffsetReference(bytes,uint256,uint256,bytes32) (runs: 1652, μ: 25544, ~: 22042) +LibBytecodeSourceStackAllocationTest:testSourceStackAllocationAgainstSlow(bytes,uint256,uint256,bytes32) (runs: 1630, μ: 26518, ~: 23055) +LibBytecodeSourceStackAllocationTest:testSourceStackAllocationIndexOutOfBounds(bytes,uint256,uint256,bytes32) (runs: 2048, μ: 23528, ~: 21105) +LibContextHashTest:testFuzzHash0() (gas: 3537) +LibContextHashTest:testHash(uint256) (runs: 2048, μ: 279, ~: 279) +LibContextHashTest:testHashGas0() (gas: 206) +LibContextHashTest:testSignedContextArrayHashReferenceImplementation((address,bytes32[],bytes)[]) (runs: 100, μ: 2614880, ~: 2346946) +LibContextHashTest:testSignedContextArrayHashReferenceImplementation0() (gas: 2172) +LibContextHashTest:testSignedContextHashEncodeGas0() (gas: 1441) +LibContextHashTest:testSignedContextHashGas0() (gas: 824) +LibContextHashTest:testSignedContextHashReferenceImplementation((address,bytes32[],bytes)) (runs: 100, μ: 13598, ~: 13190) +LibContextTest:testBase() (gas: 611) +LibContextTest:testBuild0() (gas: 5010) +LibContextTest:testBuildGas0() (gas: 953) +LibContextTest:testBuildStructureReferenceImplementation(bytes32[][]) (runs: 100, μ: 4645490, ~: 4797429) +LibDeployerDiscoverableTest:testTouchDeployerV4Mock() (gas: 175612) +LibEncodedDispatchTest:testRoundTrip(address,uint256,uint16) (runs: 2048, μ: 4406, ~: 4681) +LibEvaluableTest:testEvaluableV2HashDifferent((address,address,address),(address,address,address)) (runs: 2048, μ: 4233, ~: 4233) +LibEvaluableTest:testEvaluableV2HashGas0() (gas: 295) +LibEvaluableTest:testEvaluableV2HashGasSlow0() (gas: 580) +LibEvaluableTest:testEvaluableV2HashSame((address,address,address)) (runs: 2048, μ: 1003, ~: 1003) +LibEvaluableTest:testEvaluableV2HashSensitivity((address,address,address),(address,address,address)) (runs: 2045, μ: 5990, ~: 5990) +LibEvaluableTest:testEvaluableV2KnownHash() (gas: 353) +LibEvaluableTest:testEvaluableV2ReferenceImplementation((address,address,address)) (runs: 2048, μ: 1066, ~: 1066) +LibEvaluableTest:testEvaluableV3BytecodeLengthSensitivity() (gas: 898) +LibEvaluableTest:testEvaluableV3HashDifferent((address,address,bytes),(address,address,bytes)) (runs: 2048, μ: 5185, ~: 5183) +LibEvaluableTest:testEvaluableV3HashGas0() (gas: 429) +LibEvaluableTest:testEvaluableV3HashGasSlow0() (gas: 758) +LibEvaluableTest:testEvaluableV3HashSame((address,address,bytes)) (runs: 2048, μ: 1599, ~: 1588) +LibEvaluableTest:testEvaluableV3HashSensitivity((address,address,bytes),(address,address,bytes)) (runs: 2044, μ: 8320, ~: 8293) +LibEvaluableTest:testEvaluableV3KnownHash() (gas: 602) +LibEvaluableTest:testEvaluableV3ReferenceImplementation((address,address,bytes)) (runs: 2048, μ: 1704, ~: 1693) +LibGenParseMetaBuildMetaTest:testBuildMeta((bytes32,string)[]) (runs: 745, μ: 3674384, ~: 2813977) +LibGenParseMetaBuildMetaTest:testRoundMetaExpanderDeeper((bytes32,string)[],uint8,bytes32) (runs: 366, μ: 6652382, ~: 6359523) +LibGenParseMetaBuildMetaTest:testRoundMetaExpanderShallow((bytes32,string)[],uint8,bytes32) (runs: 715, μ: 3521627, ~: 3137421) +LibGenParseMetaFindExpanderTest:testFindExpanderSmall((bytes32,string)[]) (runs: 254, μ: 41946, ~: 33181) +LibNamespaceTest:testQualifyNamespaceGas0(uint256,address) (runs: 2048, μ: 359, ~: 359) +LibNamespaceTest:testQualifyNamespaceGasSlow0(uint256,address) (runs: 2048, μ: 566, ~: 566) +LibNamespaceTest:testQualifyNamespaceReferenceImplementation(uint256,address) (runs: 2048, μ: 722, ~: 722) +LitParseMetaTest:testWordBitmapped(uint256,bytes32) (runs: 2048, μ: 960, ~: 960) \ No newline at end of file diff --git a/src/lib/caller/LibContext.sol b/src/lib/caller/LibContext.sol index 17de287..e3749db 100644 --- a/src/lib/caller/LibContext.sol +++ b/src/lib/caller/LibContext.sol @@ -6,7 +6,7 @@ import {LibUint256Array} from "rain.solmem/lib/LibUint256Array.sol"; import {LibHashNoAlloc, HASH_NIL} from "rain.lib.hash/LibHashNoAlloc.sol"; import {SignatureChecker} from "openzeppelin-contracts/contracts/utils/cryptography/SignatureChecker.sol"; -import {ECDSA} from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import {MessageHashUtils} from "openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol"; import { SignedContextV1, @@ -192,7 +192,7 @@ library LibContext { // a single encoded output. !SignatureChecker.isValidSignatureNow( signedContexts[i].signer, - ECDSA.toEthSignedMessageHash(LibHashNoAlloc.hashWords(signedContexts[i].context)), + MessageHashUtils.toEthSignedMessageHash(LibHashNoAlloc.hashWords(signedContexts[i].context)), signedContexts[i].signature ) ) { diff --git a/test/src/lib/caller/LibContext.t.sol b/test/src/lib/caller/LibContext.t.sol index 94301ef..f800cbd 100644 --- a/test/src/lib/caller/LibContext.t.sol +++ b/test/src/lib/caller/LibContext.t.sol @@ -3,7 +3,7 @@ pragma solidity =0.8.25; import {Test} from "forge-std/Test.sol"; -import {LibContext, ECDSA, LibHashNoAlloc, SignedContextV1} from "src/lib/caller/LibContext.sol"; +import {LibContext, MessageHashUtils, LibHashNoAlloc, SignedContextV1} from "src/lib/caller/LibContext.sol"; import {LibContextSlow} from "./LibContextSlow.sol"; contract LibContextTest is Test { @@ -28,7 +28,7 @@ contract LibContextTest is Test { bytes32 signerPrivateKey = bytes32(0x61b952d0c26214380daf3ca0a8ec9316682d63673db12d723c30417c86dbfca2); (signerPrivateKey); - bytes32 toSign = ECDSA.toEthSignedMessageHash(LibHashNoAlloc.hashWords(unsignedContext)); + bytes32 toSign = MessageHashUtils.toEthSignedMessageHash(LibHashNoAlloc.hashWords(unsignedContext)); (toSign); SignedContextV1[] memory signedContexts = new SignedContextV1[](1); From e9b23752ac4cdeb5bfa57ecb51949544b26d4d43 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sat, 29 Nov 2025 23:09:34 +0400 Subject: [PATCH 4/9] hash lib update --- foundry.lock | 2 +- lib/rain.lib.hash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index d5ece7f..56d59e2 100644 --- a/foundry.lock +++ b/foundry.lock @@ -9,7 +9,7 @@ "rev": "f92fa66a5f8601bee55692488a198c0a79715707" }, "lib/rain.lib.hash": { - "rev": "97609eecc66fe2e30f37e48834eed4a71304af32" + "rev": "9677b7063fc9ae8c580636760474719d910c2134" }, "lib/rain.lib.typecast": { "rev": "6bf6e0e63bfbff37d9057332ff042a8158397681" diff --git a/lib/rain.lib.hash b/lib/rain.lib.hash index 97609ee..9677b70 160000 --- a/lib/rain.lib.hash +++ b/lib/rain.lib.hash @@ -1 +1 @@ -Subproject commit 97609eecc66fe2e30f37e48834eed4a71304af32 +Subproject commit 9677b7063fc9ae8c580636760474719d910c2134 From b707bd5e06320ed485a27ff8b7f4c4861cececd2 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 30 Nov 2025 20:30:16 +0400 Subject: [PATCH 5/9] update typecast --- foundry.lock | 2 +- lib/rain.lib.typecast | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index 56d59e2..5cb02c7 100644 --- a/foundry.lock +++ b/foundry.lock @@ -12,7 +12,7 @@ "rev": "9677b7063fc9ae8c580636760474719d910c2134" }, "lib/rain.lib.typecast": { - "rev": "6bf6e0e63bfbff37d9057332ff042a8158397681" + "rev": "1eaa22e7290f97903daed752aa28d0d646e0199b" }, "lib/rain.math.binary": { "rev": "54450d62a89be456d07db1b9508f3b8a24dbb5f8" diff --git a/lib/rain.lib.typecast b/lib/rain.lib.typecast index 6bf6e0e..1eaa22e 160000 --- a/lib/rain.lib.typecast +++ b/lib/rain.lib.typecast @@ -1 +1 @@ -Subproject commit 6bf6e0e63bfbff37d9057332ff042a8158397681 +Subproject commit 1eaa22e7290f97903daed752aa28d0d646e0199b From 6568ae8298bcb1a169c4d3c3d3cd60f638b959ae Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 30 Nov 2025 20:39:54 +0400 Subject: [PATCH 6/9] math binary --- foundry.lock | 2 +- lib/rain.math.binary | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index 5cb02c7..ad23806 100644 --- a/foundry.lock +++ b/foundry.lock @@ -15,7 +15,7 @@ "rev": "1eaa22e7290f97903daed752aa28d0d646e0199b" }, "lib/rain.math.binary": { - "rev": "54450d62a89be456d07db1b9508f3b8a24dbb5f8" + "rev": "f44f846a43928ba0a7ed4a7bb810a8933e23cce1" }, "lib/rain.math.float": { "rev": "35b7b3980cdeab2f245dad17ee84658c1065648d" diff --git a/lib/rain.math.binary b/lib/rain.math.binary index 54450d6..f44f846 160000 --- a/lib/rain.math.binary +++ b/lib/rain.math.binary @@ -1 +1 @@ -Subproject commit 54450d62a89be456d07db1b9508f3b8a24dbb5f8 +Subproject commit f44f846a43928ba0a7ed4a7bb810a8933e23cce1 From 885f72d8cba0f5a5c6ec50d2853e2f92fb0f8d8e Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 1 Dec 2025 20:43:54 +0400 Subject: [PATCH 7/9] update float --- foundry.lock | 2 +- lib/rain.math.float | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index ad23806..c9df18b 100644 --- a/foundry.lock +++ b/foundry.lock @@ -18,7 +18,7 @@ "rev": "f44f846a43928ba0a7ed4a7bb810a8933e23cce1" }, "lib/rain.math.float": { - "rev": "35b7b3980cdeab2f245dad17ee84658c1065648d" + "rev": "150f48bb909dd5f8970726d515c87c5257107699" }, "lib/rain.sol.codegen": { "rev": "00734d24d91db3fc4aac87c0a3c885de28449f96" diff --git a/lib/rain.math.float b/lib/rain.math.float index 35b7b39..150f48b 160000 --- a/lib/rain.math.float +++ b/lib/rain.math.float @@ -1 +1 @@ -Subproject commit 35b7b3980cdeab2f245dad17ee84658c1065648d +Subproject commit 150f48bb909dd5f8970726d515c87c5257107699 From da88a8b1f79a391701f132ce04d20ac375c19fbf Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 1 Dec 2025 20:44:57 +0400 Subject: [PATCH 8/9] codegen --- foundry.lock | 2 +- lib/rain.sol.codegen | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index c9df18b..fffe4ec 100644 --- a/foundry.lock +++ b/foundry.lock @@ -21,7 +21,7 @@ "rev": "150f48bb909dd5f8970726d515c87c5257107699" }, "lib/rain.sol.codegen": { - "rev": "00734d24d91db3fc4aac87c0a3c885de28449f96" + "rev": "bd7993b3f6b301e5a667ff687f25b80fdda878cd" }, "lib/rain.solmem": { "rev": "c1c22cf27963a9de0889ebf7f52869050f1fdfb9" diff --git a/lib/rain.sol.codegen b/lib/rain.sol.codegen index 00734d2..bd7993b 160000 --- a/lib/rain.sol.codegen +++ b/lib/rain.sol.codegen @@ -1 +1 @@ -Subproject commit 00734d24d91db3fc4aac87c0a3c885de28449f96 +Subproject commit bd7993b3f6b301e5a667ff687f25b80fdda878cd From 1b925a38bf76dd4f4efb5944af0fb4c5f8e5c813 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Mon, 1 Dec 2025 20:45:59 +0400 Subject: [PATCH 9/9] solmem --- foundry.lock | 2 +- lib/rain.solmem | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/foundry.lock b/foundry.lock index fffe4ec..9386f22 100644 --- a/foundry.lock +++ b/foundry.lock @@ -24,6 +24,6 @@ "rev": "bd7993b3f6b301e5a667ff687f25b80fdda878cd" }, "lib/rain.solmem": { - "rev": "c1c22cf27963a9de0889ebf7f52869050f1fdfb9" + "rev": "f28da2f09d42d154783cb53c138a7ef2f3a9eb4a" } } \ No newline at end of file diff --git a/lib/rain.solmem b/lib/rain.solmem index c1c22cf..f28da2f 160000 --- a/lib/rain.solmem +++ b/lib/rain.solmem @@ -1 +1 @@ -Subproject commit c1c22cf27963a9de0889ebf7f52869050f1fdfb9 +Subproject commit f28da2f09d42d154783cb53c138a7ef2f3a9eb4a