Commit Graph

441 Commits

Author SHA1 Message Date
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
vyzo 9f04364996
Merge pull request #190 from aschmahmann/feat/addOnSubscribeNotification
Add the ability to handle newly subscribed peers
2019-08-07 13:02:18 +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 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 e4a65bcf1c Made discovery enum use int and removed the UNKNOWN zero value from the enum 2019-07-22 10:02:58 -04:00
Adin Schmahmann ae667299a8 go fmt 2019-07-01 17:43:49 +02: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 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
vyzo 4221a3966b
Merge pull request #188 from quorumcontrol/heartbeat-race
Fix gossipsub race condition for heartbeat
2019-05-28 19:57:04 +03:00
Topper Bowers 5e883d794c also check for nil peers (h/t @brandonwestcott) 2019-05-28 12:09:08 -04:00
Raúl Kripalani 49274b0e8a
migrate to consolidated types. (#185) 2019-05-26 17:19:03 +01:00
Hector Sanjuan 08ddcf7bf2 update deps (-u=patch) 2019-05-24 23:41:35 +02:00
Steven Allen 1a2f55f640 dep: update go-libp2p deps
Deal with https://github.com/libp2p/go-libp2p/issues/640
2019-05-21 20:25:06 -07:00
Steven Allen 2ab4518e0e dep: update go-libp2p
Deal with broken tag.
2019-05-21 18:10:24 -07:00
vyzo b962da55e5
Merge pull request #176 from libp2p/feat/rework-validators
rework validator pipeline
2019-05-15 11:22:06 +03:00
vyzo 2df9d940bf remove unnecessary context in validateSingleTopic 2019-05-14 14:17:32 +03:00
vyzo f4d9eeec26 improve godocs 2019-05-14 14:03:08 +03: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 9d7a59f4a8
Merge pull request #181 from keep-network/test-adversarial-signing
Test adversarial signing
2019-05-08 20:27:41 +03: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
Steven Allen 9db3dbdde9
Merge pull request #180 from libp2p/feat/strict-signing
Strict message signing by default
2019-05-02 10:31:56 -07:00
vyzo 4d328a35c0 strict message signing by default 2019-05-02 20:15:55 +03:00
Steven Allen da5d1479f6
Merge pull request #178 from libp2p/chore/fix-ci-tests
Fix CI tests
2019-04-30 01:07:09 -07:00
vyzo 5f50a58aed skip TestGossipsubControlPiggyback, it makes travis unhappy 2019-04-30 10:50:53 +03:00