composable-ibc icon indicating copy to clipboard operation
composable-ibc copied to clipboard

docs: add spec for ibc rate limit

Open blasrodri opened this issue 2 years ago • 9 comments

file rendered

blasrodri avatar Feb 15 '23 10:02 blasrodri

awesome

dzmitry-lahoda avatar Feb 16 '23 14:02 dzmitry-lahoda

@blasrodri may you provide simple trait hook/callback for any custom rate limiter to fit into IBC pallet?

so we can set no operation larger than 1 DOT can happen

dzmitry-lahoda avatar Feb 23 '23 11:02 dzmitry-lahoda

thank for writing out design into doc. instead of reading contract code. so i dislike epoch based design. imho there should be efficient continuous design. so that there is no need to write user code based on what time it is.

dzmitry-lahoda avatar Feb 27 '23 12:02 dzmitry-lahoda

thank for writing out design into doc. instead of reading contract code. so i dislike epoch based design. imho there should be efficient continuous design. so that there is no need to write user code based on what time it is.

So from your perspective is to have a window that's constantly adjusting?

blasrodri avatar Feb 27 '23 12:02 blasrodri

@blasrodri may you provide simple trait hook/callback for any custom rate limiter to fit into IBC pallet?

so we can set no operation larger than 1 DOT can happen

this is also a good idea. As far as I understood, we wanted to implement this as a middleware, so that any behavior should be easily encoded

blasrodri avatar Feb 27 '23 12:02 blasrodri

https://github.com/ComposableFi/centauri/pull/225

dzmitry-lahoda avatar Feb 27 '23 13:02 dzmitry-lahoda

So from your perspective is to have a window that's constantly adjusting?

yes. i am sure it is possible with good O(1) and no epoches (updates on each block)

dzmitry-lahoda avatar Feb 27 '23 13:02 dzmitry-lahoda

@dzmitry-lahoda how would you update the window on O(1)?

  • If you store an aggregated number (scalar), then it's harder to update it by removing the older one, as you don't keep track of individual values.

blasrodri avatar Feb 27 '23 13:02 blasrodri

If you store an aggregated number (scalar), then it's harder to update it by removing the older one, as you don't keep track of individual values.

I was thinking on how toiled flush works or mana in games.

dzmitry-lahoda avatar Feb 27 '23 15:02 dzmitry-lahoda