@@ -5,10 +5,12 @@ import { setupFuzzOracles, type OracleState } from "./core/steps.ts";
55import type { OperatorRecord , ClusterRecord } from "./core/types.ts" ;
66import {
77 assertDaoVUnitsMatchCluster ,
8+ assertOperatorValidatorCounts ,
89 assertOperatorEarningsWithEB ,
10+ assertNetworkEarningsWithEB ,
911 assertClusterBalanceWithEB ,
1012 assertEthConservation ,
11- getContractEthBalance ,
13+ type EBNetworkEarningsSnapshot ,
1214} from "./core/assertions.ts" ;
1315import { computeClusterId , computeEBRoot , commitEBRoot } from "../helpers/oracle.ts" ;
1416import { parseClusterFromEvent } from "../helpers/cluster.ts" ;
@@ -30,6 +32,7 @@ interface State {
3032 maxEB : number ;
3133 maxVUnits : bigint ;
3234 maxBurnRate : bigint ;
35+ lastEBNetworkEarnings ?: EBNetworkEarningsSnapshot ;
3336 tickDepositDelta : bigint ;
3437}
3538
@@ -124,9 +127,12 @@ describe("Fuzz: Max EB (2048 ETH/validator) — high burn rate accrual (CAT-3-4)
124127 const { cluster } = ctx . state ;
125128
126129 await assertDaoVUnitsMatchCluster ( ctx ) ;
130+ await assertOperatorValidatorCounts ( ctx ) ;
127131
128132 await assertOperatorEarningsWithEB ( ctx ) ;
129133 await assertClusterBalanceWithEB ( ctx ) ;
134+ await assertNetworkEarningsWithEB ( ctx ) ;
135+ await assertEthConservation ( ctx ) ;
130136
131137 const isLiq = await ctx . views . isLiquidatable (
132138 cluster . owner . address , cluster . operatorIds , cluster . cluster ,
@@ -145,8 +151,10 @@ describe("Fuzz: Max EB (2048 ETH/validator) — high burn rate accrual (CAT-3-4)
145151 await mineBlocks ( ctx . provider , 50 ) ;
146152
147153 await assertDaoVUnitsMatchCluster ( ctx ) ;
154+ await assertOperatorValidatorCounts ( ctx ) ;
148155 await assertOperatorEarningsWithEB ( ctx ) ;
149156 await assertClusterBalanceWithEB ( ctx ) ;
157+ await assertNetworkEarningsWithEB ( ctx ) ;
150158 await assertEthConservation ( ctx ) ;
151159
152160 const eb = BigInt (
@@ -163,10 +171,7 @@ describe("Fuzz: Max EB (2048 ETH/validator) — high burn rate accrual (CAT-3-4)
163171 } ,
164172 } ,
165173 ] ,
166-
167- async after ( ctx ) {
168- expect ( ctx . state . phase ) . to . equal ( "high-burn-verified" ) ;
169- } ,
174+ expectedPhase : "high-burn-verified" ,
170175 } , seed ) ;
171176 } ) ;
172177 }
0 commit comments