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

feat: configurable faucet address for test-validator #2936

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zilayo
Copy link

@zilayo zilayo commented Sep 15, 2024

Problem

When using the solana-test-validator, it should be possible to run this entirely within the localhost space.
Currently there are a few services which listen on 0.0.0.0 by default, and have no option to configure to another address.

Summary of Changes

This PR fixes the faucet config in the test-validator, so that it runs on localhost + port 9900 (FAUCET_PORT constant from the faucet crate).

If additional configuration is required, the flag --rpc-faucet-address can be used, which is the same as the flag used in the main validator crate.

Example usage if it was required to make the faucet available to other hosts on port 9500:

solana-test-validator --rpc-faucet-address=0.0.0.0:9500

The clap arg validator ensures that any value passed will parse into a SocketAddr, otherwise an error is displayed to the user. If the flag isn't used, then the default value mentioned above is used.

@zilayo
Copy link
Author

zilayo commented Oct 29, 2024

any comments/suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant