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
vyzo
4dc796359e
try to extract the key in order to decide whether to attach the key
2018-10-14 02:22:20 +03:00
vyzo
bd15183543
use the ID corresponding to signKey for published messages
2018-10-14 02:22:20 +03:00
vyzo
3788f504a5
strict mode for message signing
2018-10-14 02:22:20 +03:00
vyzo
60a06ce961
implement signMessage and verifyMessageSignature
2018-10-14 02:22:20 +03:00
vyzo
9d250aef37
option to enable message signing
2018-10-14 02:22:20 +03:00
vyzo
a6c349b6f0
sign messages when a signing key is present
2018-10-14 02:22:20 +03:00
vyzo
7c1012c247
optimize fast path for single topic validator
...
so that we don't do the goroutine dance for just a single validator, which ought to
be the most common case.
2018-10-14 02:22:20 +03:00
vyzo
7c508b4fba
implement validateSignature
2018-10-14 02:22:20 +03:00
vyzo
64aab3485a
scaffolding for signature validation
2018-10-14 02:22:20 +03:00
Kevin Atkinson
0827f5e955
gx publish 0.9.31
2018-10-04 19:23:53 -04:00
Kevin Atkinson
1abb0209ce
gx publish 0.9.30
2018-10-04 18:41:48 -04:00
vyzo
1b4fbb865d
fix NewPubsub docstring
2018-06-12 08:00:17 -07:00
vyzo
d6dfe83ebe
refactor nextSeqno out of Publish
2018-06-12 08:00:17 -07:00
vyzo
e8a91d330a
document PubSubRouter interface
2018-06-12 08:00:17 -07:00
vyzo
2544ae7df9
announce retry should check the pubsub context for cancellation
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