Merge pull request #739 from input-output-hk/bwbush/mempool-sim-4
Adversarial mempool experiments
Adversarial mempool experiments
Landing page enhancements: - Add Live Tracker section with static preview image linking to tracker - Add Mempool Simulation section with embedded iframe - Alternate section layouts (visual left/right) for visual variety - Style "Stay up to date" section with featured purple gradient background - Fix LinkButton hover effect for light theme (purple gradient) - Remove document icon from LinkButton Mempool simulator embed mode: - Add URL parameters: embed, autoPlay, hideControls, hideStats, etc. - Auto-start simulation when iframe becomes visible (IntersectionObserver) - Support speed parameter for embed playback
Implements Cardano-style P2P peer selection to make front-running more difficult through dynamic topology changes. Peers cycle through cold, warm, and hot states with periodic churn events. Key changes: - Add PeerManager class to track peer states per node - Add PeerChurn simulation event for periodic state transitions - Modify tx propagation to only use hot upstream peers in P2P mode - Add CLI flags: --p2p, --p2p-hot-peers, --p2p-churn-interval, --p2p-demotion-prob The feature is toggleable (off by default) to preserve existing static topology behavior.
Replace cold/warm/hot state machine with a simpler active set model: - Each node maintains a subset of active peers from topology - Churn probabilistically replaces active peers with inactive ones - Removes PeerState type and PeerInfo interface - Renames CLI options: --p2p-hot-peers → --p2p-active-peers, --p2p-demotion-prob → --p2p-churn-prob This mirrors Cardano's peer selection governor behavior with partial, probabilistic churn rather than wholesale peer set replacement.
Also convert config to yaml for it allows comments
- Remove redundant console.log in cli.ts (already logged via logger.fatal) - Remove duplicate Canvas useEffect that called draw() on every change - Use hoveredNodeRef instead of state in draw() to avoid recreation on mouse move - Throttle force layout position updates with requestAnimationFrame - Only update event log state when lengths actually change - Only update animatedTxs state when count changes These changes prevent the force layout from triggering 100+ React re-renders per second during initial settling.