Overview
Thesinker.debug object provides access to the fault injection system. Register a fault before enqueueing a transaction to simulate any failure class on demand.
Methods
debug.injectFault()
Register a one-shot synthetic failure to inject into the nextPOST /internal/submit call.
FaultClass
required
The failure class to inject. One of:
'fee_too_low''expired_blockhash''bundle_failed''compute_exceeded''slot_skip'
string
Optional custom error string stored in the lifecycle entry’s
raw_error field.
Defaults to "Injected fault: {failureClass} (demo)".Promise<FaultInjectResult>
boolean
true when the fault was registered successfully.FaultClass
The failure class that was registered (echoed back for confirmation).
debug.runFaultDemo()
Register a fault and enqueue a transaction in one call. Returns the fault registration result and the tx handle.FaultClass
required
The failure class to inject.
string
required
Base64-encoded pre-signed transaction bytes.
Promise<{ faultRegistered: boolean; tx_id: string }>
What the sidecar does on a faulted submit
When a fault is registered andPOST /internal/submit is called:
- The tx queue is drained normally and bytes are retained for retry
- The fault spec is consumed (cleared from
next_fault) - A lifecycle entry is written with
stage: "failed"and the specifiedfailure_class TxStatusChangedSSE events are emitted for eachtx_id- A
BundleSettledSSE event fires withstage: "failed"andfailure_type - HTTP 200 is returned with a structured result — no Jito call is made
GET /tx/raw/:tx_id and re-enqueueing.