vyzo
fb11aa9857
initialize tracer with peer ID, trace RPC from join/leave announcements
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
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
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
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
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
lukesolo
9d03237eec
add PubSub's context to Subscription
2019-09-30 12:55:37 +03:00
Adin Schmahmann
97e63e477e
better context respect when waiting for new peer events. refactored backlog into eventLog. removed test that was no longer useful.
2019-08-06 00:26:40 -04:00
Adin Schmahmann
65825ce63a
fix race
2019-08-05 15:48:31 -04:00
Adin Schmahmann
57f2c1efdd
Refactored events to be camel case.
2019-08-02 12:25:57 -04:00
Adin Schmahmann
934b813b9a
stronger notification deliveries backed by unbounded buffer
2019-08-01 16:57:05 -04:00
Adin Schmahmann
e26e489bdd
Small code cleanup + refactor
2019-06-21 08:46:41 +02:00
Adin Schmahmann
be69856a1d
Fixed some unnecessary Leave notifications.
...
Combined Join and Leave events into a single API with a struct that specifies whether the event is a Join or a Leave.
2019-06-12 10:06:16 -04:00
Adin Schmahmann
817651a6d1
Subscription Join events now fire even for peers connected to us before we subscribe.
...
Added a Subscription Leave event
2019-06-11 17:49:28 -04:00
Adin Schmahmann
8037a2e60f
Add the ability to handle newly subscribed peers
2019-06-07 08:31:14 -04:00
Raúl Kripalani
49274b0e8a
migrate to consolidated types. ( #185 )
2019-05-26 17:19:03 +01:00
vyzo
cb423f474d
split off validation into its own type
2019-05-14 14:03:08 +03:00
vyzo
8d0c8d60b1
add option to control number of synchronous validation workers
2019-05-14 13:59:52 +03:00
vyzo
d8f08cdba7
add support for inline (synchronous) validators
2019-05-14 13:59:52 +03:00
vyzo
b84a32a4ee
remove default async validation timeout and increase default topic validation throttle.
...
and some better documentation.
2019-05-14 13:59:52 +03:00
vyzo
b227afbf9f
invoke user validators once for each message
2019-05-14 13:59:52 +03:00
vyzo
7a38f7642e
validation pipeline front-end for handling signature validation synchronously
2019-05-14 13:59:52 +03:00
vyzo
4d328a35c0
strict message signing by default
2019-05-02 20:15:55 +03:00
vyzo
4b55053bfb
add early timecache check for already validated messages
2019-01-22 00:47:12 +02:00
vyzo
67eece2526
move timecache check/update after validation
2019-01-21 23:57:59 +02:00
vyzo
73491150d9
fix nonsensical check
2019-01-21 00:22:32 +02:00
vyzo
8405014ffe
extend validator interface to include message source
2019-01-17 14:44:34 +02:00
vyzo
f084087574
blacklist type and option
2019-01-17 14:05:04 +02:00
vyzo
e0e995d889
add check for blacklisted sources
2019-01-16 12:26:26 +02:00
vyzo
654b4e9bf3
close streams and ignore blacklisted peers
2019-01-15 19:04:22 +02:00
vyzo
cfb9a1dc96
implement peer blacklist
2019-01-15 16:17:24 +02:00
vyzo
04f90acd17
make timecache duration configurable
2019-01-15 15:39:13 +02:00
vyzo
11e90ac604
document subscribe's non instanteneous semantics
2019-01-11 11:46:48 +02:00
vyzo
96c5b40934
godoc cosmetics
2019-01-04 13:14:04 +02:00
vyzo
f31593e883
prefill outoging channel with hello packet
2018-12-13 23:56:04 +02:00
vyzo
f82af595dc
don't share the outgoing channel in new stream handlers from disconnects
2018-12-13 23:45:30 +02:00
vyzo
fc7795c38f
simplify peer disconnect detection logic to ensure a single outgoing stream
2018-12-13 22:52:59 +02:00
vyzo
2621f893e6
rework peer tracking logic to handle multiple connections
2018-12-13 19:53:12 +02:00
vyzo
86e65e589d
don't stand on your head to take a pointer
...
the whole stack argument doesn't make much sense in golang; escape analysis
should allocate in heap.
2018-10-29 12:38:03 +02:00
vyzo
575cf339f4
fix announce retry logic
2018-10-29 11:10:31 +02:00
Steven Allen
7303abae4b
forbid sign strict without signing enabled
2018-10-25 16:52:22 -07:00
Steven Allen
5557880eed
fix grammer in option comment
2018-10-25 09:33:57 -07:00
Steven Allen
fba434025b
rework message signing options
...
Previously, there was no non-breaking upgrade path to enable message signing by
default while still providing a way to disable it. This patch breaks the options
into:
1. WithMessageSigning - actually enable message signing.
2. WithStrictSignatureVerification - enforce strict signature verification.
3. WithMessageAuthor - set the message author (independent of signing).
Now, users can explicitly set all three options and any changes we make to the
defaults will never override these explicit settings.
This patch *also* enables *signing* by default but not strict signature
verification. We obviously can't enable verification by default yet but I see no
reason not to enable signing. Basically, we're either hurting performance or
security by default. Security issues are generally only noticed once it's too
late. Performance issues can be caught ahead of time.
2018-10-25 06:41:49 -07:00
Steven Allen
bd1a4630b9
move to go-libp2p-pubsub
...
Updates for move from go-floodsub to go-libp2p-pubsub.
fixes https://github.com/libp2p/go-libp2p-pubsub/issues/4
2018-10-18 21:10:16 +01:00