Open ppopth opened 5 months ago
However, I think using a slice to back the queue is problematic at many levels as it might leak space with a growing array, and also hang on to too much space.
The unused space will be freed eventually https://stackoverflow.com/a/26863706
I'm not really sure if we need dfd81e80848e5ce4e64fbf30cfdaafb4dc56b9d3 or not. I guess adding a non-standard flag to pb/trace.proto
would break some users of the tracers?
I'm not really sure if we need dfd81e8 or not. I guess adding a non-standard flag to
pb/trace.proto
would break some users of the tracers?
Yeah, let's not break compatibility with existing code, we don't need it.
Any progress other than that?
Any progress other than that?
I haven't implemented the second half. Does the first half looks good to you?
yes, looks reasonable so far.
@vyzo I finished everything already. Sorry for the delay. I was in vacation and was a bit busy lately. Thank you for your patience.
The message ids from IDONTWANT can be very large, so hashing it before keeping it in memory quite makes sense. The same thing is already implemented in nim-libp2p https://github.com/vacp2p/nim-libp2p/pull/1090
sure, but it needs to be cleared, otherwise its memroy leak and dos waiting to happen. Or at best the feature breaks itself for long running nodes.
I suggest for each IDW keep a counter of how many heartbeats it survived, and after 3 (to match the IHAVE ads) it should be cleared.
@vyzo It's all done. Sorry for the delay.
ok, can you rebase on master?
Sending IDONTWANT
Handling IDONTWANT
max_idontwant_messages
(ignore the IDONWANT packets if the max is reached)Spec: https://github.com/libp2p/specs/pull/548