Skip to content

Add throttle rules to slow down pushy IPs - #19

Merged
alexisbernard merged 14 commits into
masterfrom
throttle_rules
Aug 27, 2026
Merged

alexisbernard merged 14 commits into
masterfrom
throttle_rules

Conversation

@alexisbernard

Copy link
Copy Markdown
Member

It allows to set fine rules with different rate and time periods:

ActiveHashcash.throttle_rules = [
  {period: 1.hour, rate: 0.5},
  {period: 24.hours, rate: 0.25}
]

Thus in the last hour complexity increases by 0.5 for every successful stamp and by 0.25 between 1 and 24 hours ago.

@alexisbernard
alexisbernard merged commit 6f6baac into master Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant