Giovanni Petrantoni
c8954619ab
post merge - builds gossip tests
2020-08-12 11:17:36 +09:00
Giovanni Petrantoni
90a33c0a29
Merge branch 'master' into gossip-one-one
2020-08-12 10:57:32 +09:00
Dmitriy Ryajov
b76b3e0e9b
Rework pubsub ( #322 )
...
* move pubsub of off switch, pass switch into pubsub
* use join on lpstreams
* properly cleanup up failed peers
* fix tests
* fix peertable hasPeerId
* fix tests
* rework sending, remove helpers from pubsubpeer, unify in broadcast
* further split broadcast into send
* use send where appropriate
* use formatIt
* improve trace
Co-authored-by: Giovanni Petrantoni <giovanni@fragcolor.xyz>
2020-08-11 18:05:49 -06:00
Giovanni Petrantoni
66c9cd2c8c
score fixes
2020-08-08 18:27:57 +09:00
Giovanni Petrantoni
4dcc3b6dda
Merge remote-tracking branch 'origin/master' into gossip-one-one
2020-08-08 16:53:14 +09:00
zah
fbb59c3638
`msg` is a reserved property name in Chronicles ( #321 )
...
Every Chronicles log record has an existing `msg` property matching
the static string supplied in the log statement. Thus, it's currently
not possible to use `msg` as the name of a user property:
https://github.com/status-im/nim-chronicles/issues/86
2020-08-07 16:46:00 -06:00
Jacek Sieka
c6c0c152c0
Dial peerid ( #308 )
...
* prefer PeerID in switch api
This avoids ref issues like ref identity and nil
* use existing peerinfo instance if possible
* remove secureCodec
there may be multiple connections per peerinfo with different codecs
* avoid some extra async::
2020-08-06 09:29:27 +02:00
Giovanni Petrantoni
9bbe5e4841
Fix subclass calls to handleDisconnect ( #314 )
...
* Fix subclass calls to handleDisconnect
* add peer ID to nil peer debug message
2020-08-06 11:12:52 +09:00
Giovanni Petrantoni
5c986cf657
Fix build, add some raises ( #315 )
...
* Fix build, add some raises
* wip
* wip more raises
* missing exc object in mplex
* proper lifetime for subscribePeer
Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>
2020-08-05 19:30:57 -06:00
Ștefan Talpalaru
bd5d43874a
more expensive metrics ( #312 )
2020-08-05 14:02:26 +02:00
Ștefan Talpalaru
843d32f8db
put expensive metrics under a Nim define ( #310 )
2020-08-04 17:27:59 -06:00
Dmitriy Ryajov
b6877b8aac
increase send timeout for prune and graft msgs ( #306 )
...
* increase send timeout for prune and graft msgs
* use trace logs for subscribe monitor
2020-08-03 17:55:42 -06:00
Dmitriy Ryajov
980764774e
pubsub timeouts tuning ( #295 )
...
* add finegrained timeouts to pubsub
* use 10 millis timeout in tests
* finalization
* revert timeouts
* use `atEof` for reads
* adjust timeouts and use atEof for reads
* use atEof for reads
* set isEof flag
* no backoff for pubsub streams
* temp timer increase, make macos finalize
* don't call `subscribePeer` in libp2p anymore
* more traces
* leak tests
* lower timeouts
* handle exceptions in control message
* don't use `cancelAndWait`
* handle exceptions in helpers
* wip
* don't send empty messages
* check for leaks properly
* don't use cancelAndWait
* don't await subscribption sends
* remove subscrivePeer calls from switch
* trying without the hooks again
2020-08-02 23:20:11 -06:00
Jacek Sieka
e655a510cd
misc cleanups ( #303 )
2020-08-02 12:22:49 +02:00
Giovanni Petrantoni
7946743ae5
wip
2020-07-29 09:41:34 +09:00
Giovanni Petrantoni
a34eee7ed4
pruning improvements
2020-07-28 14:09:37 +09:00
Giovanni Petrantoni
880acd9dc1
Merge branch 'master' into gossip-one-one
2020-07-28 12:06:16 +09:00
Dmitriy Ryajov
f7fdf31365
Pubsub lifetime ( #284 )
...
* lifecycle hooks
* tests
* move trace after closed check
* restore 1 second heartbeat
* await close event
* fix tests
* print direction string
* more trace logging
* add pubsub monitor
* add log scope
* adjust idle timeout
* add exc.msg to trace
2020-07-27 13:33:51 -06:00
Giovanni Petrantoni
f73cf36afb
add a handleConnect in subscribeTopic
2020-07-22 11:00:02 +09:00
Giovanni Petrantoni
f122ec9dbf
fix grafted defect
2020-07-22 10:19:53 +09:00
Giovanni Petrantoni
aded78f259
don't delete while iterating in score update
2020-07-21 13:37:06 +09:00
Giovanni Petrantoni
b61f1da9a8
fixes
2020-07-21 11:47:46 +09:00
Giovanni Petrantoni
884d05cbc2
score wip
2020-07-21 11:25:14 +09:00
Giovanni Petrantoni
0776cc77e7
Merge branch 'master' into gossip-one-one
2020-07-21 11:02:02 +09:00
Giovanni Petrantoni
3b088f8980
Fix some unsubscribe issues and add unsubscribeAll helper ( #282 )
...
* Fix some unsub issues and add unsuball helper
* batch sendprune in unsubscribe methods
* add unsubscribeAll for floodsub
2020-07-20 10:16:13 -06:00
Giovanni Petrantoni
afe17ca2c1
score wip
2020-07-20 18:20:22 +09:00
Giovanni Petrantoni
b8a519884e
tables troubleshooting
2020-07-20 16:20:49 +09:00
Giovanni Petrantoni
d9fa9e2e84
wip
2020-07-19 12:37:45 +09:00
Giovanni Petrantoni
6af7909378
fix internal gossip tests
2020-07-18 21:00:44 +09:00
Giovanni Petrantoni
13c87a76c0
pubsubpeer, chronicles explicit override
2020-07-18 18:09:40 +09:00
Giovanni Petrantoni
17ac11f2b0
fix logging issue
2020-07-18 18:02:39 +09:00
Giovanni Petrantoni
88ace2c5dd
Merge branch 'master' into gossip-one-one
2020-07-18 12:08:25 +09:00
Dmitriy Ryajov
94196fee71
Connections and pubsub peers cleanup ( #279 )
...
* better peer tracking and cleanup
* check if peer and conn is nil
* test name
* make timeout more agressive
* rename method for better clarity
2020-07-17 13:46:24 -06:00
Dmitriy Ryajov
0348773ec9
Connection manager ( #277 )
...
* splitting out connection management
* wip
* wip conn mngr tests
* set peerinfo in contructor
* comments and documentation
* tests
* wip
* add `None` to detect untagged connections
* use `PeerID` to index connections
* fix tests
* remove useless equality
2020-07-17 09:36:48 -06:00
Giovanni Petrantoni
6b23cae3d4
wip
2020-07-17 18:01:30 +09:00
Giovanni Petrantoni
0d60a2f1c6
Merge branch 'master' into gossip-one-one
2020-07-17 17:10:49 +09:00
Giovanni Petrantoni
9e3f70896a
wip updateScores
2020-07-17 14:03:25 +09:00
Jacek Sieka
170685f9c6
gossipsub fixes ( #276 )
...
* graft up to D peers
* fix logging so it's clear who is grafting/pruning who
* clear fanout when grafting
2020-07-16 21:26:57 +02:00
Giovanni Petrantoni
6f638259ee
grafted and pruned procs
2020-07-16 22:32:43 +09:00
Giovanni Petrantoni
19d3d57d4c
small sugar
2020-07-16 21:59:33 +09:00
Giovanni Petrantoni
b0fa68022a
Merge branch 'master' into gossip-one-one
2020-07-16 21:59:03 +09:00
Giovanni Petrantoni
b3aad9e1ef
cleanups/wip
2020-07-16 21:53:45 +09:00
Jacek Sieka
c76152f2c1
Simplify send ( #271 )
...
* PubSubPeer.send single message
* gossipsub: simplify send further
2020-07-16 12:06:57 +02:00
Giovanni Petrantoni
f708874170
finishup with params
2020-07-16 16:55:59 +09:00
Giovanni Petrantoni
0e2ff309df
parameters wip
2020-07-16 13:23:11 +09:00
Giovanni Petrantoni
66e5f41c38
Merge branch 'master' into gossip-one-one
2020-07-16 11:44:11 +09:00
Dmitriy Ryajov
f35b8999b3
some light cleanup for pub/gossip sub ( #273 )
...
* move peer table out to its own file
* move peer table
* cleanup `==` and add one to peerinfo
* add peertable
* missed equality check
2020-07-15 13:18:55 -06:00
Giovanni Petrantoni
b9759c0536
Merge branch 'master' into gossip-one-one
2020-07-15 23:22:59 +09:00
Giovanni Petrantoni
255d9d0324
wip parameters
2020-07-15 17:44:23 +09:00
Eugene Kabanov
b832668768
Minprotobuf refactoring 2 ( #269 )
...
* Protobuf refactoring stage II.
* Remove NoError.
* Change trace level for invalid message.
2020-07-15 10:25:39 +02:00