Rate limiting and circuit breaker for transaction submission
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- backend, distributed-systems
Research direction
Start by locating the transaction submission entry point and reviewing parent issue #4 plus related issues #5 and #7; this issue names no files or tests. Done means configurable global concurrency limiting, backoff, circuit-breaker state transitions, and the three specified metrics behave as described, including the TOML defaults and immediate open-circuit errors.
Written by the indexing model from the issue text.
Description
Summary
Add backpressure mechanisms to the transaction submission path to handle DA layer degradation gracefully.
Parent: #4
Context
celestia-node has zero rate limiting or backpressure on submission — just a mutex serializing broadcasts. Under load or during network issues, this leads to unbounded retries and resource exhaustion.
Requirements
Concurrency limiter
- Semaphore bounding max in-flight transactions (configurable, default: 4)
- Callers block when limit is reached
- Works with multi-account (#5): limit is global across all accounts
Exponential backoff
- On repeated submission failures, increase delay between attempts
- Base: 1s, max: 30s, jitter: +/- 25%
- Reset backoff on successful submission
Circuit breaker
- Track failure rate over a sliding window (e.g., last 20 submissions)
- States: closed (normal) → open (failing, reject immediately) → half-open (probe)
- Open threshold: >50% failure rate over window
- Half-open: allow 1 submission, if success → closed, if fail → open
- When open: return immediate error with "circuit open" context, don't waste gas
Metrics (#7)
apex_submission_inflight(gauge)apex_submission_circuit_state(gauge — 0=closed, 1=half-open, 2=open)apex_submission_backoff_seconds(gauge)
[submission.rate_limit]
max_inflight = 4
backoff_base = "1s"
backoff_max = "30s"
circuit_window = 20
circuit_open_threshold = 0.5
References
- Sony's gobreaker or similar for circuit breaker pattern
- Dominant language
- Go
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from evstack/apex
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
googleapis/librarian#7670 · 2 comments ·