673 Commits

Author SHA1 Message Date
vyzo
7fadc8e976 update go-libp2p-discovery, go mod tidy 2020-04-21 12:04:29 +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
dependabot-preview[bot]
b35fdc996a Bump github.com/ipfs/go-log from 1.0.2 to 1.0.3
Bumps [github.com/ipfs/go-log](https://github.com/ipfs/go-log) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/ipfs/go-log/releases)
- [Commits](https://github.com/ipfs/go-log/compare/v1.0.2...v1.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 23:58:53 +03:00
dependabot-preview[bot]
53c709a6ca Bump github.com/libp2p/go-libp2p-core from 0.5.0 to 0.5.1
Bumps [github.com/libp2p/go-libp2p-core](https://github.com/libp2p/go-libp2p-core) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/libp2p/go-libp2p-core/releases)
- [Commits](https://github.com/libp2p/go-libp2p-core/compare/v0.5.0...v0.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 21:55:10 +03:00
dependabot-preview[bot]
428f80c21c Bump github.com/libp2p/go-libp2p-swarm from 0.2.2 to 0.2.3
Bumps [github.com/libp2p/go-libp2p-swarm](https://github.com/libp2p/go-libp2p-swarm) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/libp2p/go-libp2p-swarm/releases)
- [Commits](https://github.com/libp2p/go-libp2p-swarm/compare/v0.2.2...v0.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 20:58:08 +03:00
vyzo
235c28ff49 truncate per peer message id lists 2020-04-20 19:53:12 +03:00
vyzo
8bc2c5c0f1 log counts in IHAVE flood protection measures 2020-04-20 19:53:12 +03:00
vyzo
a645afd1b3 add backoff penalty for GRAFT floods 2020-04-20 19:53:12 +03:00
vyzo
9ab44c5069 make maximum number of IHAVE messages accepted per heartbeat configurable 2020-04-20 19:53:12 +03:00
vyzo
8150843cf3 improve handling of IHAVE floods 2020-04-20 19:53:12 +03:00
vyzo
78bbe13b49 fix data races in spam tests 2020-04-20 19:53:12 +03:00
vyzo
9b28f21a6b rename gossipsub_attack_test to gossipsub_spam_test 2020-04-20 19:53:12 +03:00
vyzo
2b1a63d040 fix GRAFT spam test 2020-04-20 19:53:12 +03:00
vyzo
376b7fa5a0 fix IHAVE spam test 2020-04-20 19:53:12 +03:00
Dirk McCormick
831e7bcbd8 Add IHAVE spam test 2020-04-20 19:53:12 +03:00
Dirk McCormick
45fcb28be8 test: add test for invalid message spam 2020-04-20 19:53:12 +03:00
Dirk McCormick
4e15efdd6f test: GRAFT spam and GRAFT backoff tests 2020-04-20 19:53:12 +03:00
Dirk McCormick
a5addee5a0 test: add IWANT spam test 2020-04-20 19:53:12 +03:00
vyzo
34f2295c19 add protections from IHAVE floods 2020-04-20 19:53:12 +03:00
vyzo
1645516276 add protections from GRAFT floods 2020-04-20 19:53:12 +03:00
vyzo
ea5d2e6d6d gomod tidy 2020-04-18 11:09:06 +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
3016a1c9a9 gomod: update go-multiaddr-net 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
vyzo
3368bed1d4 disable flaky and irrelevant tests 2020-04-18 11:09:06 +03:00
vyzo
9904d69cde configurable number of peers for opportunistic grafting 2020-04-18 11:09:06 +03:00
vyzo
6732f9848b fix typo
Co-Authored-By: Raúl Kripalani <raul@protocol.ai>
2020-04-18 11:09:06 +03:00
vyzo
8a53469c43 fix typo
Co-Authored-By: Raúl Kripalani <raul@protocol.ai>
2020-04-18 11:09:06 +03:00
vyzo
2fdf6cdaed opportunistic grafting 2020-04-18 11:09:06 +03:00
vyzo
8e969ba29e use a configurable variable for direct peer reconnect ticks 2020-04-18 11:09:06 +03:00
vyzo
f97d151aec eagerly send gossip at the end heartbeat
instead of trying to piggyback with outgoing messages
2020-04-18 11:09:06 +03:00
Raúl Kripalani
fc38f556a3 comments and nits. 2020-04-18 11:09:06 +03:00
vyzo
8809484a47 support direct peering agreements 2020-04-18 11:09:06 +03:00
vyzo
bcff5f20a6 update REAMDE 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
97519bf76c better handling of message originating from self but forwarded by another peer 2020-04-18 11:09:06 +03:00
vyzo
ce3da3facd move self-publish check to pubsub 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
95094393a8 gomod: use go-multiaddr-net v0.1.3 2020-04-18 11:09:06 +03:00
vyzo
ea314605d3 don't forward messages with source ourselves but not published by ourselves
per stebalien's request.
2020-04-18 11:09:06 +03:00
vyzo
0cab7f5e59 increase connection manager weight for mesh peers 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
65cff1b421 godoc nits for parameter weights. 2020-04-18 11:09:06 +03:00