Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

CriesofCarrots
Copy link
Contributor

@CriesofCarrots CriesofCarrots commented Apr 27, 2021

Problem

Follow-up to #16487
Airdrop requests sent to the same rpc node appear to the faucet with the same source IP address, regardless of the IP that sent the rpc request. If this IP is not the loopback address (as in the case of load-balanced api nodes remote from the faucet), airdrop requests will be overly limited by a faucet running with a per-time-cap, limiting all users together instead of per IP as intended.

Summary of Changes

Add allowed-IP list to faucet; IPs listed are excluded from ip limiting (address limits still checked/applied)

cc @joeaba

@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #16891 (6779c9b) into master (68d5aec) will increase coverage by 0.0%.
The diff coverage is 94.0%.

@@           Coverage Diff           @@
##           master   #16891   +/-   ##
=======================================
  Coverage    82.7%    82.7%           
=======================================
  Files         414      414           
  Lines      115659   115709   +50     
=======================================
+ Hits        95715    95771   +56     
+ Misses      19944    19938    -6     

Copy link
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, let's just replace the term whitelist with something like always allowed list.

@CriesofCarrots CriesofCarrots changed the title Add ip whitelist to faucet Add allowed-IP list to faucet Apr 28, 2021
@CriesofCarrots
Copy link
Contributor Author

@mvines I went with just allowed_ips. Look okay?

@CriesofCarrots CriesofCarrots added the automerge Merge this Pull Request automatically once CI passes label Apr 28, 2021
@mergify mergify bot merged commit 36574c3 into solana-labs:master Apr 28, 2021
mergify bot pushed a commit that referenced this pull request Apr 28, 2021
mergify bot added a commit that referenced this pull request Apr 28, 2021
(cherry picked from commit 36574c3)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
@CriesofCarrots CriesofCarrots deleted the faucet-whitelist branch May 10, 2021 20:10
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants