Commit Graph

735 Commits

Author SHA1 Message Date
Yusef Napora 9ad332dd1d update PR branch dependencies 2020-03-24 15:52:34 +02:00
Yusef Napora 919d81fd91 track changes to peer records in -core 2020-03-24 15:52:34 +02:00
vyzo 5b0ec14ea7 don't spawn a goroutine for scheduling connections 2020-03-24 15:52:34 +02:00
vyzo efb09f2984 shuffle peers when limiting px set 2020-03-24 15:52:34 +02:00
vyzo e4667b6073 add limit to the number of peers to connect to from px 2020-03-24 15:52:34 +02:00
vyzo a4c5325665 make connection timeout a variable, set for 30s (instead of 10s) 2020-03-24 15:52:34 +02:00
vyzo f280c5f705 extend star topology test to assert that no peer is left with a single connection 2020-03-24 15:52:34 +02:00
vyzo 2e7cdebf34 trace peer exchange 2020-03-24 15:52:34 +02:00
vyzo 95d3bbfa1b test prune px with a star topology 2020-03-24 15:52:34 +02:00
vyzo d118e1d554 connect to peers obtained through px 2020-03-24 15:52:34 +02:00
vyzo 806fd24a58 backoff grafting to peers that have pruned us 2020-03-24 15:52:34 +02:00
vyzo 6c59beedb8 peer exchange on prune 2020-03-24 15:52:34 +02:00
vyzo 6fc8050bac protocol ID for gossipsub v1.1 2020-03-24 15:52:34 +02:00
vyzo abab666596 extend ControlPrune with peer exchange information 2020-03-24 15:52:34 +02:00
vyzo 835567eb54 gomod: use go-libp2p-core@peer-records and go-libp2p-peerstore@certified-addrs 2020-03-24 15:52:34 +02:00
vyzo fe350fd7b2
Merge pull request #268 from libp2p/fix-tracer-sendTo-field
set sendTo to remote peer id in trace events
2020-03-16 17:42:05 +02:00
Yusef Napora a4d562cb83 set sendTo to remote peer id in trace events 2020-03-15 21:00:39 -04:00
Raúl Kripalani 1f147c2457
make wire protocol message size configurable. (#261) 2020-02-25 18:07:16 -08:00
Steven Allen a1999db893
Merge pull request #254 from libp2p/dependabot/go_modules/github.com/hashicorp/golang-lru-0.5.4
Bump github.com/hashicorp/golang-lru from 0.5.3 to 0.5.4
2020-02-11 08:52:39 -08:00
Steven Allen 9300c0b49f
Merge pull request #259 from libp2p/dependabot/go_modules/github.com/multiformats/go-multistream-0.1.1
Bump github.com/multiformats/go-multistream from 0.1.0 to 0.1.1
2020-02-11 08:49:24 -08:00
dependabot-preview[bot] 144a543b71
Bump github.com/multiformats/go-multistream from 0.1.0 to 0.1.1
Bumps [github.com/multiformats/go-multistream](https://github.com/multiformats/go-multistream) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/multiformats/go-multistream/releases)
- [Commits](https://github.com/multiformats/go-multistream/compare/v0.1.0...v0.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 11:19:57 +00:00
vyzo 40e1c94708
Merge pull request #258 from aarshkshah1992/feat/blacklist-timecache
Replace LRU cache blacklist implementation with a time cache
2020-02-05 11:28:09 +02:00
Aarsh Shah 6eeed58a50 defer unlocking 2020-02-05 14:33:20 +05:30
Aarsh Shah 677ca1025b added mutex to timecache 2020-02-05 14:13:21 +05:30
Aarsh Shah 3f48f468ac replace lru cache blacklist implementation with a time cache 2020-02-04 20:05:16 +05:30
vyzo 25c434f5f7
Merge pull request #255 from keep-network/configurable-validation-queue
Configurable size of validate queue
2020-01-27 20:25:02 +02:00
Piotr Dyraga ae00326b96
go fmt on pubsub.go 2020-01-27 13:44:03 +01:00
Piotr Dyraga 499109b165
Configurable size of validate queue
validateWorker() reads from validateQ and invokes validate function
that performs validation of the message. Signature validation is performed
synchronously. The number of validate workers defaults to the number of CPUs
and can be updated with WithValidateWorkers function. With no additional user
validators, signature validation is the bottleneck when receiving new messages.

Increasing the number of validating workers does not help given the context
switching and bottleneck nature of this spot. As stated in WithValidateWorkers
documentation, this function should be used rather to limit the number of workers
to devote less CPU time for synchronous validation. On the other hand, with the
default size of `validateQ`, some applications built on a top of libp2p may
experience throttled validation and lost messages.

This problem is addressed by WithValidateQueueSize allowing to configure the buffer
size for synchronous validation. Application developers knowing the nature of their
protocols can set this value to minimise the possibility of throttled synchronous
validation and dropped messages. Configurable buffer size allows to gracefully
handle peaks of messages and, from the other side, the number of concurrent
synchronous workers is still limited by validateWorkers property so the receiver
should not get congested.
2020-01-21 10:19:42 +01:00
dependabot-preview[bot] 2799fcf044
Bump github.com/hashicorp/golang-lru from 0.5.3 to 0.5.4
Bumps [github.com/hashicorp/golang-lru](https://github.com/hashicorp/golang-lru) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v0.5.3...v0.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-17 11:20:31 +00:00
vyzo 97846b5748
Merge pull request #251 from prestonvanloon/master
Rename VaidatorData to ValidatorData
2019-12-20 01:35:27 +02:00
Preston Van Loon 8ced088fee rename VaidatorData to ValidatorData 2019-12-19 15:15:45 -08:00
dependabot-preview[bot] 7e5b02f152 Bump github.com/libp2p/go-libp2p-core from 0.2.5 to 0.3.0 (#245)
Bumps [github.com/libp2p/go-libp2p-core](https://github.com/libp2p/go-libp2p-core) from 0.2.5 to 0.3.0.
- [Release notes](https://github.com/libp2p/go-libp2p-core/releases)
- [Commits](https://github.com/libp2p/go-libp2p-core/compare/v0.2.5...v0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 23:56:26 +01:00
vyzo 1d5191c5bb
Merge pull request #248 from protolambda/msg-id-option
Configurable message id function
2019-12-16 14:20:06 +02:00
protolambda 6bd07a71fc
PR feedback: name change and account for different options order 2019-12-16 12:46:30 +01:00
protolambda 7981f9bfbd
fixes #247: implement msg id function as pubsub option 2019-12-16 03:54:40 +01:00
Steven Allen 7269e411d7
Merge pull request #244 from libp2p/dependabot/go_modules/github.com/multiformats/go-multiaddr-0.2.0
Bump github.com/multiformats/go-multiaddr from 0.1.2 to 0.2.0
2019-12-11 14:57:03 +01:00
dependabot-preview[bot] c241d1569f
Bump github.com/multiformats/go-multiaddr from 0.1.2 to 0.2.0
Bumps [github.com/multiformats/go-multiaddr](https://github.com/multiformats/go-multiaddr) from 0.1.2 to 0.2.0.
- [Release notes](https://github.com/multiformats/go-multiaddr/releases)
- [Commits](https://github.com/multiformats/go-multiaddr/compare/v0.1.2...v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 11:33:33 +00:00
Steven Allen a682ceaf7d
Merge pull request #242 from libp2p/dependabot/go_modules/github.com/hashicorp/golang-lru-0.5.3
Bump github.com/hashicorp/golang-lru from 0.5.1 to 0.5.3
2019-12-06 17:28:50 -05:00
Steven Allen 33ef0a3eea Merge branch 'ci/go-1.13' 2019-12-06 16:48:02 -05:00
Steven Allen 3248ced67b ci: bump to go 1.13 2019-12-06 16:33:11 -05:00
dependabot-preview[bot] 9ce7f49ad0
Bump github.com/hashicorp/golang-lru from 0.5.1 to 0.5.3
Bumps [github.com/hashicorp/golang-lru](https://github.com/hashicorp/golang-lru) from 0.5.1 to 0.5.3.
- [Release notes](https://github.com/hashicorp/golang-lru/releases)
- [Commits](https://github.com/hashicorp/golang-lru/compare/v0.5.1...v0.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-06 17:41:36 +00:00
vyzo ac2ea8beda README: document tracing (#239) 2019-12-02 20:03:54 +00:00
Steven Allen b55894f4a6
Merge pull request #236 from libp2p/chore/update-deps
chore(dep): update
2019-12-02 13:19:24 -05:00
Steven Allen ed444c08f0 chore(dep): update
* Update go-libp2p-core and go-multiaddr.
* Regenerate protobufs with the latest gogo protobuf.
2019-12-02 13:07:46 -05:00
vyzo 01b9825fbe
Merge pull request #227 from libp2p/feat/tracing
tracing support
2019-11-19 02:50:36 +02:00
vyzo 7065297ac6 nits and beauty 2019-11-19 02:28:23 +02:00
vyzo cd7f42e1d7 make tracer.Close safer 2019-11-19 00:29:23 +02:00
vyzo 40e5a49d1b store the remote trace peer address in the peerstore
that way we don't have to connect every time we open the stream.
2019-11-19 00:26:06 +02:00
vyzo 7a5aaa8d1c don't blanket wait for 1s to accumulate a batch.
Instead check the batch size and poll every 100ms (up to 1s) until the
minimum batch size is accumulated.
2019-11-19 00:18:10 +02:00
vyzo 24a1181b9a move niling of trace buffer to the end
this avoids holding on memory while we are waiting.
2019-11-19 00:07:57 +02:00