Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faucet ratelimit not correct #1938

Open
CharlieC3 opened this issue Apr 10, 2024 · 0 comments
Open

Faucet ratelimit not correct #1938

CharlieC3 opened this issue Apr 10, 2024 · 0 comments
Assignees

Comments

@CharlieC3
Copy link
Member

Describe the bug
When using the STX faucet, a ratelimit is applied to the request. However, the condition which determines when to block or allow a request pulls its non-stacking and stacking faucet request historical data from the same source, resulting in some requests being blocked when they should not be.

To Reproduce
Steps to reproduce the behavior:

  1. Request non-stacking amount from faucet to a testnet Stacks address and wait for the TX to settle. This will be allowed
  2. Request a stacking amount from faucet to the same Stacks address. This will be denied despite a stacking faucet request never being sent before.

Expected behavior
A faucet request should only rate limit someone if they've made a successful faucet request in like-kind (stacking=false vs stacking=true)

Console log

04/10/2024, 10:36:59.413 AM	request completed -> /extended/v1/faucets/stx?address=ST1X0WKFDX7K2BD6FK4XJMCX3M4BZETDKWF353FGV -> 200 -> POST
04/10/2024, 11:38:00.303 AM	STX faucet rate limit hit for address ST1X0WKFDX7K2BD6FK4XJMCX3M4BZETDKWF353FGV
04/10/2024, 11:38:00.304 AM	request completed -> /extended/v1/faucets/stx?address=ST1X0WKFDX7K2BD6FK4XJMCX3M4BZETDKWF353FGV&stacking=true -> 429 -> POST
04/10/2024, 11:46:52.351 AM	STX faucet rate limit hit for address ST1X0WKFDX7K2BD6FK4XJMCX3M4BZETDKWF353FGV
04/10/2024, 11:46:52.352 AM	request completed -> /extended/v1/faucets/stx?address=ST1X0WKFDX7K2BD6FK4XJMCX3M4BZETDKWF353FGV&stacking=true -> 429 -> POST
04/10/2024, 11:47:40.629 AM	STX faucet rate limit hit for address ST1X0WKFDX7K2BD6FK4XJMCX3M4BZETDKWF353FGV
04/10/2024, 11:47:40.630 AM	request completed -> /extended/v1/faucets/stx?address=ST1X0WKFDX7K2BD6FK4XJMCX3M4BZETDKWF353FGV&stacking=true -> 429 -> POST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants