go-algorand icon indicating copy to clipboard operation
go-algorand copied to clipboard

p2p: hybrid node net identity for connection deduplication

Open algorandskiy opened this issue 8 months ago • 8 comments

Summary

  1. Refactored net identity scheme constructors to allow hybrid net to create p2pNet and wsNet with predefined identity trackers and schema.
  2. Allowed multiple dedup names in identity tracker.
  3. Setting EnableP2PHybridMode also requires PublicAddress to be set on nodes listening NetAddress or P2PNetAddress
  4. Added hybrid p2p scenarios to netdeploy
  5. Removed gossipSubPeer type because of type cast in hybrid mode causing panic (see in comments)
  6. Fixed possible letter case mismatch of PublicAddress from config with netAddr fetched from DNS.

Test Plan

Added new unit tests and run cluster tests.

Pulled TODOs from https://github.com/algorand/go-algorand/pull/5939

  • [x] cluster performance tests for hybrid mode Validated deduplication in logs, found and fixed PublicAddress vs DNS netAddr letter case issue. scenario1s half: 4R+4N+4NPN results:
    hybrid=p2p (all nodes p2p, some hybrid): 6244.04 TPS
    hybrid=ws (all nodes ws, some hybrid): 6225.84 TPS
    hybrid=no (all nodes p2p): 6244.78 TPS
    
  • [ ] connection/traffic limits are aggregated for both ws and p2p nets in hybrid mode

algorandskiy avatar Jun 19 '24 00:06 algorandskiy