Skip to content

Conversation

mikirov
Copy link

@mikirov mikirov commented Jul 5, 2024

  • Github Pages docs in MD format
  • Swagger UI

@mikirov mikirov self-assigned this Jul 5, 2024
@Daniel-K-Ivanov
Copy link
Contributor

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).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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]
Copy link
Contributor

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]
Copy link
Contributor

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
Copy link
Contributor

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::{
Copy link
Contributor

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

Copy link
Collaborator

@ltitanb ltitanb left a 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

@ltitanb ltitanb merged commit cfc439f into main Jul 7, 2024
@ltitanb ltitanb deleted the feat/docs branch July 14, 2024 16:25
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.

3 participants