waku-org / nwaku

Waku node and protocol.
Other
183 stars 46 forks source link

refactor: draft state machine #2656

Closed SionoiS closed 1 week ago

SionoiS commented 2 weeks ago

First draft of the Waku sync type state machine. Much more difficult to do in Nim than Rust but it works.

@chaitanyaprem WDYT?

github-actions[bot] commented 2 weeks ago

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2656-rln-v2

Built from f569321528a69e4499d14af9dcedadbad39b4b60

github-actions[bot] commented 2 weeks ago

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2656-rln-v1

Built from f569321528a69e4499d14af9dcedadbad39b4b60

SionoiS commented 2 weeks ago

We still have to wrap the protocol then send a "end" payload from the client to have a clean stop on both side.

SionoiS commented 2 weeks ago

The clean stop does not happen when running tests because the test end abruptly.

SionoiS commented 2 weeks ago

About the closing of the connection, it seams like no other protocol do so, so I removed it.

chaitanyaprem commented 2 weeks ago

About the closing of the connection, it seams like no other protocol do so, so I removed it.

That is interesting, doesn't it cause the stream to stay open? Or when the object is GC'd the stream gets closed. Maybe worth investigating to confirm streams are not left dangling.