File tree Expand file tree Collapse file tree
development/qnet-integration/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13127,10 +13127,19 @@ impl SimplifiedP2P {
1312713127 // 5 nodes → 11/min, 100 nodes → 30/min, 1000 nodes → 200/min (cap).
1312813128 // This ensures: (a) small networks aren't over-limited, (b) large networks
1312913129 // don't allow unbounded CPU burn, (c) no magic constants to tune manually.
13130- let active_count = self.active_full_super_nodes.len();
13131- let adaptive_limit = (10 + active_count / 5).min(200);
13132- if self.is_consensus_rate_limited(from_peer, "active_announce", adaptive_limit) {
13133- return;
13130+ //
13131+ // v9.5: Bootstrap bypass — at height 0 (no blocks produced yet), nodes MUST
13132+ // register with each other to reach quorum and start producing. Rate limiting
13133+ // at this stage causes a deadlock: nodes can't register → can't produce →
13134+ // stay at height 0 forever. Dedup (seen_announcements below) still prevents
13135+ // redundant Dilithium3 verification, so CPU is protected without rate limiting.
13136+ let local_h = LOCAL_BLOCKCHAIN_HEIGHT.load(std::sync::atomic::Ordering::Relaxed);
13137+ if local_h > 0 {
13138+ let active_count = self.active_full_super_nodes.len();
13139+ let adaptive_limit = (10 + active_count / 5).min(200);
13140+ if self.is_consensus_rate_limited(from_peer, "active_announce", adaptive_limit) {
13141+ return;
13142+ }
1313413143 }
1313513144
1313613145 // v9.1: Dedup — skip if already processed this exact announcement.
You can’t perform that action at this time.
0 commit comments