Background
When implementing DOS protection for nwaku we found the chronos implements token_bucket but has limitations and an issue that prevented use for nwaku purposes.
Now chat-sdk needs similar functionality with some extension (#3497).
It means we are spreading slightly different implementation of the same solution.
Details
We aim to make all these implementation sourced back to origin into chronos library.
- The final solution shall cover the fixed version of original feature set
- Shall cover the nwaku needs for currently implemented DOS protection rate limiter.
- To be extended with chat-sdk interface
Acceptance criteria
chronos, libp2p (original user of chronos' token_bucket), nwaku tests shall pass with original requirements.
chat-sdk shall be capable to use it directly from chronos without further needs.