Rundler is a Rust workspace.
bin/rundler/: CLI binary entrypoint and chain spec configs (bin/rundler/chain_specs/*.toml).crates/*: core libraries (for examplerundler-pool,rundler-rpc,rundler-sim,rundler-builder).test/spec-tests/: ERC-4337 compliance test harnesses (local/integrated mode,remote/modular mode, plus versioned suites underv0_6/,v0_7/,v0_8/).docs/: architecture, CLI, Docker, and development documentation..github/workflows/: CI checks (lint, unit tests, commit/PR semantics, docs, dependency ordering).
make build: build all crates with all features.make test-unit: run unit tests viacargo nextest.make test: run unit + integrated spec + modular spec tests.make test-spec-integrated/make test-spec-modular: run ERC-4337 spec suites only.make fmt: format Rust code with nightlyrustfmt.make lint: runclippywith-D warnings.cargo run node: run a local integrated node (after.envsetup).
- Rust toolchain targets edition
2024(workspacerust-versionis1.92). - Formatting is required:
cargo +nightly fmt --all --check. - Lint must be clean:
cargo clippy --all --all-features --tests -- -D warnings. - Follow Rust naming defaults: modules/files
snake_case, types/traitsUpperCamelCase, constantsSCREAMING_SNAKE_CASE. - Keep crate names in the established
rundler-*pattern. - Use the
{variable}shorthand syntax in format strings, logs, and error messages (e.g.format!("transaction {tx_hash} missing")instead offormat!("transaction {} missing", tx_hash)). - Always import types rather than using inline paths (e.g.
use crate::eth::events::EventProviderError;thenEventProviderError, notcrate::eth::events::EventProviderErrorinline). Useasrenames to resolve conflicts. - Always qualify function calls with their module or type (e.g.
EthRpcError::from(...),Vec::new()), but do not qualify types/structs/enums unless needed to resolve ambiguity.
- Add or update tests for every behavior change (
#[test]/#[tokio::test]near the changed module is common here). - Run at least
make test-unitbefore opening a PR; run spec tests for EntryPoint- or RPC-flow changes. - CI collects coverage with
cargo llvm-cov nextest; no fixed threshold is enforced, but coverage regressions should be justified.
- Commits must follow Conventional Commits (for example
fix(rpc): return error on invalid entrypoint). - PR titles are semantically validated in CI; use Conventional Commit style there too.
- Use focused commits, squash checkpoint commits, and include tests with code changes.
- Fill the PR template: link issue (
[Closes/Fixes] #...) and list concrete proposed changes. - If a change affects API/CLI behavior or architecture, update relevant docs in the same PR (typically
docs/cli.md,docs/architecture/*, and README sections as needed).
- Do not commit secrets; keep local values in
.env. - For security disclosures, follow
SECURITY.mdinstead of opening a public issue.