Skip to content

Commit ac480aa

Browse files
author
Mihail Kirov
committed
feat: github pages with MD docs, swagger UI for Signer API
1 parent 6dfa5f5 commit ac480aa

38 files changed

+446
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Core Commit-Boost
2+
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.
3+
4+
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).
5+
![architecture](commit-boost.png)
6+
Using this as a middleware instead of direct modification to the consensus client or running a sidecar per commitment will allow for each component to be sustained independently and will provide for cross proposer commitment compatibility.

docs/architecture.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Architecture
2+
The following are schematics and details around Commit-Boost.
3+
1. [Core Commit-Boost](architecture-core-commit-boost.md)
4+
2. [Terminology](terminology.md)

docs/architecture.png

-266 KB
Binary file not shown.

docs/background.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Background
2+
- Proposer commitments have been an important part of Ethereum’s history and could continue to be a powerful unlock for Ethereum
3+
- Today, we already see the power of commitments where nearly 90% of validators currently make a wholesale commitment that outsources block building to a sophisticated actor called a block builder (facilitated by a software called MEV-Boost)
4+
- However, a wholesale commitment gives away the proposer’s autonomy over the block. Many are starting to realize that if proposers could make more granular commitments, there is a significant design space and opportunity for Ethereum and its validators
5+
- On the surface, all the efforts around proposer commitments are a unlock for Ethereum, with most starting to agree on a common denominator: in the future, validators will face a broader set of options of what they may “commit" to
6+
- While this all seems great, the challenge is that this already is and will continue to drive fragmentation and risks for Ethereum and proposers
7+
- Commit-Boost is aimed to standardize proposer commitment protocols communication with the proposer with unification behind one sidecar helping to reduce the risk of fragmentation

docs/commit-boost.png

114 KB
Loading

docs/communicating-with-signer.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Communicating with the Signer Module
2+
The core of any commitment module is its interaction with the signer API.
3+
Note: Below examples will show snippets in Rust, however any language that allows for instantiation of an http client will work.
4+
Note: A more complete example of the Signer Module usage can be found here
5+
## Authentication
6+
Communication between the proposer commitment module and Commit-Boost is authenticated with a JWT token. This token will be provided as `CB_JWT_<MODULE_NAME>` by the Commit-Boost launcher at initialization time.
7+
To discover which pubkeys a commitment can be made for call `/signer/v1/get_pubkeys`:
8+
```use serde::Deserialize;
9+
10+
#[derive(Deserialize)]
11+
pub struct GetPubkeysResponse {
12+
pub consensus: Vec<BlsPublicKey>,
13+
pub proxy: Vec<BlsPublicKey>,
14+
}
15+
16+
let url = format!("{}/signer/v1/get_pubkeys", COMMIT_BOOST_HOST);
17+
18+
let pubkeys = reqwest::get(url)
19+
.await
20+
.unwrap()
21+
.json::<GetPubkeysResponse>()
22+
.unwrap()
23+
.consensus;```
24+
Once you'd like to receive a signature to create a commitment, you'd create the request like so:
25+
```use serde_json::json;
26+
use alloy_rpc_types_beacon::BlsSignature
27+
28+
#[derive(Debug, Clone, Serialize, Deserialize)]
29+
pub struct SignRequest {
30+
pub id: String,
31+
pub pubkey: BlsPublicKey,
32+
pub is_proxy: bool,
33+
pub object_root: [u8; 32],
34+
}
35+
36+
let sign_request_body = json!({
37+
"id": "0",
38+
"pubkey": "0xa02ccf2b03d2ec87f4b2b2d0335cf010bf41b1be29ee1659e0f0aca4d167db7e2ca1bf1d15ce12c1fac5a60901fd41db",
39+
"is_proxy": false,
40+
"object_root": "your32commitmentbyteshere0000000"
41+
});
42+
43+
let url = format!("{}/signer/v1/request_signature", COMMIT_BOOST_HOST);
44+
let client = reqwest::Client::new();
45+
let res = client
46+
.post(url)
47+
.json(sign_request_body)
48+
.send()
49+
.await
50+
.unwrap();
51+
52+
let signature_bytes = res.bytes().await.unwrap();
53+
let signature = BlsSignature::from_slice(&signature_bytes);```

docs/custom-module.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1. [Setting up a lean custom module in Rust](setup-module.md)
2+
1. [Set up metrics reporting in custom module](metrics-reporting.md)
3+
2. [Communicating with the Signer Module](communicating-with-signer.md)

docs/dist/favicon-16x16.png

665 Bytes
Loading

docs/dist/favicon-32x32.png

628 Bytes
Loading

docs/dist/index.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
html {
2+
box-sizing: border-box;
3+
overflow: -moz-scrollbars-vertical;
4+
overflow-y: scroll;
5+
}
6+
7+
*,
8+
*:before,
9+
*:after {
10+
box-sizing: inherit;
11+
}
12+
13+
body {
14+
margin: 0;
15+
background: #fafafa;
16+
}

0 commit comments

Comments
 (0)