Skip to content

lu-bann/commit-boost-client

 
 

Repository files navigation

Commit-Boost

A new Ethereum validator sidecar focused on standardizing the last mile of communication between validators and third-party protocols.

Docs | X (Twitter)

Overview

Commit-Boost is a modular sidecar that allows Ethereum validators to opt-in to different commitment protocols

For node operators

  • Run a single sidecar with support for MEV-Boost and other proposer commitments protocols, such as preconfirmations and inclusion lists
  • Out-of-the-box support for metrics reporting and dashboards to have clear insight into what is happening in your validator
  • Plug-in system to add custom modules, e.g. receive a notification on Telegram if a relay fails to deliver a block

For more information on how to run Commit-Boost, check out our docs.

For developers

  • A modular platform to develop and distribute proposer commitments protocols
  • A single API to interact with validators
  • Support for hard-forks and new protocol requirements

For more information on how to develop a module on Commit-Boost, check out our docs.

Example

NOTE: The code is unaudited and NOT ready for production. All APIs are subject to change

A basic commit module with Commit-Boost.

Add the commit-boost crate to your Cargo.toml:

commit-boost = { git = "https://github.com/Commit-Boost/commit-boost-client", rev = "..." }

Then in main.rs:

use commit_boost::prelude::*;

#[derive(Debug, TreeHash)]
struct Datagram {
    data: u64,
}

#[tokio::main]
async fn main() {
    let config = load_commit_module_config::<()>().unwrap();
    let pubkeys = config.signer_client.get_pubkeys().await.unwrap().keys;

    let pubkey = *pubkeys.consensus.first().unwrap().consensus;

    let datagram = Datagram { data: 42 };
    let request = SignConsensusRequest::builder(pubkey).with_msg(&datagram);
    let signature = config
        .signer_client
        .request_consensus_signature(&request)
        .await
        .unwrap();

    println!("Data: {datagram:?} - Commitment: {signature}");
}

Finally, create a Docker image with your binary, e.g. my_commit_module, and add it to the cb-config.toml file:

[[modules]]
id = "MY_MODULE"
docker_image = "my_commit_module"

For a more detailed example check out here and our docs on how to setup Commit-Boost for development.

Acknowledgements

License

MIT + Apache-2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.6%
  • Other 1.4%