Skip to content

Commit b6a5f22

Browse files
committed
test(host-contracts): drop cast-granularity invariant
1 parent 3430849 commit b6a5f22

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

host-contracts/test/hcuLimit/HCULimit.invariants.t.sol

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,9 @@ contract HCULimitInvariantTest is StdInvariant, Test {
155155
function setUp() public {
156156
// Invariants targeted by this harness:
157157
// 1) block meter block number equals current block.
158-
// 2) used block HCU stays aligned with cast-op granularity (multiple of 32).
159-
// 3) whitelisted callers never consume the public block meter.
160-
// 4) non-whitelisted accounting is consistent with successful casts.
161-
// 5) meter resets after block advancement.
158+
// 2) whitelisted callers never consume the public block meter.
159+
// 3) non-whitelisted accounting is consistent with successful casts.
160+
// 4) meter resets after block advancement.
162161
_deployAndEtchACL();
163162

164163
address proxy =
@@ -191,12 +190,6 @@ contract HCULimitInvariantTest is StdInvariant, Test {
191190
assertEq(blockNumber, uint64(block.number));
192191
}
193192

194-
function invariant_blockMeterUsesCastGranularity() public view {
195-
// Invariant: accounted block HCU is made of Uint8 cast ops (32 HCU each), so it stays a multiple of 32.
196-
(, uint192 usedHCU) = hcuLimit.getBlockMeter();
197-
assertEq(uint256(usedHCU) % 32, 0);
198-
}
199-
200193
function invariant_whitelistedCallsDoNotConsumePublicMeter() public view {
201194
// Invariant: calls from whitelisted callers must never increase the public block meter.
202195
assertFalse(handler.whitelistViolation());

0 commit comments

Comments
 (0)