Expand description
Transaction broadcaster for dYdX v4 protocol.
This module handles gRPC transmission of transactions with automatic retry
on sequence mismatch errors. It works in conjunction with TransactionManager
to provide reliable transaction delivery.
§Retry Logic
Uses the battle-tested [RetryManager] from nautilus-network with exponential
backoff. When a transaction fails with “account sequence mismatch” (Cosmos SDK
error code 32), the broadcaster:
- Resyncs the sequence counter from chain
- Rebuilds the transaction with the new sequence
- Applies exponential backoff (500ms → 1s → 2s → 4s)
- Retries up to 5 times
This handles the case where multiple transactions are submitted in parallel and one succeeds before the other, invalidating the sequence.
Structs§
- TxBroadcaster
- Transaction broadcaster responsible for gRPC transmission with retry logic.
Constants§
- MAX_
SEQUENCE_ RETRIES - Maximum retries for sequence mismatch errors.
Functions§
- create_
tx_ retry_ manager - Creates a retry manager configured for blockchain transaction broadcasting.