mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 16:24:45 +00:00
Replace fixed 1KB bloom filters with variable-size filters (512B-32KB) that adapt to each node's position in the spanning tree. Core changes: - Internal storage: Vec<u8> → Vec<u64> for word-level operations - Delta compression: XOR diff with word-level RLE, sequence-based NACK protocol for full retransmit recovery - Size conversion: fold (large→small) and duplicate (small→large) with auto-converting merge for mixed-size filter combination - Native-size storage: peer filters stored at advertised size for full-resolution routing queries, converted only for outgoing filter - Adaptive sizing: outgoing fill ratio drives step-up/step-down between size classes with hysteresis (20%/5% thresholds) - Filter size decoupled from FMP negotiation: announced dynamically in filter updates, bit 7 and TLV field 1 removed from handshake Wire format: FilterAnnounce gains flags byte (delta bit), base_seq field, RLE-compressed payload. New FilterNack message (0x21) for out-of-sequence delta recovery.