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

Adding a faucet to the miden-node #247

Closed
wants to merge 2 commits into from
Closed

Conversation

phklive
Copy link
Contributor

@phklive phklive commented Feb 23, 2024

The Miden node generates 2 accounts by default at genesis:

  • a Faucet account
  • a regular account

We need to make the faucet available and usable on node spin-up, this would enable request of funds and testing of tx's from users of the network.

In this PR I propose to add a new crate called faucet to the node workspace and use actix-web to create a web-server that will serve html, css and js static files.

The faucet receives requests of funds through an endpoint where users on the frontend pass their AccountId. The server responds with the note generated by the tx. The end user is then able to import this newly received note into their client and consume it locally.

closes: #215

@phklive
Copy link
Contributor Author

phklive commented Feb 23, 2024

#224 (comment)

To answer your question @bobbinth I believe that it would better to have the faucet as a separate crate to not deeply couple it to the node. Considering that in the future we could have other implementations / backends that could need a faucet.

Hence leaving it as a standalone component could enable people with configurations to spin up a faucet rapidly and ergonomically.

@phklive
Copy link
Contributor Author

phklive commented Feb 23, 2024

Things that could be done / improved now:

  • Improve error handling in the faucet server code
  • Improve error handling / reporting of server errors on the frontend
  • Fix different import of rusqlite features in the node <> client
  • Enable user configuration of the endpoints through config file
  • Add unit / integration tests
  • Add makefile and commands to run node + faucet

@phklive phklive closed this Mar 11, 2024
@bobbinth bobbinth deleted the phklive-miden-faucet branch April 12, 2024 07:46
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.

Create a faucet website for node testing
1 participant