[ot][spam][crazy][spam][confused code] asdf!

Undescribed Horrific Abuse, One Victim & Survivor of Many gmkarl at gmail.com
Mon Jul 17 12:18:40 PDT 2023


if remaining <= ratelimit_period and ratelimit_period > delay * 2:
    min_delay = block_time / dividor
    # min_delay + max_delay / 2 = ratelimited_delay
    extra_delay = 2 * ratelimited_delay - 3 * min_delay
    delay = min_delay + extra_delay * (eta - mark_time) / ratelimit_period
    assert mark_time + delay < eta

the old code calculates a linear relation based on mark_time and
ratelimit_period
it's using ratelimited_delay = ratelimit_period / ratelimit_count

instead we could track ratelimit_count - # calls, call it
remaining_count or remaining_ratelimit_count [and figure out one
single delay (or chart a line again) based on this] [and ensure the
last two queries at eta and eta-min_period !]


More information about the cypherpunks mailing list