-
Notifications
You must be signed in to change notification settings - Fork 59
Feat/docs #8
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
Conversation
mikirov
commented
Jul 5, 2024
- Github Pages docs in MD format
- Swagger UI
Seems that you have included the grafana PR inside this PR. Can you remove the grafana dashboard changes so that we isolate the 2 changes one from another |
feat: github pages with MD docs, swagger UI for Signer API
# Core Commit-Boost | ||
Below is a schematic of Commit-Boost. This proposed architecture allows proposers to run one sidecar, but still retain the ability to opt into a network of proposer commitment modules. More specifically, with this middleware, the proposer will only need to (in the case of delegation) run one sidecar and limits their responsibilities to only selecting which module / proposer commitment protocol they would like to subscribe to. | ||
|
||
It is important to note that the below depiction contains just a few examples of proposer commitment modules that can run on Commit-Boost. The design space for modules is completely open / not gated by the Commit-Boost software. The Commit-Boost software also does not come with modules (these are developed by teams outside of the Commit-Boost software), proposers will be responsible for opting into the commitments they wish to subscribe to (i.e., a proposer is responsible for which modules they will subscribe to). |
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.
It is important to note that the below depiction contains just a few examples of proposer commitment modules that can run on Commit-Boost. The design space for modules is completely open / not gated by the Commit-Boost software. The Commit-Boost software also does not come with modules (these are developed by teams outside of the Commit-Boost software), proposers will be responsible for opting into the commitments they wish to subscribe to (i.e., a proposer is responsible for which modules they will subscribe to). | |
It is important to note that the below depiction contains just a few examples of proposer commitment modules that can run on Commit-Boost. The design space for modules is completely open / not gated by the Commit-Boost software. Commit-Boost provides a built-in modules such as Signer and PBS module, however users are free to decide the modules they want to be running. |
@@ -0,0 +1,4 @@ | |||
# Architecture |
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.
Seems like we can place the architecture content within this md file instead of having an empty page with 2 links
### From the perspective of the proposer commitment protocol / module creator: | ||
- Framework / standard request a to have a proposer make a commitment | ||
|
||
## Table of Contents |
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.
It would be great to modify the git pages so that we have this table of content always on the left similar to gitbook
use lazy_static::lazy_static; | ||
use prometheus::{IntCounter, Registry};``` | ||
3. Lazy load the prometheus registry and custom metric (for example a counter): | ||
```// You can define custom metrics and a custom registry for the business logic of your module. These |
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.
this is not formatted properly.
Make sure that it is rendered properly and you can include the ```rust tag so that there is syntax highlights
IntCounter::new("signature_received", "successful signatures requests received").unwrap(); | ||
}``` | ||
4. Initialize the registry and run the Module's metrics reporting server in main: | ||
```#[tokio::main] |
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.
this is not formatted properly.
Make sure that it is rendered properly and you can include the ```rust tag so that there is syntax highlights
}``` | ||
|
||
6. Your main method needs to have the setup boilerplate code: | ||
```#[tokio::main] |
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.
this is not formatted properly.
Make sure that it is rendered properly and you can include the ```rust tag so that there is syntax highlights
}; | ||
use cb_metrics::sdk::MetricsProvider;``` | ||
5. Declare the extra config you need to parse in a struct: | ||
```// Extra configurations parameters can be set here and will be automatically parsed from the |
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.
this is not formatted properly.
Make sure that it is rendered properly and you can include the ```rust tag so that there is syntax highlights
cb-pbs.workspace = true | ||
cb-crypto.workspace = true``` | ||
4. Import the cb modules in your main.rs: | ||
```use cb_common::{ |
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.
this is not formatted properly.
Make sure that it is rendered properly and you can include the ```rust tag so that there is syntax highlights
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.
Merging now and we can adjust if needed