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

Refactor node from 4 to 1 binary and add feature flags #292

Closed
wants to merge 15 commits into from

Conversation

phklive
Copy link
Contributor

@phklive phklive commented Mar 29, 2024

In this PR I propose the refactor of the node internal structure to enable/disable services using flags and reduce from 4 to 1 binary.

closes: #92

bobbinth and others added 15 commits March 11, 2024 15:19
* ci: turn doc warnings into errors (#259)

* remove unnecessary comments

* Add script to check rust versions

* removed versions and editions except from root, updated script

* add back cargo make doc to ci

* Added section for testing

* Fixed typo

* Set versions to 0.1.0 + inherit all infos from workspace

* Fix use of versioning

* Set individual versions for crates

* Fixed nits, code organization and updated links

* Improve naming of ci job

* Fix formatting in contributing.md

* Add task to format not only check

* Reduced indent

---------

Co-authored-by: Augusto Hack <[email protected]>
* Working initial docker

* fmt

* added script

* Removed docker script + updated integration

* script works

* Need to install grpcurl

* Docker works

* Working Dockerfile

* ci: turn doc warnings into errors (#259)

* Removed makefile, removing start.sh file moving in Dockerfile

* Added bookworm + alpine + removed gcc + added caching

* Moved Dockerfile to node and added Makefile.toml

* cargo make works + builds dockerfile for node

* remove start script

* added comment regarding PID1

* Set labels at top of Dockerfile + added comments

* Added correct dependencies and explanation

* Volume works persisting db files between runs

* Added documentation

* Moved labels + enable mounting of miden-node.toml

* Added docker-run-node command + added build arguments

* Add git commit as arg to docker container

* Added spacing

---------

Co-authored-by: Augusto Hack <[email protected]>
* feat: implement nullifier tree wrapper over `Smt`

* refactor: move `NullifierTree` to separated file, renames ans small fixes

* fix: address review comments
* ci: turn doc warnings into errors (#259)

* Separated different CI jobs in their respective files

* Add next branch in ci

* Fix wrong naming in CI + use cargo make for doc

* Fixed badge + removed unnecessary additional file

* Change naming of ci and jobs

* Fix naming

* Fix comment

---------

Co-authored-by: Augusto Hack <[email protected]>
* 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]>
Cargo.toml Outdated
Comment on lines 2 to 11
members = [
"block-producer",
"node",
"proto",
"rpc",
"store",
"utils",
"test-macro",
"faucet"
"bin/node",
"crates/block-producer",
"crates/proto",
"crates/rpc",
"crates/faucet",
"crates/store",
"crates/utils",
"crates/test-macro",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the motivation for creating this structure?

Also, if we go with it, shouldn't faucet go under bin too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It clearly separates the binary and it's components ( crates ) making the navigation of the repo clearer. This structured is inspired by RETH: https://github.com/paradigmxyz/reth

imo what I will do in this PR is to refactor the faucet to become a lib of the Node as with the other components ( block-producer, rpc, store ) and enable/disable the faucet using commang line arguments, EX:

cargo run start node --faucet

@phklive phklive closed this Apr 16, 2024
@bobbinth bobbinth deleted the phklive-binary-refactor branch April 29, 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.

5 participants