Richard Ramos
faffd2a0bd
add support for custom protocol matching function
2021-07-30 16:57:34 +03:00
Steven Allen
02dae6505c
fix: downgrade multiaddr ( #439 )
...
The new version doesn't work with the current websocket release. We can
upgrade in the next minor release.
2021-07-27 22:43:38 -07:00
Steven Allen
3951ef46dd
fix: downgrade core ( #438 )
...
We'll bump in a minor release.
2021-07-27 22:08:35 -07:00
Marten Seemann
24b2d00e07
chore: update deps ( #437 )
2021-07-27 10:14:01 -07:00
Steven Allen
ba28f8ecfc
fix: remove deprecated Bytes call ( #436 )
2021-07-22 15:31:08 -07:00
Ian Davis
2efd313b83
cleanup: fix vet and staticcheck failures ( #435 )
...
* cleanup: fix vet failures and most staticcheck failures
* Fix remaining staticcheck failures
* Give test goroutines chance to exit early when context is canceled
2021-07-22 15:27:32 -07:00
Ian Davis
37ebe34352
Revert noisy newline changes
2021-07-19 15:48:58 +03:00
Ian Davis
079d8973a6
fix: avoid panic when peer is blacklisted after connection
2021-07-19 15:48:58 +03:00
vyzo
3b98004eed
release priority locks early when handling batches
2021-07-14 00:43:52 +03:00
vyzo
e9e5a9913f
don't respawn writer if we fail to open a stream; declare it a peer error
2021-07-14 00:43:52 +03:00
vyzo
b289ec5017
batch process dead peer notifications
2021-07-14 00:43:52 +03:00
vyzo
9d86090f42
use a priority lock instead of a semaphore
...
so that there is no case of infinite accumulation of pending peers in the queue.
also adds a connectedness check before adding the peer.
2021-07-14 00:43:52 +03:00
vyzo
0732576319
do the notification in a goroutine
...
don't block the swarm while waiting for the semaphore.
2021-07-14 00:43:52 +03:00
vyzo
861bb84b1e
emit new peer notification without holding the semaphore
2021-07-14 00:43:52 +03:00
vyzo
ac4a401fd6
use a semaphore for new peer notifications so that we don't block the event loop
2021-07-14 00:43:52 +03:00
vyzo
1f8e231861
don't accumulate pending goroutines from new connections
2021-07-14 00:43:52 +03:00
Michael Muré
65f48fb2c8
rename RawTracer's DroppedInSubscribe into UndeliverableMessage
2021-07-13 08:58:00 -07:00
Michael Muré
9be1c593c6
add a new RawTracer event to track messages dropped in Subscribe
2021-07-13 08:58:00 -07:00
Michael Muré
3c7689d482
add an option to configure the Subscription output queue length
2021-07-13 08:58:00 -07:00
Michael Muré
c02d4c7179
fix some comments
2021-07-13 08:58:00 -07:00
Michael Muré
50b1cfadc8
expose more events for RawTracer
2021-07-13 08:58:00 -07:00
gammazero
55d412efa7
Make close concurrent safe
2021-06-15 13:00:02 +03:00
gammazero
e25f98c402
Fix close of closed channel
...
This happens when there are multiple subscriptions to a topic and a single subscription is canceled twice.
2021-06-15 13:00:02 +03:00
Med Mouine
e6ad80cf47
Update README to point to correct example directory ( #424 )
...
* Update README to point to correct example directory
* Fix example url to go example instead of js
2021-05-17 09:12:00 -07:00
Steven Allen
6195a09441
fix: remove deprecated and never used topic descriptors ( #423 )
...
fixes #264
2021-05-11 12:55:14 -07:00
Steven Allen
0094708cc4
Refactor Gossipsub Parameters To Make Them More Configurable ( #421 )
...
Co-authored-by: nisdas <nishdas93@gmail.com>
2021-05-03 08:59:15 -07:00
vyzo
cbb7bfc1f1
add tests for gs features and custom protocols
2021-04-02 21:55:10 +03:00
vyzo
0e387d79fb
add support for custom gossipsub protocols and feature tests
2021-04-02 21:55:10 +03:00
vyzo
2ed84f4515
RIP travis, Long Live CircleCI ( #414 )
...
* RIP travis
* add CircleCI config
2021-04-02 11:50:05 -07:00
vyzo
e6eff445d4
Ignore transient connections ( #412 )
2021-04-01 21:45:09 +01:00
vyzo
7a3d0ca396
demote log spam to debug
2021-04-01 19:31:07 +03:00
nisdas
eda69749ab
fix bug
2021-03-31 18:27:14 +03:00
nisdas
7644a650ff
add last amount of validation
2021-03-31 18:27:14 +03:00
nisdas
3ea6751619
add threshold validation
2021-03-31 18:27:14 +03:00
nisdas
5cd1316efc
strengthen validation
2021-03-31 18:27:14 +03:00
vyzo
84302e9633
rename checkSignature to checkSigningPolicy
2021-03-31 17:53:46 +03:00
vyzo
175d43f4e7
rename validation.Publish to PushLocal
2021-03-31 17:53:46 +03:00
vyzo
32b8d8958e
fix TestValidate, add TestValidate2
2021-03-31 17:53:46 +03:00
vyzo
37e77dc51e
skip flaky test until we can fix it
2021-03-31 17:53:46 +03:00
vyzo
005ac1598c
implement synchronous validation for locally published messages
...
So that locally published messages are never dropped because of full
validation queues.
2021-03-31 17:53:46 +03:00
vyzo
5457a2845b
expose internalTracer as RawTracer
2021-03-16 08:28:02 +02:00
vyzo
05c505ef60
export rejection named string constants
2021-03-16 08:28:02 +02:00
vyzo
6c1addf493
more intelligent handling of ip whitelist check
2021-02-12 21:47:58 +02:00
vyzo
69868db8cf
remove obsolete explicit IP whitelisting in favor of subnets
2021-02-12 21:47:58 +02:00
vyzo
84f577bdd1
add subnet whitelisting for IPColocation
2021-02-12 21:47:58 +02:00
vyzo
9e129db766
defer stream removal instead of doing it inline.
2021-01-12 17:18:00 +02:00
vyzo
b080f595bb
add test for inbound stream deduplication
2021-01-12 17:18:00 +02:00
vyzo
8676a0e25b
deduplicate inbound streams
2021-01-12 17:18:00 +02:00
vyzo
352c6b993e
populate receivedFrom field in delivery trace
2020-12-16 20:17:23 +02:00
vyzo
4f972a14dd
add receivedFrom field in delivery trace
2020-12-16 20:17:23 +02:00