From 3d37783d5c6ef20f744543cf3574f6a291f7d472 Mon Sep 17 00:00:00 2001 From: rmagrys Date: Fri, 20 Mar 2026 14:24:09 +0100 Subject: [PATCH 1/7] sc + interface removal --- src/Client.sol | 20 ++++---------------- src/interfaces/Validator.sol | 28 ---------------------------- 2 files changed, 4 insertions(+), 44 deletions(-) delete mode 100644 src/interfaces/Validator.sol diff --git a/src/Client.sol b/src/Client.sol index 17d6f04..06236fd 100644 --- a/src/Client.sol +++ b/src/Client.sol @@ -268,6 +268,7 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree uint256 sizeOfAllocations = _verifyAndRegisterAllocations(dealId, allocations); uint256 sizeOfClaims = _verifyAndRegisterClaimExtensions(dealId, claimExtensions); uint256 allocationsAndClaimsSize = sizeOfAllocations + sizeOfClaims; + $._metaAllocatorContract .addVerifiedClient(FilAddresses.fromEthAddress(address(this)).data, allocationsAndClaimsSize); @@ -333,16 +334,11 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree * @param cborData The cbor encoded operator data. * @return allocations Array of provider allocations. * @return claimExtensions Array of provider claims. - * @return maxAllocationEndTime Allocation with the longest term. */ function _deserializeVerifregOperatorData(bytes memory cborData) internal pure - returns ( - ProviderAllocation[] memory allocations, - ProviderClaim[] memory claimExtensions, - int64 maxAllocationEndTime - ) + returns (ProviderAllocation[] memory allocations, ProviderClaim[] memory claimExtensions) { uint256 resultLength; uint64 provider; @@ -353,8 +349,6 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree { uint64 size; - int64 termMax; - int64 expiration; (resultLength, byteIdx) = CBORDecoder.readFixedArray(cborData, byteIdx); allocations = new ProviderAllocation[](resultLength); for (uint256 i = 0; i < resultLength; i++) { @@ -376,15 +370,9 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree allocations[i].size = size; } (, byteIdx) = CBORDecoder.readInt64(cborData, byteIdx); // termMin + (, byteIdx) = CBORDecoder.readInt64(cborData, byteIdx); // termMax + (, byteIdx) = CBORDecoder.readInt64(cborData, byteIdx); // expiration // slither-disable-end unused-return - { - (termMax, byteIdx) = CBORDecoder.readInt64(cborData, byteIdx); - (expiration, byteIdx) = CBORDecoder.readInt64(cborData, byteIdx); - - if (termMax + expiration > maxAllocationEndTime) { - maxAllocationEndTime = termMax + expiration; - } - } } } { diff --git a/src/interfaces/Validator.sol b/src/interfaces/Validator.sol deleted file mode 100644 index 724ae01..0000000 --- a/src/interfaces/Validator.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity =0.8.30; -import {CommonTypes} from "filecoin-solidity/v0.8/types/CommonTypes.sol"; - -/** - * @title IValidatorRegistry interface - * @notice IValidatorRegistry interface - * @dev IValidatorRegistry interface is an interface that contains the function to check if a validator is correct - */ -interface IValidator { - /** - * @notice updateLockupPeriod function - * @dev updateLockupPeriod function is a function that updates the lockup period for a validator - * @param railId The id of the rail - * @param newLockupPeriod The new lockup period - */ - function updateLockupPeriod(uint256 railId, uint256 newLockupPeriod) external; - - /** - * @notice Sets the end epoch for the deal associated with this validator - * @dev Only callable by POREP_SERVICE bot - * @param dealId The ID of the deal - * @param endEpoch The Filecoin epoch at which the deal ended - */ - function setDealEndEpoch(uint256 dealId, CommonTypes.ChainEpoch endEpoch) external; -} - From 4e26b353c169a1102c8340e7d07d71abf71f3fc5 Mon Sep 17 00:00:00 2001 From: rmagrys Date: Fri, 20 Mar 2026 14:24:41 +0100 Subject: [PATCH 2/7] ReentrantValidatorMock -> ReentrantMetaAllocatorMock --- ...rantValidatorMock.sol => ReentrantMetaAllocatorMock.sol} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename test/contracts/{ReentrantValidatorMock.sol => ReentrantMetaAllocatorMock.sol} (83%) diff --git a/test/contracts/ReentrantValidatorMock.sol b/test/contracts/ReentrantMetaAllocatorMock.sol similarity index 83% rename from test/contracts/ReentrantValidatorMock.sol rename to test/contracts/ReentrantMetaAllocatorMock.sol index ece496a..93b6b63 100644 --- a/test/contracts/ReentrantValidatorMock.sol +++ b/test/contracts/ReentrantMetaAllocatorMock.sol @@ -2,12 +2,12 @@ // solhint-disable use-natspec pragma solidity =0.8.30; -import {IValidator} from "../../src/interfaces/Validator.sol"; +import {IMetaAllocator} from "../../src/interfaces/IMetaAllocator.sol"; import {Client} from "../../src/Client.sol"; import {DataCapTypes} from "filecoin-solidity/v0.8/types/DataCapTypes.sol"; import {CommonTypes} from "filecoin-solidity/v0.8/types/CommonTypes.sol"; -contract ReentrantValidatorMock is IValidator { +contract ReentrantMetaAllocatorMock is IMetaAllocator { Client public client; DataCapTypes.TransferParams public attackParams; uint256 public attackDealId; @@ -20,7 +20,7 @@ contract ReentrantValidatorMock is IValidator { shouldAttack = true; } - function updateLockupPeriod(uint256, uint256) external override { + function addVerifiedClient(bytes calldata, uint256) external override { if (shouldAttack) { shouldAttack = false; client.transfer(attackParams, attackDealId, false); From 969335961e320439af9995ddb4ff41760f5116f1 Mon Sep 17 00:00:00 2001 From: rmagrys Date: Fri, 20 Mar 2026 14:24:56 +0100 Subject: [PATCH 3/7] test and mocks --- test/Client.t.sol | 85 +++++++------------------------- test/contracts/ValidatorMock.sol | 7 ++- 2 files changed, 21 insertions(+), 71 deletions(-) diff --git a/test/Client.t.sol b/test/Client.t.sol index 0053b3e..78869cc 100644 --- a/test/Client.t.sol +++ b/test/Client.t.sol @@ -24,7 +24,8 @@ import {ActorIdExitCodeErrorFailingMock} from "./contracts/ActorIdExitCodeErrorF import {FailingMockAddVerifiedClient} from "./contracts/FailingMockAddVerifiedClient.sol"; import {AllocationResponseCbor} from "../src/lib/AllocationResponseCbor.sol"; import {ClientContractMock} from "./contracts/ClientContractMock.sol"; -import {ReentrantValidatorMock} from "./contracts/ReentrantValidatorMock.sol"; +import {ReentrantMetaAllocatorMock} from "./contracts/ReentrantMetaAllocatorMock.sol"; +import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import {SLITypes} from "../src/types/SLITypes.sol"; import {PoRepTypes} from "../src/types/PoRepTypes.sol"; import {MetaAllocatorMock} from "./contracts/MetaAllocatorMock.sol"; @@ -132,7 +133,6 @@ contract ClientTest is Test { } function setupProxy(address impl) public returns (address) { - // solhint-disable-next-line gas-small-strings bytes memory initData = abi.encodeCall( Client.initialize, (address(this), terminationOracle, address(poRepMarketMock), address(metaAllocatorMock)) ); @@ -406,6 +406,8 @@ contract ClientTest is Test { // solhint-disable-next-line reentrancy transferParams.operator_data = hex"828286192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A0050334019013186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221950001A0007E9001A009C7E801901318183192710011A005034AC"; + vm.expectEmit(true, true, true, true); + emit Client.DatacapSpent(clientAddress, 28672); clientMock.transfer(transferParams, dealId, false); Client.Deal memory deal = clientMock.getDeal(dealId); @@ -416,70 +418,15 @@ contract ClientTest is Test { assertEq(deal.client, clientAddress); } - // solhint-disable reentrancy - function testShouldUpdateMaxAllocationEndTimeWhenNewDealIsLongerThanCurrent() public { - ClientContractMock clientMock = ClientContractMock(setupProxy(address(new ClientContractMock()))); - metaAllocatorMock.setAllowance(address(clientMock), uint256(1000000)); - int64 expectedMaxAllocationEndTimeBefore = 5256305; - int64 expectedMaxAllocationEndTimeAfter = 10256305; - - // termMax + expiration -> 5256305 - transferParams.operator_data = - hex"828186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A005033401901318183192710011A005034AC"; - vm.prank(clientAddress); - clientMock.transfer(transferParams, dealId, false); - - Client.Deal memory deal = clientMock.getDeal(dealId); - assertTrue(CommonTypes.ChainEpoch.unwrap(deal.maxAllocationEndTime) == expectedMaxAllocationEndTimeBefore); - - // termMax + expiration -> 10256305 - transferParams.operator_data = - hex"828286192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A0050334019013186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221950001A0007E9001A009C7E801901318183192710011A005034AC"; - vm.prank(clientAddress); - clientMock.transfer(transferParams, dealId, false); - - deal = clientMock.getDeal(dealId); - assertTrue(CommonTypes.FilActorId.unwrap(deal.provider) == CommonTypes.FilActorId.unwrap(SP1)); - assertEq(deal.dealId, dealId); - assertEq(deal.validator, address(validatorMock)); - assertEq(deal.railId, 0); - assertEq(deal.client, clientAddress); - assertTrue(CommonTypes.ChainEpoch.unwrap(deal.maxAllocationEndTime) == expectedMaxAllocationEndTimeAfter); - } - - function testShouldNotUpdateMaxAllocationEndTimeWhenNewDealIsShorterThanCurrent() public { - ClientContractMock clientMock = ClientContractMock(setupProxy(address(new ClientContractMock()))); - metaAllocatorMock.setAllowance(address(clientMock), uint256(1000000)); - int64 expectedMaxAllocationEndTimeBefore = 5256305; - int64 expectedMaxAllocationEndTimeAfter = expectedMaxAllocationEndTimeBefore; - - // termMax + expiration -> 5256305 from operator_data - transferParams.operator_data = - hex"828186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A005033401901318183192710011A005034AC"; - vm.prank(clientAddress); - clientMock.transfer(transferParams, dealId, false); - - Client.Deal memory deal = clientMock.getDeal(dealId); - assertTrue(CommonTypes.ChainEpoch.unwrap(deal.maxAllocationEndTime) == expectedMaxAllocationEndTimeBefore); - - // termMax + expiration -> 2256305 from operator_data - transferParams.operator_data = - hex"828286192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A0050334019013186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221950001A0007E9001A00226C801901318183192710011A005034AC"; - vm.prank(clientAddress); - clientMock.transfer(transferParams, dealId, false); - - deal = clientMock.getDeal(dealId); - assertTrue(CommonTypes.FilActorId.unwrap(deal.provider) == CommonTypes.FilActorId.unwrap(SP1)); - assertEq(deal.dealId, dealId); - assertEq(deal.validator, address(validatorMock)); - assertEq(deal.railId, 0); - assertEq(deal.client, clientAddress); - assertTrue(CommonTypes.ChainEpoch.unwrap(deal.maxAllocationEndTime) == expectedMaxAllocationEndTimeAfter); - } - - // solhint-enable reentrancy function testShouldNotTransferIfReentrantCall() public { - ReentrantValidatorMock reentrantValidatorMock = new ReentrantValidatorMock(); + ReentrantMetaAllocatorMock reentrantMetaAllocatorMock = new ReentrantMetaAllocatorMock(); + address impl = address(new Client()); + bytes memory initData = abi.encodeCall( + Client.initialize, + (address(this), allocator, terminationOracle, address(poRepMarketMock), address(reentrantMetaAllocatorMock)) + ); + Client clientWithReentrancy = Client(address(new ERC1967Proxy(address(impl), initData))); + poRepMarketMock.setDealProposal( dealId, PoRepTypes.DealProposal({ @@ -490,15 +437,17 @@ contract ClientTest is Test { retrievabilityBps: 80, bandwidthMbps: 500, latencyMs: 200, indexingPct: 90 }), terms: SLITypes.DealTerms({dealSizeBytes: 1024, pricePerSector: 100, durationDays: 365}), - validator: address(reentrantValidatorMock), state: PoRepTypes.DealState.Accepted, + validator: address(validatorMock), railId: 0, manifestLocation: expectedManifestLocation }) ); - reentrantValidatorMock.setAttackParams(address(client), transferParams, dealId); + reentrantMetaAllocatorMock.setAttackParams(address(clientWithReentrancy), transferParams, dealId); vm.prank(clientAddress); client.transfer(transferParams, dealId, true); + vm.expectRevert(abi.encodeWithSelector(ReentrancyGuard.ReentrancyGuardReentrantCall.selector)); + clientWithReentrancy.transfer(transferParams, dealId, false); } function testShouldAddClaimExtensionIdsAfterTransfer() public { @@ -531,6 +480,8 @@ contract ClientTest is Test { transferParams.operator_data = hex"828286192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A0050334019013186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221950001A0007E9001A009C7E801901318183192710041A005034AC"; actorIdMock.setDataCapTransferResult(hex"834100410049838201808200808102"); + vm.expectEmit(true, true, true, true); + emit Client.DatacapSpent(clientAddress, 28672); vm.prank(clientAddress); clientMock.transfer(transferParams, dealId, false); diff --git a/test/contracts/ValidatorMock.sol b/test/contracts/ValidatorMock.sol index 85e96f0..6a0fd88 100644 --- a/test/contracts/ValidatorMock.sol +++ b/test/contracts/ValidatorMock.sol @@ -1,12 +1,11 @@ // SPDX-License-Identifier: MIT // solhint-disable -pragma solidity =0.8.30; - -import {IValidator} from "../../src/interfaces/Validator.sol"; import {CommonTypes} from "filecoin-solidity/v0.8/types/CommonTypes.sol"; -contract ValidatorMock is IValidator { +pragma solidity =0.8.30; + +contract ValidatorMock { function updateLockupPeriod(uint256 railId, uint256 newLockupPeriod) external { // noop } From 98ceb7b95957cadf473a589cea2658fa04fa6fcd Mon Sep 17 00:00:00 2001 From: rmagrys Date: Fri, 20 Mar 2026 16:11:06 +0100 Subject: [PATCH 4/7] cr fix --- src/Client.sol | 1 - test/contracts/ClientSCMock.sol | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/Client.sol b/src/Client.sol index 06236fd..702145c 100644 --- a/src/Client.sol +++ b/src/Client.sol @@ -164,7 +164,6 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree uint256 dealId; uint256 railId; uint256 sizeOfAllocations; - CommonTypes.ChainEpoch maxAllocationEndTime; CommonTypes.FilActorId[] allocationIds; } diff --git a/test/contracts/ClientSCMock.sol b/test/contracts/ClientSCMock.sol index 4b6997c..598597b 100644 --- a/test/contracts/ClientSCMock.sol +++ b/test/contracts/ClientSCMock.sol @@ -24,10 +24,6 @@ contract ClientSCMock { return dataSizeMatches[dealId]; } - function setLongestDealTerm(uint256 dealId, int64 longestDealTerm) external { - deals[dealId].maxAllocationEndTime = CommonTypes.ChainEpoch.wrap(longestDealTerm); - } - function getClientDealInfo(uint256 dealId) external view returns (Client.Deal memory) { return deals[dealId]; } From db24928c44cb7791f33795e396782b0135784e4c Mon Sep 17 00:00:00 2001 From: RafalMagrys Date: Mon, 23 Mar 2026 11:35:41 +0100 Subject: [PATCH 5/7] cr fix --- src/Client.sol | 8 ++++---- test/Client.t.sol | 12 ++++++------ test/contracts/ReentrantMetaAllocatorMock.sol | 8 -------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/Client.sol b/src/Client.sol index 702145c..65ba27a 100644 --- a/src/Client.sol +++ b/src/Client.sol @@ -258,12 +258,9 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree } if (msg.sender != deal.client) revert InvalidClient(); - (ProviderAllocation[] memory allocations, ProviderClaim[] memory claimExtensions, int64 maxAllocationEndTime) = + (ProviderAllocation[] memory allocations, ProviderClaim[] memory claimExtensions) = _deserializeVerifregOperatorData(params.operator_data); - if (maxAllocationEndTime > CommonTypes.ChainEpoch.unwrap(deal.maxAllocationEndTime)) { - deal.maxAllocationEndTime = CommonTypes.ChainEpoch.wrap(maxAllocationEndTime); - } uint256 sizeOfAllocations = _verifyAndRegisterAllocations(dealId, allocations); uint256 sizeOfClaims = _verifyAndRegisterClaimExtensions(dealId, claimExtensions); uint256 allocationsAndClaimsSize = sizeOfAllocations + sizeOfClaims; @@ -398,6 +395,8 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree } } + event debug(address, address); + /** * @notice Verifies and registers a deal. * @param dealId The deal id. @@ -407,6 +406,7 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree PoRepTypes.DealProposal memory proposal = $._poRepMarketContract.getDealProposal(dealId); + emit debug(proposal.client, msg.sender); if (proposal.client != msg.sender) { revert InvalidClient(); } diff --git a/test/Client.t.sol b/test/Client.t.sol index 78869cc..64e2c3d 100644 --- a/test/Client.t.sol +++ b/test/Client.t.sol @@ -407,7 +407,7 @@ contract ClientTest is Test { transferParams.operator_data = hex"828286192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A0050334019013186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221950001A0007E9001A009C7E801901318183192710011A005034AC"; vm.expectEmit(true, true, true, true); - emit Client.DatacapSpent(clientAddress, 28672); + emit Client.DatacapSpent(clientAddress, 24576); clientMock.transfer(transferParams, dealId, false); Client.Deal memory deal = clientMock.getDeal(dealId); @@ -418,19 +418,19 @@ contract ClientTest is Test { assertEq(deal.client, clientAddress); } - function testShouldNotTransferIfReentrantCall() public { + function testReentryAttemptWillThrowInvalidClientError() public { ReentrantMetaAllocatorMock reentrantMetaAllocatorMock = new ReentrantMetaAllocatorMock(); address impl = address(new Client()); bytes memory initData = abi.encodeCall( Client.initialize, - (address(this), allocator, terminationOracle, address(poRepMarketMock), address(reentrantMetaAllocatorMock)) + (address(this), terminationOracle, address(poRepMarketMock), address(reentrantMetaAllocatorMock)) ); Client clientWithReentrancy = Client(address(new ERC1967Proxy(address(impl), initData))); poRepMarketMock.setDealProposal( dealId, PoRepTypes.DealProposal({ - dealId: 150, + dealId: dealId, client: clientAddress, provider: SP1, requirements: SLITypes.SLIThresholds({ @@ -446,7 +446,7 @@ contract ClientTest is Test { reentrantMetaAllocatorMock.setAttackParams(address(clientWithReentrancy), transferParams, dealId); vm.prank(clientAddress); client.transfer(transferParams, dealId, true); - vm.expectRevert(abi.encodeWithSelector(ReentrancyGuard.ReentrancyGuardReentrantCall.selector)); + vm.expectRevert(abi.encodeWithSelector(Client.InvalidClient.selector)); clientWithReentrancy.transfer(transferParams, dealId, false); } @@ -481,7 +481,7 @@ contract ClientTest is Test { hex"828286192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221908001A0007E9001A0050334019013186192710D82A5828000181E203922020F2B9A58BBC9D9856E52EAB85155C1BA298F7E8DF458BD20A3AD767E11572CA221950001A0007E9001A009C7E801901318183192710041A005034AC"; actorIdMock.setDataCapTransferResult(hex"834100410049838201808200808102"); vm.expectEmit(true, true, true, true); - emit Client.DatacapSpent(clientAddress, 28672); + emit Client.DatacapSpent(clientAddress, 24576); vm.prank(clientAddress); clientMock.transfer(transferParams, dealId, false); diff --git a/test/contracts/ReentrantMetaAllocatorMock.sol b/test/contracts/ReentrantMetaAllocatorMock.sol index 93b6b63..f32512b 100644 --- a/test/contracts/ReentrantMetaAllocatorMock.sol +++ b/test/contracts/ReentrantMetaAllocatorMock.sol @@ -5,7 +5,6 @@ pragma solidity =0.8.30; import {IMetaAllocator} from "../../src/interfaces/IMetaAllocator.sol"; import {Client} from "../../src/Client.sol"; import {DataCapTypes} from "filecoin-solidity/v0.8/types/DataCapTypes.sol"; -import {CommonTypes} from "filecoin-solidity/v0.8/types/CommonTypes.sol"; contract ReentrantMetaAllocatorMock is IMetaAllocator { Client public client; @@ -26,11 +25,4 @@ contract ReentrantMetaAllocatorMock is IMetaAllocator { client.transfer(attackParams, attackDealId, false); } } - - function setDealEndEpoch(uint256, CommonTypes.ChainEpoch) external override { - if (shouldAttack) { - shouldAttack = false; - client.transfer(attackParams, attackDealId, false); - } - } } From 7a65ef0f44ff5715999762fdf7b0f7305d2a8715 Mon Sep 17 00:00:00 2001 From: RafalMagrys Date: Mon, 23 Mar 2026 11:44:57 +0100 Subject: [PATCH 6/7] CI fix --- src/Client.sol | 3 --- test/Client.t.sol | 1 - 2 files changed, 4 deletions(-) diff --git a/src/Client.sol b/src/Client.sol index 65ba27a..815b23d 100644 --- a/src/Client.sol +++ b/src/Client.sol @@ -395,8 +395,6 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree } } - event debug(address, address); - /** * @notice Verifies and registers a deal. * @param dealId The deal id. @@ -406,7 +404,6 @@ contract Client is Initializable, AccessControlUpgradeable, UUPSUpgradeable, Ree PoRepTypes.DealProposal memory proposal = $._poRepMarketContract.getDealProposal(dealId); - emit debug(proposal.client, msg.sender); if (proposal.client != msg.sender) { revert InvalidClient(); } diff --git a/test/Client.t.sol b/test/Client.t.sol index 64e2c3d..e5dd07b 100644 --- a/test/Client.t.sol +++ b/test/Client.t.sol @@ -25,7 +25,6 @@ import {FailingMockAddVerifiedClient} from "./contracts/FailingMockAddVerifiedCl import {AllocationResponseCbor} from "../src/lib/AllocationResponseCbor.sol"; import {ClientContractMock} from "./contracts/ClientContractMock.sol"; import {ReentrantMetaAllocatorMock} from "./contracts/ReentrantMetaAllocatorMock.sol"; -import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import {SLITypes} from "../src/types/SLITypes.sol"; import {PoRepTypes} from "../src/types/PoRepTypes.sol"; import {MetaAllocatorMock} from "./contracts/MetaAllocatorMock.sol"; From 617fd5f98b0eb4af78be4c25eeae284e02833ccb Mon Sep 17 00:00:00 2001 From: RafalMagrys Date: Mon, 23 Mar 2026 12:02:31 +0100 Subject: [PATCH 7/7] fmt --- test/contracts/ValidatorMock.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/contracts/ValidatorMock.sol b/test/contracts/ValidatorMock.sol index 6a0fd88..5e45628 100644 --- a/test/contracts/ValidatorMock.sol +++ b/test/contracts/ValidatorMock.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT // solhint-disable -import {CommonTypes} from "filecoin-solidity/v0.8/types/CommonTypes.sol"; - pragma solidity =0.8.30; +import {CommonTypes} from "filecoin-solidity/v0.8/types/CommonTypes.sol"; + contract ValidatorMock { function updateLockupPeriod(uint256 railId, uint256 newLockupPeriod) external { // noop