79 Commits

Author SHA1 Message Date
Hlib Kanunnikov
7038c82c21
chores: bump go-libp2p (#558) 2024-05-20 16:20:16 -07:00
vyzo
825d5e3c7d
Revert "fix: topicscore params can't be set for dynamically subscribed topic (#540)" (#541)
This reverts commit aa5fd79a75f7480be94380bc3e617767e71573e6.
2023-08-26 18:26:28 +03:00
Prem Chaitanya Prathi
aa5fd79a75
fix: topicscore params can't be set for dynamically subscribed topic (#540)
* fix: topicscore params can't be set for a topic subscribed after gossipsub is initialized

* chore:address review comments
2023-08-19 12:21:43 +03:00
Marten Seemann
4f56e8f0a7
update go-libp2p to v0.22.0 (#498)
* update go-libp2p to v0.22.0

* skip TestGossipsubConnTagMessageDeliveries
2022-08-26 02:45:41 -07:00
protolambda
566fdfa6fc fix unused GossipSubHistoryGossip, make seenMessages ttl configurable, make score params SeenMsgTTL configurable 2022-05-24 22:20:42 +03:00
Wondertan
0e687f24a6 feat: integrate msgIdGenerator 2022-01-23 09:29:32 +02: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
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é
50b1cfadc8 expose more events for RawTracer 2021-07-13 08:58:00 -07:00
vyzo
e6eff445d4
Ignore transient connections (#412) 2021-04-01 21:45:09 +01: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
Steven Allen
08c17398fb feat: update to go-libp2p-core 0.7.0
Updates to the new stream interfaces. See
https://github.com/libp2p/go-libp2p-core/releases/tag/v0.7.0.
2020-11-12 09:02:55 +02:00
vyzo
d6c20b59fc remove multi-topic message support 2020-10-08 20:18:21 +03:00
vyzo
c82d664e8f prettify things 2020-09-09 16:57:36 +03:00
vyzo
5d06aa2d4f add api for dynamically setting and resetting topic score parameters 2020-09-09 16:57:36 +03:00
vyzo
93f4f91dcf trace throttle peers to avoid breaking promises unfairly 2020-09-07 13:38:02 +03:00
vyzo
06a12f17b7 reduce log verbosity; debug mostly 2020-09-01 20:42:50 +03:00
vyzo
b7c28b504d add behaviour penalty threshold 2020-08-20 18:03:32 +03:00
vyzo
5fd694af20 refactor ip colocation factor computation that is common for score and inspection 2020-07-30 14:27:04 +03:00
vyzo
f160b11084 better handling of intermediate topic score snapshots 2020-07-30 14:27:04 +03:00
vyzo
0f6aeb23d7 disallow duplicate score inspectors 2020-07-30 14:27:04 +03:00
vyzo
e6559f59c0 make peer score inspect function types aliases 2020-07-30 14:27:04 +03:00
vyzo
cce1f8a107 extended peer score inspection 2020-07-30 14:27:04 +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
vyzo
1c85190323 make p4 quadratic 2020-05-08 21:20:04 +03:00
vyzo
d3ae6ab3a7 extended internal tracing for multiple objects, not just score 2020-05-08 16:45:31 +03:00
vyzo
3cc169362f incorporate p7 into score 2020-05-06 19:41:53 +03:00
vyzo
ce9a0b7edf use log.Warn instead of Warning 2020-05-05 21:10:14 +03:00
vyzo
ed0d01f92b add defensive checks for potentially duplicate traces 2020-05-04 19:06:40 +03:00
vyzo
1901383099 implement extended validator support 2020-05-04 09:42:20 +03:00
vyzo
f742e5439f fix bug in penalties from message rejection
the first source of the invalid message was _not_ penalized!
2020-04-27 18:35:25 +03:00
vyzo
1e920ed426 fix IPv4 -vs- IPv6 address handling in peer address tracking 2020-04-18 11:09:06 +03:00
vyzo
432caf4fdf more rigorously defeat unspecified address gremlins 2020-04-18 11:09:06 +03:00
vyzo
0a9a87cf04 fix issue with unspecific IPv6 addrs in conn IP tracking
Also, don't track loopback addrs.
2020-04-18 11:09:06 +03:00
vyzo
e1d6b49b2d fix bug in peerScore.setIPs
It was removing all old addresses, not just the ones in the new addres slice
2020-04-18 11:09:06 +03:00
Raúl Kripalani
fc38f556a3 comments and nits. 2020-04-18 11:09:06 +03:00
vyzo
8f3471cdfd correctly attribute invalid message deliveries due to self origin rejection 2020-04-18 11:09:06 +03:00
vyzo
a1488680e7 rename delivery_ constants to satisfy the camelcase worshipers and nitpickers 2020-04-18 11:09:06 +03:00
vyzo
1c4f0920fe use named constants for tracing message rejection reasons 2020-04-18 11:09:06 +03:00
vyzo
ea7305245d add IP whitelist for colocation factor penalty 2020-04-18 11:09:06 +03:00
vyzo
68b86a4b66 use manet.ToIP instead of hand-rolling multiaddr to IP conversion 2020-04-18 11:09:06 +03:00
vyzo
7a3848073e only retain negative scores 2020-04-18 11:09:06 +03:00
vyzo
c65a520799 topic score cap 2020-04-18 11:09:06 +03:00
vyzo
1b387b0068 rename score debug option, address some comments around inspection
- Use nil for the never fire channel when there is no inspection
- Defer a score inspection for shutdown to get one final sample on shutdown
2020-04-18 11:09:06 +03:00
vyzo
375b66b0c1 move score parameter types to their own file 2020-04-18 11:09:06 +03:00