You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests block validation resilience under various memory pressure scenarios and subtree patterns. This validates that the block validation system can handle extreme cases without panicking or leaking resources.
538
+
539
+
**What it tests:**
540
+
- Block validation with random subtree patterns (transient, deep chains, mixed)
541
+
- Memory usage and heap allocations during validation
542
+
- Goroutine lifecycle and cleanup
543
+
- Cache hit rates and eviction under pressure
544
+
- Concurrent validation under load
545
+
-`ValidateBlockWithOptions` never panics on any generated subtree
546
+
-`setTxMinedStatus` succeeds for all transactions
547
+
548
+
**How to run:**
549
+
```bash
550
+
# Using helper script
551
+
./test/chaos/run_scenario_08.sh
552
+
553
+
# Using go test directly
554
+
go test -v ./test/chaos -run TestScenario08
555
+
```
556
+
557
+
**Test phases:**
558
+
559
+
1.**Baseline Metrics**
560
+
- Capture initial heap allocation
561
+
- Record starting goroutine count
562
+
- Force GC for clean baseline
563
+
564
+
2.**Transient Subtrees (50 blocks)**
565
+
- Generate many small blocks (shallow depth, few TXs)
566
+
- Validate each subtree
567
+
- Monitor heap allocation growth
568
+
- Verify no goroutine leaks
569
+
- Target: < 500 MB heap, < 200 goroutines
570
+
571
+
3.**Deep Chains (100 blocks)**
572
+
- Generate deep transaction chains (up to 10 levels)
All planned chaos test scenarios have been implemented!
869
+
All chaos test scenarios have been implemented! Total: **8 scenarios** covering network failures, infrastructure issues, and internal system resilience.
0 commit comments