Skip to content

chore: bump rust to 1.85 / 2024 #328

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ members = ["benches/*", "bin", "crates/*", "examples/builder_log", "examples/da_
resolver = "2"

[workspace.package]
edition = "2021"
rust-version = "1.83"
edition = "2024"
rust-version = "1.85"
version = "0.8.0-rc.2"

[workspace.dependencies]
Expand Down
5 changes: 0 additions & 5 deletions bin/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ use clap::Parser;
#[tokio::main]
async fn main() -> eyre::Result<()> {
color_eyre::install()?;
// set default backtrace unless provided
if std::env::var_os("RUST_BACKTRACE").is_none() {
std::env::set_var("RUST_BACKTRACE", "1");
}

let args = cb_cli::Args::parse();

args.run().await
Expand Down
4 changes: 0 additions & 4 deletions bin/pbs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ use tracing::{error, info};
async fn main() -> Result<()> {
color_eyre::install()?;

// set default backtrace unless provided
if std::env::var_os("RUST_BACKTRACE").is_none() {
std::env::set_var("RUST_BACKTRACE", "1");
}
let _guard = initialize_tracing_log(PBS_MODULE_NAME, LogsSettings::from_env_config()?);

let _args = cb_cli::PbsArgs::parse();
Expand Down
4 changes: 0 additions & 4 deletions bin/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ use tracing::{error, info};
async fn main() -> Result<()> {
color_eyre::install()?;

// set default backtrace unless provided
if std::env::var_os("RUST_BACKTRACE").is_none() {
std::env::set_var("RUST_BACKTRACE", "1");
}
let _guard = initialize_tracing_log(SIGNER_MODULE_NAME, LogsSettings::from_env_config()?);

let _args = cb_cli::SignerArgs::parse();
Expand Down
2 changes: 1 addition & 1 deletion crates/signer/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
std::env::set_var("OUT_DIR", "src/proto");
unsafe { std::env::set_var("OUT_DIR", "src/proto") };
tonic_build::configure().build_server(false).compile_protos(
&[
"proto/pb/v1/lister.proto",
Expand Down
22 changes: 14 additions & 8 deletions docs/docs/get_started/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

Commit-Boost's components are all written in [Rust](https://www.rust-lang.org/). This guide will walk you through the setup required to build them from source. It assumes you are on a Debian or Debian-based system (e.g., Ubuntu, Linux Mint, Pop OS). For other systems, please adapt the steps for your system's package manager accordingly.


## Building via the Docker Builder

For convenience, Commit-Boost has Dockerized the build environment for Linux `x64` and `arm64` platforms. It utilizes Docker's powerful [buildx](https://docs.docker.com/reference/cli/docker/buildx/) system. All of the prerequisites, cross-compilation tooling, and configuration are handled by the builder image. If you would like to build the CLI, PBS module, or Signer binaries and Docker images from source, you are welcome to use the Docker builder process.
Expand All @@ -27,17 +26,15 @@ The `version` provided will be used to house the output binaries in `./build/<ve

If you're interested in building the binaries and/or Docker images for multiple architectures (currently Linux `amd64` and `arm64`), use the variants of those recipes that have the `-multiarch` suffix. Note that building a multiarch Docker image manifest will require the use of a [custom Docker registry](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-20-04), as the local registry built into Docker does not have multiarch manifest support.


## Building Manually

If you don't want to use the Docker builder, you can compile the Commit-Boost artifacts locally. The following instructions assume a Debian or Debian-based system (e.g., Ubuntu, Linux Mint, Pop OS) for simplicity. For other systems, please adapt any relevant instructions to your environment accordingly.


### Prerequisites

Requirements:

- Rust 1.83+
- Rust 1.85+
- GCC (or another C compiler of your choice)
- OpenSSL development libraries
- Protobuf Compiler (`protoc`)
Expand Down Expand Up @@ -65,48 +62,53 @@ just install-protoc
This works on OSX and Linux systems, but you are welcome to download and install it manually as well.

With the prerequisites set up, pull the repository:

```bash
git clone https://github.com/Commit-Boost/commit-boost-client
```

Check out the `stable` branch which houses the latest release:

```bash
cd commit-boost-client && git checkout stable
```

Finally, update the submodules:

```
git submodule update --init --recursive
```

Your build environment should now be ready to use.


### Building the CLI

To build the CLI, run:

```
cargo build --release --bin commit-boost-cli
```

This will create a binary in `./target/release/commit-boost-cli`. Confirm that it works:

```
./target/release/commit-boost-cli --version
```

You can now use this to generate the Docker Compose file to drive the other modules if desired. See the [configuration](./configuration.md) guide for more information.


### Building the PBS Module

To build PBS, run:

```
cargo build --release --bin commit-boost-pbs
```

This will create a binary in `./target/release/commit-boost-pbs`. To verify it works, create [a TOML configuration](./configuration.md) for the PBS module (e.g., `cb-config.toml`).

As a quick example, we'll use this configuration that connects to the Flashbots relay on the Hoodi network:

```toml
chain = "Hoodi"

Expand All @@ -130,11 +132,13 @@ secrets_path = "/tmp/secrets"
```

Set the path to it in the `CB_CONFIG` environment variable and run the binary:

```
CB_CONFIG=cb-config.toml ./target/release/commit-boost-pbs
```

If it works, you should see output like this:

```
2025-05-07T21:09:17.407245Z WARN No metrics server configured
2025-05-07T21:09:17.407257Z INFO starting PBS service version="0.7.0" commit_hash="58082edb1213596667afe8c3950cd997ab85f4f3" addr=127.0.0.1:18550 events_subs=0 chain=Hoodi
Expand All @@ -144,17 +148,18 @@ If it works, you should see output like this:

If you do, then the binary works.


### Building the Signer Module

To build the Signer, run:

```
cargo build --release --bin commit-boost-signer
```

This will create a binary in `./target/release/commit-boost-signer`. To verify it works, create [a TOML configuration](./configuration.md) for the Signer module (e.g., `cb-config.toml`). We'll use the example in the PBS build section above.

The signer needs the following environment variables set:

- `CB_CONFIG` = path of your config file.
- `CB_JWTS` = a dummy key-value pair of [JWT](https://en.wikipedia.org/wiki/JSON_Web_Token) values for various services. Since we don't need them for the sake of just testing the binary, we can use something like `"test_jwts=dummy"`.

Expand All @@ -166,10 +171,11 @@ CB_CONFIG=cb-config.toml CB_JWTS="test_jwts=dummy" ./target/release/commit-boost
```

You should see output like this:

```
2025-06-03T04:57:19.815702Z WARN Proxy store not configured. Proxies keys and delegations will not be persisted
2025-06-03T04:57:19.818193Z INFO Starting signing service version="0.8.0-rc.1" commit_hash="3eed5268f07803c55cca7d7e2e14a7017098f797" modules=["test"] endpoint=127.0.0.1:20000 loaded_consensus=0 loaded_proxies=0
2025-06-03T04:57:19.818229Z WARN No metrics server configured
```

If you do, then the binary works.
If you do, then the binary works.
9 changes: 7 additions & 2 deletions docs/docs/get_started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Commit-Boost is primarily based on [Docker](https://www.docker.com/) to enable m

Each component roughly maps to a container: from a single `.toml` config file, the node operator can specify which modules they want to run, and Commit-Boost takes care of spinning up the services and creating links between them.
Commit-Boost ships with two core modules:

- A PBS module which implements the [BuilderAPI](https://ethereum.github.io/builder-specs/) for [MEV Boost](https://docs.flashbots.net/flashbots-mev-boost/architecture-overview/specifications).
- A signer module, which implements the [Signer API](/api) and provides the interface for modules to request proposer commitments.

Expand All @@ -18,13 +19,16 @@ The Commit-Boost CLI creates a dynamic `docker-compose` file, with services and
Whether you're using Docker or running the binaries natively, you can compile from source directly from the repo, or download binaries and fetch docker images from the official releases.

## Binaries and images

Find the latest releases at https://github.com/Commit-Boost/commit-boost-client/releases.

The modules are also published at [each release](https://github.com/orgs/Commit-Boost/packages?repo_name=commit-boost-client).

### From source

Requirements:
- Rust 1.83

- Rust 1.85

:::note
Run `rustup update` to update Rust and Cargo to the latest version
Expand All @@ -43,6 +47,7 @@ If you get an `openssl` related error try running: `apt-get update && apt-get in
:::

### Docker

You will need to build the CLI to create the `docker-compose` file:

```bash
Expand All @@ -54,6 +59,7 @@ cargo build --release --bin commit-boost-cli
```

and the modules as Docker images:

```bash
docker build -t commitboost_pbs_default . -f ./provisioning/pbs.Dockerfile
docker build -t commitboost_signer . -f ./provisioning/signer.Dockerfile
Expand All @@ -72,4 +78,3 @@ cargo build --release --bin commit-boost-pbs
# Build the Signer module
cargo build --release --bin commit-boost-signer
```

2 changes: 1 addition & 1 deletion provisioning/build.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This will be the main build image
FROM --platform=${BUILDPLATFORM} rust:1.83-slim-bookworm AS chef
FROM --platform=${BUILDPLATFORM} rust:1.85-slim-bookworm AS chef
ARG TARGETOS TARGETARCH BUILDPLATFORM TARGET_CRATE
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.83.0"
channel = "1.85.0"
Loading