Anti-Slashing Protection
Ethereum validators can be slashed — permanently penalized and forcibly exited — for signing conflicting messages (double votes or surround votes). EIP-3076 defines a slashing protection interchange format that prevents validators from producing conflicting attestations or blocks, even across signer restarts or migrations.
Containment Chamber implements EIP-3076 slashing protection with pluggable backends. Every signing request is checked against the protection database before the BLS signature is produced. If the request would result in a slashable message, the signer returns HTTP 412 and refuses to sign.
Backend Comparison
Section titled “Backend Comparison”| Backend | Multi-Instance | Slashing Protection | Recommended |
|---|---|---|---|
| PostgreSQL | ✅ | ✅ Full | ✅ Production |
| DynamoDB | ✅ | ✅ Full | ✅ Production |
| SQLite | ❌ | ✅ Full | Dev / single instance |
| Noop | — | ❌ None | ⚠️ Testing only |
Per-Backend Configuration
Section titled “Per-Backend Configuration”PostgreSQL is the recommended backend for production deployments. It supports multiple signer instances sharing the same database and provides full surround vote detection.
antislashing: backend: postgres url: "postgresql://user:password@localhost:5432/slashing?sslmode=require" pool_size: 8 # connection pool size force_ipv4: false # set true if IPv6 causes issuesTLS is enabled by default. Append ?sslmode=disable to the URL to disable it.
SQLite provides complete slashing protection (including surround vote detection) in a single file. Ideal for development or single-instance deployments.
antislashing: backend: sqlite path: ./slashing_protection.sqliteDynamoDB provides multi-instance safety via AWS-native infrastructure. It uses Hybrid mode: high-water marks (slots and epochs can only advance forward) combined with per-slot block records and per-target attestation records that store signing roots. This enables:
- Double-vote detection: signing the same target epoch with a different message is rejected
- Re-broadcast support: re-signing the exact same message (same signing root) is allowed
- Surround vote prevention: algebraically impossible under watermark invariants — no full history scan needed
antislashing: backend: dynamodb table: "slashing-protection" # Uses AWS SDK default credential chain # (env vars, instance profile, IRSA, etc.)- Requires a pre-created DynamoDB table — name specified via
table:config option or--antislashing-dynamodb-tableCLI flag - Watermarks enforce forward-only progression; signing root records enable precise double-vote detection
- Credentials are resolved via the standard AWS SDK credential chain
The Noop backend disables all slashing protection checks. Signing requests are never rejected for slashing reasons.
antislashing: backend: noopEnvironment Variable Override
Section titled “Environment Variable Override”You can configure the anti-slashing backend entirely via environment variables using the CONTAINMENT_ prefix with __ for nesting:
CONTAINMENT_ANTISLASHING__BACKEND=postgresCONTAINMENT_ANTISLASHING__URL="postgresql://user:password@localhost:5432/slashing"CONTAINMENT_ANTISLASHING__POOL_SIZE=8CONTAINMENT_ANTISLASHING__FORCE_IPV4=falseCLI Flags
Section titled “CLI Flags”For quick testing, you can also set the backend via CLI flags:
# SQLite via CLIcontainment-chamber \ --antislashing sqlite \ --antislashing-sqlite-path ./slashing.sqlite \ --filesystem-keystores-path ./keystores/raw
# PostgreSQL via CLIcontainment-chamber \ --antislashing postgres \ --antislashing-postgres-url "postgresql://user:pass@localhost/slashing" \ --filesystem-keystores-path ./keystores/raw