Commit Graph

487 Commits

Author SHA1 Message Date
vyzo 7a5aaa8d1c don't blanket wait for 1s to accumulate a batch.
Instead check the batch size and poll every 100ms (up to 1s) until the
minimum batch size is accumulated.
2019-11-19 00:18:10 +02:00
vyzo 24a1181b9a move niling of trace buffer to the end
this avoids holding on memory while we are waiting.
2019-11-19 00:07:57 +02:00
vyzo 91527e2d10 lossy tracing for remote tracers
Don't accumulate memory if the tracer is being slow or unavailable, just drop the trace and log.
2019-11-18 22:01:31 +02:00
vyzo cce30a4d6a reset remote tracer stream on errors 2019-11-18 17:33:53 +02:00
vyzo abe4763c01 compress entire stream in remote tracer 2019-11-18 17:13:43 +02:00
vyzo db8e2195ea remove CompressedTraceEventBatch from trace protobuf 2019-11-18 17:12:42 +02:00
vyzo 2fc5518a00 remote tracer: wait a second to accumulate batches 2019-11-15 20:42:04 +02:00
vyzo 57ea27eef7 remote tracer 2019-11-15 20:42:04 +02:00
vyzo 0aa629c79c use *pb.TraceEvent as argument for Trace in the EventTracer interface 2019-11-15 20:42:04 +02:00
vyzo f134d65848 add protobuf file tracer 2019-11-15 20:42:04 +02:00
vyzo 8ff321c529 move tracer implementation to its own file 2019-11-15 20:42:04 +02:00
vyzo 3545acf029 json tracer 2019-11-15 20:42:04 +02:00
vyzo 3f30acdcf7 track topics in message tracing 2019-11-15 20:42:04 +02:00
vyzo ae0fcc6b4d add traces for send/drop rpc
forgotten!
2019-11-15 20:42:04 +02:00
vyzo 151ec25616 implement tracing details 2019-11-15 20:42:04 +02:00
vyzo 040cabe3b0 some minor fixes in trace pb 2019-11-15 20:42:04 +02:00
vyzo 0a25f248ea trace event protobuf 2019-11-15 20:42:04 +02:00
vyzo fb11aa9857 initialize tracer with peer ID, trace RPC from join/leave announcements 2019-11-15 20:42:04 +02:00
vyzo 958e09a5b3 remove useless nil check when initializing subsystem tracers 2019-11-15 20:42:04 +02:00
vyzo fd73973145 add tracing to floodsub/randomsub 2019-11-15 20:42:04 +02:00
vyzo 89c7ed46e3 trace publish 2019-11-15 20:42:04 +02:00
vyzo 67275a6382 tracing scaffolding 2019-11-15 20:42:04 +02:00
vyzo 28a87b3121
Merge pull request #231 from libp2p/feat/validator-data
add ValidatorData field to Message
2019-11-15 20:37:20 +02:00
vyzo 8b423348a0 add ValidatorData field to Message
Useful for passing data from the validation to the application.
2019-11-15 20:16:58 +02:00
vyzo 323a4110b7
Merge pull request #230 from aarshkshah1992/feat/configurable-outbound-msg-queue-size
Configurable outbound peer queue sizes
2019-11-15 19:55:36 +02:00
Aarsh Shah 0dd2171ac5 queue size must always be positive 2019-11-16 01:39:12 +08:00
Aarsh Shah d380477228 Configurable outbound peer queue sizes 2019-11-16 01:14:10 +08:00
Adin Schmahmann 534fe2f382
Merge pull request #225 from libp2p/fix/224
Topic handler bug fixes
2019-11-04 04:13:41 -05:00
Adin Schmahmann 686c928d4e pubsub and topic methods now return error if the pubsub context has been cancelled instead of hanging 2019-11-04 03:52:39 -05:00
Adin Schmahmann ad97d9bf17 fixed closed Topic handles still being able to perform some actions on the topic 2019-11-02 19:28:44 -04:00
Adin Schmahmann 899f9cd62b fixed Topic close error 2019-11-01 17:12:23 -04:00
Steven Allen 55f4ad6eb9
Merge pull request #184 from aschmahmann/feat/discovery
Add Discovery
2019-10-31 15:19:29 -07:00
Adin Schmahmann f9c26c2e68 Added libp2p discovery capabilities to PubSub.
When the WithDiscovery option is passed to PubSub then PubSub will be able to search for more peers that are interested in our topics.

This includes the ability for Publishes (via Topic.Publish()) to block until the router is ready to publish. When a router is ready is currently defined by a combination of a user defined MinTopicSize function (passed into topic.Publish via the WithReadiness publish option) and the properties of the pubsub router used. The discovery tests show example usage.
2019-10-31 16:39:18 -04:00
Adin Schmahmann 5ef7439d71 interface: New Topic + TopicEventHandlers objects.
Added PubSub.Join(topic) that returns a Topic object. This object can be Subscribed and Published to as well as to get a TopicEventHandler for topic events. This means that the Subscription object will no longer handle PeerEvents and that PubSub's Publish and Subscribe functions are deprecated.
2019-10-31 15:37:44 -04:00
Adin Schmahmann c837436c80 dep: update go-libp2p 2019-10-31 15:36:07 -04:00
vyzo aa9a8756d4
Merge pull request #218 from libp2p/feat/view-last-hop
Expose the peer that propagates a message to the recipient
2019-10-18 11:47:50 +03:00
Adin Schmahmann 6551b41f12 go fmt 2019-10-18 04:25:52 -04:00
Adin Schmahmann c0494a42f4
minor variable refactor 2019-10-18 03:25:24 -04:00
Adin Schmahmann d28f450046 expose the peer that propagates a message to the recipient 2019-10-18 02:39:37 -04:00
vyzo 2247a54a8c
Merge pull request #204 from libp2p/fix/gossip-methods
gossip methods: renames and predicate adjustment
2019-10-12 16:41:09 +03:00
Raúl Kripalani 8d7838b031 rename queueGossip() to enqueueGossip(). 2019-10-12 21:50:20 +09:00
vyzo d72666d4eb
Merge pull request #205 from libp2p/fix/mcache-docs
godocs: clarify config params of MessageCache.
2019-10-06 22:17:11 +03:00
Raúl Kripalani e897918f4b godocs: clarify config params of MessageCache. 2019-10-06 19:58:07 +09:00
Raúl Kripalani 2a90debb89 rename pushGossip to queueGossip for accuracy. 2019-10-06 18:53:05 +09:00
Raúl Kripalani 9103afa349 emitGossip: gossip to D peers. 2019-10-06 18:52:11 +09:00
Raúl Kripalani cd94989155 emitGossip: rename param name for clarity. 2019-10-06 18:50:40 +09:00
vyzo 55553ac009
Merge pull request #196 from libp2p/fix/minor-bug
minor bug fix: on join, source peers from gossip[topic] if insufficient peers in fanout[topic]
2019-10-05 21:58:11 +03:00
vyzo dba8299a92
Merge pull request #201 from lukesolo/subscription-fix-cancel
add PubSub's context to Subscription
2019-10-01 15:15:08 +03:00
lukesolo 9d03237eec add PubSub's context to Subscription 2019-09-30 12:55:37 +03:00
vyzo 2bac4705dc fix very minor bug in gossipsub 2019-08-13 12:01:55 +03:00