Transaction confirmation and lifecycle tracking
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
Research direction
Start by reading celestia-app's pkg/user/tx_client.go, especially ConfirmTx() and its eviction handling, then inspect the CometBFT TxStatus endpoint. Implement the specified TxTracker lifecycle, including polling, resubmission, structured failures, and pending hashes. Done means confirmation, rejection, eviction, and timeout behavior are represented by TxResult and Pending().
Written by the indexing model from the issue text.
Description
Summary
Implement transaction lifecycle tracking from broadcast through confirmation or rejection.
Parent: #4
Flow
Broadcast (SYNC) → Mempool → Included in Block → Committed
│ │
▼ ▼
Evicted Rejected (execution error)
Requirements
Broadcast
- Use
BroadcastTxSync(returns after mempool acceptance, not block inclusion) - Capture tx hash from response
- Handle immediate rejection (invalid tx, mempool full)
Confirmation polling
- Poll
TxStatusat configurable interval (default: 1s) - Timeout after configurable duration (default: 2 minutes)
- Return confirmed height and gas used on success
Eviction handling
- If tx is evicted from mempool, optionally resubmit with same or bumped gas price
- Max resubmission attempts: configurable (default: 1)
- Log eviction events for debugging
Rejection handling
- If tx is included but execution fails, capture error code, codespace, gas wanted/used
- Reset nonce to enable subsequent transactions (#8)
- Return structured error with all context
Timeout handling
- If confirmation times out, return error but do NOT assume tx failed (it may still confirm)
- Track "unconfirmed" transactions for later reconciliation
Interface
type TxResult struct {
TxHash string
Height int64
GasUsed int64
Code uint32 // 0 = success
Error string // non-empty if Code != 0
Duration time.Duration // broadcast to confirmation
}
type TxTracker interface {
Submit(ctx context.Context, txBytes []byte) (*TxResult, error)
Pending() []string // tx hashes still awaiting confirmation
}
References
- celestia-app
pkg/user/tx_client.go—ConfirmTx(), eviction handling - CometBFT
TxStatusendpoint
- 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
-
bug carvel-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
carvel-dev/kapp-controller#1861 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100