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
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
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
4f3a97bcc3
fix segfault on arm due to bad atomic access
...
fixes #78
2018-05-29 18:59:04 +02:00
vyzo
1538e0d417
downgrade dropped message logging to Infof
2018-03-07 07:57:42 +02:00
vyzo
d5d886d853
Don't block the event loop if the subscriber is too slow
...
Closes #69
2018-03-07 07:57:42 +02:00
vyzo
399bcb25a6
UnregisterTopicValidator for removing topic validators
2018-02-28 22:14:54 +02:00
vyzo
327e72d4fd
demote erros per #62
2018-01-27 09:54:57 +02:00
vyzo
e7b1fe6e75
modularized pubsub; Flooding is just a routing method.
2018-01-27 09:54:57 +02:00