charon
charon copied to clipboard
Drop too far future duties
🎯 Problem to be solved
Charon rejects P2P messages for old duties by checking if they already expired. Charon doesn't however do the same for "too far in the future" messages. This could be an attack vector to DDoS a node.
🛠️ Proposed solution
This could be done in the deadliner by basically rejecting messages that would be delayed by a very long time. This could also be done by introducing a new "recent duty checker" thing.
This needs to be integrated into all custom libp2p protocol receivers that contain duty slots.