Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c0182ec
feat(campaign): add campaign meta-scenarios with stages, reporting an…
scharissis Dec 9, 2025
d74709a
campaign: change tps/tpb to rate
scharissis Dec 16, 2025
a174e91
Merge branch 'main' into feature/campaigns
zeroXbrock Dec 16, 2025
11b69f4
cargo fmt
scharissis Dec 17, 2025
82f5236
feat(campaigns): remove redundant tps/tpb params, codify errors
zeroXbrock Dec 17, 2025
f0f9f5f
parse builtin ref as lowercase
zeroXbrock Dec 17, 2025
fe7bb6d
revise uniV2 params & testToken bytecode to prevent gas estimation fa…
zeroXbrock Dec 17, 2025
ec56aba
rework campaign scenario parsing
zeroXbrock Dec 17, 2025
a16402b
derive setup scenarios from [spam] directives, remove [setup] directive
zeroXbrock Dec 17, 2025
58fe3dc
ensure seeds are unique across stages + mixes
zeroXbrock Dec 17, 2025
dba7810
shift nonce map in TestScenario when "nonce too low/high" error is de…
zeroXbrock Dec 17, 2025
b699def
replace println
zeroXbrock Dec 17, 2025
7be7904
Merge branch 'feature/campaigns' into feat/campaigns-brock-edits
zeroXbrock Dec 17, 2025
133c7ae
Code review fixes for campaigns branch (#393)
scharissis Dec 17, 2025
da9e915
Merge pull request #1 from flashbots/feat/campaigns-brock-edits
scharissis Dec 17, 2025
8d89c8e
update uuid
zeroXbrock Dec 17, 2025
2a429af
install uuid-dev in dockerfile
zeroXbrock Dec 18, 2025
5e7605e
install uuid-dev in CI runners
zeroXbrock Dec 18, 2025
d47643a
remove rm command from CI runners deps install
zeroXbrock Dec 18, 2025
c0fe3c4
update deps installation in CI linter
zeroXbrock Dec 18, 2025
124ba30
revise builtin erc20 fuzz params, cleanup Default impl
zeroXbrock Dec 18, 2025
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
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
with:
cache-on-failure: true
- name: Install deps
run: sudo apt-get install -y fontconfig libfontconfig1-dev libfontconfig
run: |
sudo apt-get update && sudo apt-get install -y libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig uuid-dev
- run: cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
env:
RUSTFLAGS: -D warnings
Expand Down Expand Up @@ -51,6 +52,7 @@ jobs:
with:
cache-on-failure: true
- name: Install deps
run: sudo apt-get install -y fontconfig libfontconfig1-dev libfontconfig
run: |
sudo apt-get update && sudo apt-get install -y libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig uuid-dev
- uses: taiki-e/install-action@cargo-udeps
- run: cargo udeps --workspace --lib --examples --tests --benches --all-features --locked
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
cache-on-failure: true
- name: Install deps
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig uuid-dev
- name: Build
run: cargo build --verbose --workspace

Expand All @@ -50,6 +50,6 @@ jobs:
with:
cache-on-failure: true
- name: Install deps
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig uuid-dev
- name: Run tests
run: cargo test --verbose --workspace
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ Features:
- scenarios: add groth16Verify scenario to test onchain proof verification ([#379](https://github.com/flashbots/contender/pull/379))
- spammer: support batching json-rpc eth_sendRawTransaction reqs ([#381](https://github.com/flashbots/contender/pull/381))
- minor UX improvements ([#382](https://github.com/flashbots/contender/pull/382))
- campaign meta-scenarios: new `contender campaign` command and campaign TOML schema for staged parallel mixes

Internal changes:

- revamp error handling ([#378](https://github.com/flashbots/contender/pull/378))
- revamp error handling ([#378](https://github.com/flashbots/contender/pull/378))
- DB schema bumped to `user_version = 6` to record campaign/stage metadata in runs.
- If you see a DB version mismatch, export/reset your DB: `contender db export` (optional backup) then `contender db reset` (or `drop`) to recreate with the new schema.
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ clap = { version = "4.5.16" }
csv = "1.3.0"
miette = { version = "7.6.0" }
url = "2.5.7"
uuid = "1.19.0"

## core
futures = "0.3.30"
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ FROM rust:slim AS builder

# Install build dependencies
RUN apt-get update && \
apt-get install -y make curl git libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig libssl-dev libclang-dev
apt-get install -y make curl git libsqlite3-dev fontconfig libfontconfig1-dev libfontconfig libssl-dev libclang-dev uuid-dev && \
rm -rf /var/lib/apt/lists/*

# Copy in project files
COPY . /app
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ It supports both **per-second** (TPS) and **per-block** (TPB) timing, seeded fuz
- [Engine API Spamming](docs/engine-api.md)
- [Reports, Database, and Admin Tools](docs/reports-db-admin.md)
- [Using Contender as a Library](docs/library-usage.md)
- [Composite Campaigns](docs/campaigns.md)

### 5. Internals
- [Architecture](docs/architecture.md)
19 changes: 19 additions & 0 deletions campaigns/composite.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = "devnet-steady"
description = "Steady devnet load with a mix of erc20, uni_v2 and stress"

[spam]
mode = "tps"
rate = 100
duration = 60

[[spam.mix]]
scenario = "builtin:erc20"
share_pct = 40.0

[[spam.mix]]
scenario = "builtin:uni_v2"
share_pct = 40.0

[[spam.mix]]
scenario = "builtin:stress"
share_pct = 20.0
41 changes: 41 additions & 0 deletions campaigns/staged-example.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name = "staged-example"
description = "Warmup then steady-state blend across two stages"

[spam]
mode = "tps"
rate = 150 # default rate if a stage omits one
duration = 60 # default duration per stage (seconds)
seed = 1337

[[spam.stage]]
name = "warmup"
rate = 100
# duration = 60
[[spam.stage.mix]]
scenario = "builtin:erc20"
share_pct = 90.0
[[spam.stage.mix]]
scenario = "scenarios/groth16Verify.toml"
share_pct = 10.0

[[spam.stage]]
name = "steady"
rate = 500
duration = 120
[[spam.stage.mix]]
scenario = "builtin:erc20"
share_pct = 10.0
[[spam.stage.mix]]
scenario = "scenarios/groth16Verify.toml"
share_pct = 90.0

[[spam.stage]]
name = "cooldown"
rate = 20
# duration = 60
[[spam.stage.mix]]
scenario = "builtin:erc20"
share_pct = 90.0
[[spam.stage.mix]]
scenario = "scenarios/groth16Verify.toml"
share_pct = 10.0
1 change: 1 addition & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ regex = { workspace = true }
thiserror = { workspace = true }
miette = { workspace = true, features = ["fancy"] }
url = { workspace = true }
uuid = { workspace = true }

[dev-dependencies]
tempfile = "3.15.0"
Expand Down
Loading