vyzo
15f4f1f138
fix flaky test
...
10ms is _not_ sufficient for travis
2020-07-30 14:27:04 +03:00
Raúl Kripalani
ae55bf9603
upgrade deps + interoperable uvarint delimited writer/reader.
2020-07-30 14:00:54 +03:00
Diederik Loerakker
99507107b6
Merge pull request #359 from protolambda/optional-sig-origin-seq
...
Signing policy + optional Signature, From and Seqno
2020-07-23 08:47:47 +03:00
Yusef Napora
f87e7b72d7
test delivery tags vs sybil storm
2020-05-19 19:26:53 +03:00
Yusef Napora
28d17a4cab
add tagTracer to apply connmgr tags
2020-05-19 19:26:53 +03:00
vyzo
9c7bc987f7
add test for invalid message author
2020-04-23 18:38:26 +03:00
vyzo
96066d320f
increase delay for TestPeerDisconnect
...
10ms don't seem to be enough for travis
2020-04-23 18:38:26 +03:00
vyzo
8d89949131
increase travis friendliness for new tests
2020-04-23 18:38:26 +03:00
vyzo
7fddef3d6f
add test for assorted pubsub options that were not covered
2020-04-23 18:38:26 +03:00
vyzo
1246e80812
add test for announce retry
2020-04-23 18:38:26 +03:00
vyzo
a2f6f7b5b5
increase time to disconnect in floodsub disconnection test
...
somehow it managed to fail on travis
2020-04-22 21:08:13 +03:00
vyzo
7903222907
move validation tests to their own file
2020-04-21 10:57:28 +03:00
vyzo
7c8e7857fa
deflake TestValidatorOverload
...
reguarly fails on travis with successful validation; the timings were just wrong.
2020-04-21 10:57:28 +03:00
Raúl Kripalani
1f147c2457
make wire protocol message size configurable. ( #261 )
2020-02-25 18:07:16 -08: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
6551b41f12
go fmt
2019-10-18 04:25:52 -04:00
Adin Schmahmann
d28f450046
expose the peer that propagates a message to the recipient
2019-10-18 02:39:37 -04: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
57f2c1efdd
Refactored events to be camel case.
2019-08-02 12:25:57 -04:00
Adin Schmahmann
48c9847240
oops forgot a return. separated out and added more comments to the new tests.
2019-08-02 00:46:49 -04:00
Adin Schmahmann
934b813b9a
stronger notification deliveries backed by unbounded buffer
2019-08-01 16:57:05 -04: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
cc791f28b9
Made TestSubscriptionNotification thread safe
2019-06-07 09:21:17 -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
Raghav Gulati
3c78c237ce
Remove empty line in imports
2019-05-08 10:09:30 -07:00
Raghav Gulati
08c4a28ee3
Better comment for signing with a different key
...
Note that the second message is the incorrectly signed message.
2019-05-08 09:27:57 -07:00
Raghav Gulati
a726a896db
Use names rather than index
...
We've aliased array elements, use the explicit names instead.
2019-05-08 09:27:26 -07:00
Raghav Gulati
594e6a4ab9
Add a note why we're expecting two messages
...
As the adversary has turned of signature verification, we should expect
to see two messages (the correctly signed and the incorrectly signed
one) when we publish. Those that have verification on, should only see
one.
2019-05-08 09:00:25 -07:00
Raghav Gulati
84bb35ebf4
Bump wait from 10 -> 50ms
...
This matches the waits in the rest of the package.
2019-05-08 09:00:00 -07:00
Raghav Gulati
b136dae80c
Remove erroneous subscribe
2019-05-08 08:59:47 -07:00
Raghav Gulati
8272eb583e
Change test name to reflect no relaying
...
Improperly named test. In this test, we're only testing that we reject
malicious messages.
2019-05-08 08:59:12 -07:00
Raghav Gulati
516c32e854
Remove commented out code
...
bhost import was commented out.
2019-05-07 15:05:00 -07:00
Raghav Gulati
6b2635b6ac
adversaryPeer -> adversary
2019-05-07 10:17:55 -07:00
Raghav Gulati
d740f53531
adversarial -> adversary
2019-05-07 10:14:37 -07:00
Raghav Gulati
b44471d7ce
Ensure that the received message is the correct one
2019-05-07 10:10:05 -07:00
Raghav Gulati
ed746477f9
Reduce time to wait
...
2 seconds per wait seemed a bit aggressive. Halved the total time of the test.
2019-05-07 10:09:40 -07:00
Raghav Gulati
c33d8a8353
Add test for improperly signed message
...
Test the case where an adversarial peer signs a message with a key they
didn't originally register with. First, we test that an adversarial peer
will allow the message to pass through validation as they turn off
strict verification (putting themselves at risk), but an honest peer
with strict verification on will never see the message!
2019-05-07 09:56:09 -07:00
vyzo
8405014ffe
extend validator interface to include message source
2019-01-17 14:44:34 +02:00
vyzo
2621f893e6
rework peer tracking logic to handle multiple connections
2018-12-13 19:53:12 +02:00
Steven Allen
017e522caa
test nonsensical options
2018-10-25 16:57:00 -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
3788f504a5
strict mode for message signing
2018-10-14 02:22:20 +03:00
vyzo
4addc898c1
test floodsub with message signing
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
0a82522cf6
basic gossipsub tests
2018-06-12 08:00:17 -07:00
Erin Swenson-Healey
75fcbf0c2c
New -> NewFloodsubWithProtocols
2018-06-07 09:21:08 -07:00