Commit Graph

334 Commits

Author SHA1 Message Date
vyzo 0824316326 finetune GraftPruneRetry test, so that it doesn't get OOM killed 2018-06-12 08:00:17 -07:00
vyzo a71eec5c3a test control message retry piggybacking 2018-06-12 08:00:17 -07:00
vyzo f5d6cf3bd1 TestGossipsubGraftPruneCoalesce is TestGossipsubGraftPruneRetry
it is really testing full queues (sized 32) and retries of control
messages and announces
2018-06-12 08:00:17 -07:00
vyzo 009efebdaf harden piggybackControl
don't create a control object if the graft/prune are stale and only assign
the relevant fields.
2018-06-12 08:00:17 -07:00
vyzo bfb0664581 retry dropped ANNOUNCE messages
they are very important for correct topic state in the protocol, esp gossipsub
2018-06-12 08:00:17 -07:00
vyzo af061f5040 refactor sendGraftPrune out of heartbeat 2018-06-12 08:00:17 -07:00
vyzo 285c1f0aa7 add test for graft/prune coalescing in heartbeat 2018-06-12 08:00:17 -07:00
vyzo ef730627ad remove unnecessary and potentially harmful check from heartbeat
- the check is unnecessary because peers emit PRUNE on Leave
- the check is harmful, because the ANNOUNCE message might have
  benn lost (or reordered after the GRAFT depending on the retry
  strategy), which would leave the mesh in an inconsistent state.
2018-06-12 08:00:17 -07:00
vyzo e8c5cf0914 test gossip propagation with IHAVE/IWANT cycle 2018-06-12 08:00:17 -07:00
vyzo 4667b0ae94 fanout sources should emit gossip too 2018-06-12 08:00:17 -07:00
vyzo 3ecfbc2a60 better test for fanout maintenance 2018-06-12 08:00:17 -07:00
vyzo 75787fb809 moar gossipsub tests 2018-06-12 08:00:17 -07:00
vyzo 5533949443 finetune gossip test, add join grafting test 2018-06-12 08:00:17 -07:00
vyzo 66fc8adac5 more gossipsub tests 2018-06-12 08:00:17 -07:00
vyzo 626b04f2a8 fix go vet issues in mcache test 2018-06-12 08:00:17 -07:00
vyzo 0a82522cf6 basic gossipsub tests 2018-06-12 08:00:17 -07:00
vyzo 1f5959bf54 fix slice bounds issues; getCount takes care of the slicing 2018-06-12 08:00:17 -07:00
vyzo 060a9bba62 mcache test 2018-06-12 08:00:17 -07:00
vyzo 599ccffecd shift the message history window at the end of the heartbeat 2018-06-12 08:00:17 -07:00
vyzo 64cdbbabbc remove pending gossip and control messages on RemovePeer 2018-06-12 08:00:17 -07:00
vyzo bd29e81e3a history and gossip length are named constants 2018-06-12 08:00:17 -07:00
vyzo c5fe290389 reduce gossip amplification; don't send to mesh peers 2018-06-12 08:00:17 -07:00
vyzo 0e288dc741 delete mesh before sending prunes on leave 2018-06-12 08:00:17 -07:00
vyzo 64d35994d1 shuffle peers 2018-06-12 08:00:17 -07:00
vyzo 8fbc4e1c70 implement mcache 2018-06-12 08:00:17 -07:00
vyzo 07875f149e implement flush 2018-06-12 08:00:17 -07:00
vyzo 74a10cfa70 piggybacking details 2018-06-12 08:00:17 -07:00
vyzo 7251c64e65 control message piggybacking logic 2018-06-12 08:00:17 -07:00
vyzo 78618fce23 maintain fanout peer lists on heartbeat 2018-06-12 08:00:17 -07:00
vyzo bc25116516 clean peers that have left the topic on heartbeat 2018-06-12 08:00:17 -07:00
vyzo 73da341386 hearbeat preliminaries: overlay management 2018-06-12 08:00:17 -07:00
vyzo 34509d47b3 implement Join and Leave, refactor sendRPC 2018-06-12 08:00:17 -07:00
vyzo e1fbe11c97 refactor Publish to use getPeers 2018-06-12 08:00:17 -07:00
vyzo 6a177a7396 handle gossipsub control messages 2018-06-12 08:00:17 -07:00
vyzo dd50a31c40 add gossipsub control messages 2018-06-12 08:00:17 -07:00
vyzo 375c4176b9 gossipsub publish 2018-06-12 08:00:17 -07:00
vyzo b867200fee gossipsub: heartbeat timer 2018-06-12 08:00:17 -07:00
vyzo d6104094c8 increase timeCache length to 120s 2018-06-12 08:00:17 -07:00
vyzo 458c75b33f add TODO for reliable announcements 2018-06-12 08:00:17 -07:00
vyzo b09c9d1a48 check and mark seen messages prior to validation
this allows us to avoid revalidating messages, either because they were concurrently
received or were previously rejected by the validator.
also allows us to filter invalid messages from gossip.
2018-06-12 08:00:17 -07:00
vyzo 448f380722 gossipsub: router outline 2018-06-12 08:00:17 -07:00
vyzo 8680a79d3a add Join/Leave to PubSubRouter interface
advanced routers will want to know when they are subscribed to a topic as
they may want to send control messages.
2018-06-12 08:00:17 -07:00
Steven Allen 1c92f1a4f2 gx publish 0.9.17 2018-06-09 10:28:48 -07:00
Steven Allen 007a3fc768
Merge pull request #82 from libp2p/feat/pluggable-protocol
Make FloodSub Protocols Configurable
2018-06-09 17:28:22 +00:00
Steven Allen 37a9fdb70a gx publish 0.9.16 2018-06-08 22:31:49 -07:00
Steven Allen 56e1c535e8 gx publish 0.9.15 2018-06-08 20:26:20 -07:00
Erin Swenson-Healey 75fcbf0c2c New -> NewFloodsubWithProtocols 2018-06-07 09:21:08 -07:00
Erin Swenson-Healey 6840b190db allow FloodSubRouter to be configured with protocols 2018-06-07 09:21:08 -07:00
Steven Allen 0070dfbf72
Merge pull request #73 from libp2p/feat/refactor
update for transport refactor
2018-06-06 07:26:37 +00:00
James Ray 25775e3e8b
Remove gossipsub mention for Python, add Javascript for floodsub 2018-06-06 10:45:51 +10:00