-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add faucet enabling testing #270
Conversation
One thing to keep in mind is that this PR will be merged soon (and the Client will be released to crates.io either today or tomorrow) so that might imply some minor changes here. |
Let merge :) @igamigo can you review this today or tomorrow? |
Will be checking it out in a few hours! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Left some non-blocking considerations.
A couple more general points:
- For the website, it seems that the button should post to the server and so you would get some feedback from the browser in terms of the request. The deployed website did not show any feedback and this would be confusing in terms of waiting for the response
- The deployed website is still up, should it be taken offline for now?
@phklive - could you add a short README to the |
[package] | ||
name = "miden-node-faucet" | ||
version = "0.1.0" | ||
edition = "2021" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do this the same way as we do it in all other crates (e.g., see here).
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this can probably be deleted.
[dependencies] | ||
actix-web = "4" | ||
actix-files = "0.6.5" | ||
actix-cors = "0.7.0" | ||
derive_more = "0.99.17" | ||
figment = { version = "0.10", features = ["toml", "env"] } | ||
miden-lib = { workspace = true } | ||
miden-client = { version = "0.1.0", features = ["concurrent"] } | ||
miden-node-proto = { path = "../proto", version = "0.2" } | ||
miden-node-utils = { path = "../utils", version = "0.2" } | ||
miden-objects = { workspace = true } | ||
serde = { version = "1.0", features = ["derive"] } | ||
clap = { version = "4.5.1", features = ["derive"] } | ||
async-mutex = "1.4.0" | ||
tracing = { workspace = true } | ||
tracing-subscriber = { workspace = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's alphabetize the dependencies.
* ci: turn doc warnings into errors (#259) * Boilerplate done * pushed fix for miden-client * Fix formatting * Pulled after client fix * Fixed typos + added build_client fn * Added configs + figment * Fix client implementation in faucet + use released client * updated cargo * Fixed Miden node when importing Miden client, db errors * Format files * Added proper support of configuration file + logging * Improved config file handling * Removed superfluous file * First pass at improvements * Change naming of note * Fixed html + added metadata endpoint * Want to implement Display for NoteId * Upgraded js to use async + NoteId does not impl Display in main * cargo updated --------- Co-authored-by: Augusto Hack <[email protected]>
The Miden node generates 2 accounts by default at genesis:
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 nodeworkspace
and useactix-web
to create a web-server that will servehtml
,css
andjs
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