Skip to content
Merged
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
21 changes: 8 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ jobs:
x86_64-apple-darwin,
aarch64-apple-darwin,
]
names:
- binary: commit-boost
publish: commit-boost-cli
- binary: default-pbs
publish: commit-boost-pbs
- binary: signer-module
publish: commit-boost-signer
name: [commit-boost-cli, commit-boost-pbs, commit-boost-signer]

include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
Expand Down Expand Up @@ -64,28 +59,28 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }} --bin ${{ matrix.names.binary }}
args: --release --target ${{ matrix.target }} --bin ${{ matrix.name }}
env:
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: gcc

- name: Package binary (Unix)
if: runner.os != 'Windows'
run: |
cd target/${{ matrix.target }}/release
tar -czvf ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.names.binary }}
mv ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ../../../
tar -czvf ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.name }}
mv ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ../../../

- name: Package binary (Windows)
if: runner.os == 'Windows'
run: |
cd target/${{ matrix.target }}/release
7z a ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.names.binary }}.exe
move ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.zip ../../../
7z a ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.name }}.exe
move ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip ../../../

- name: Upload binary to release
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.${{ runner.os == 'Windows' && 'zip' || 'tar.gz' }}
files: ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.${{ runner.os == 'Windows' && 'zip' || 'tar.gz' }}
draft: true
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
6 changes: 3 additions & 3 deletions benches/pbs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ docker rm --force mev_boost_bench
#### Commit-Boost
You can run the provided `docker-compose` file:
```bash
commit-boost start --docker benches/pbs/bench.docker-compose.yml
commit-boost-cli start --docker benches/pbs/bench.docker-compose.yml
```
or regenerate it using `commit-boost init`.
or regenerate it using `commit-boost-cli init`.

To clean up after then benchmark, run:
```bash
commit-boost stop --docker benches/pbs/bench.docker-compose.yml
commit-boost-cli stop --docker benches/pbs/bench.docker-compose.yml
```

### Running the benchmark
Expand Down
12 changes: 6 additions & 6 deletions bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ eyre.workspace = true
color-eyre.workspace = true

[[bin]]
name = "commit-boost"
path = "commit_boost.rs"
name = "commit-boost-cli"
path = "cli.rs"

[[bin]]
name = "default-pbs"
path = "default_pbs.rs"
name = "commit-boost-pbs"
path = "pbs.rs"

[[bin]]
name = "signer-module"
path = "signer_module.rs"
name = "commit-boost-signer"
path = "signer.rs"
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ SOME_ENV_VAR = "some_value"
# - files:
# - /etc/prometheus/targets.json
# ```
# and use the `targets.json` file generated by `commit-boost init`
# and use the `targets.json` file generated by `commit-boost-cli init`
prometheus_config = "./docker/prometheus.yml"
# Whether to start Grafana with built-in dashboards
# OPTIONAL, DEFAULT: true
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/src/docker_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ pub fn handle_docker_init(config_path: String, output_dir: String) -> Result<()>
}

if envs.is_empty() {
println!("Run with:\n\t`commit-boost start --docker {:?}`", compose_path);
println!("Run with:\n\t`commit-boost-cli start --docker {:?}`", compose_path);
} else {
// write envs to .env file
let envs_str = {
Expand All @@ -490,7 +490,7 @@ pub fn handle_docker_init(config_path: String, output_dir: String) -> Result<()>
println!("Env file written to: {:?}", env_path);

println!(
"Run with:\n\t`commit-boost start --docker {:?} --env {:?}`",
"Run with:\n\t`commit-boost-cli start --docker {:?} --env {:?}`",
compose_path, env_path
);
}
Expand Down
6 changes: 3 additions & 3 deletions docker/pbs.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json

COPY . .
RUN cargo build --release --bin default-pbs
RUN cargo build --release --bin commit-boost-pbs


FROM debian:bookworm-slim AS runtime
Expand All @@ -25,8 +25,8 @@ RUN apt-get update && apt-get install -y \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/target/release/default-pbs /usr/local/bin
ENTRYPOINT ["/usr/local/bin/default-pbs"]
COPY --from=builder /app/target/release/commit-boost-pbs /usr/local/bin
ENTRYPOINT ["/usr/local/bin/commit-boost-pbs"]



6 changes: 3 additions & 3 deletions docker/signer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json

COPY . .
RUN cargo build --release --bin signer-module
RUN cargo build --release --bin commit-boost-signer


FROM debian:bookworm-slim AS runtime
Expand All @@ -25,8 +25,8 @@ RUN apt-get update && apt-get install -y \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/target/release/signer-module /usr/local/bin
ENTRYPOINT ["/usr/local/bin/signer-module"]
COPY --from=builder /app/target/release/commit-boost-signer /usr/local/bin
ENTRYPOINT ["/usr/local/bin/commit-boost-signer"]



12 changes: 6 additions & 6 deletions docs/docs/get_started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ You will need to build the CLI to create the `docker-compose` file:

```bash
# Build the CLI
cargo build --release --bin commit-boost
cargo build --release --bin commit-boost-cli

# Check that it works
./target/release/commit-boost --version
./target/release/commit-boost-cli --version
```

and the modules as Docker images
Expand All @@ -73,10 +73,10 @@ This will create two local images called `commitboost_pbs_default` and `commitbo
Alternatively, you can also build the modules from source and run them without Docker, in which case you can skip the CLI and only compile the modules:

```bash
# Build the PBS module, this corresponds to commit-boost-pbs in the releases
cargo build --release --bin default-pbs
# Build the PBS module
cargo build --release --bin commit-boost-pbs

# Build the Signer module, this corresponds to commit-boost-signer in the releases
cargo build --release --bin signer-module
# Build the Signer module
cargo build --release --bin commit-boost-signer
```

8 changes: 4 additions & 4 deletions docs/docs/get_started/running/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Commit-Boost CLI will generate a dynamic `docker-compose.yml` file using the

First run:
```bash
commit-boost init --config cb-config.toml
commit-boost-cli init --config cb-config.toml
```
This will create up to three files:
- `cb.docker-compose.yml`, which contains the full setup of the Commit-Boost services
Expand All @@ -20,7 +20,7 @@ This will create up to three files:

To start Commit-Boost run:
```bash
commit-boost start --docker cb.docker-compose.yml [--env .cb.env]
commit-boost-cli start --docker cb.docker-compose.yml [--env .cb.env]
```

This will run `docker compose up` with the correct envs, and start up the services including PBS, commit modules (if any), and metrics collection (if enabled).
Expand All @@ -34,14 +34,14 @@ If enabled, this will also start a Prometheus server on port `9090` and a Grafan

To check logs, run:
```bash
commit-boost logs
commit-boost-cli logs
```
This will currently show all logs from the different services via the Docker logs interface. Logs are also optionally saved to file, depending on your `[logs]` configuration.

## Stop

To stop all the services and cleanup, simply run:
```bash
commit-boost stop
commit-boost-cli stop
```
This will wind down all services and clear internal networks and file mounts.