Expand description
This module contains all the constant values used in the system
Re-exports§
pub use transactions::*;
Modules§
- transactions
- Transaction-related constants
Structs§
Constants§
- ARBITRUM_
BASED_ TAG - ARBITRUM_
GAS_ LIMIT - ARBITRUM_
TIME_ TO_ RESUBMIT - Time to resubmit for Arbitrum networks
- AUTHORIZATION_
HEADER_ NAME - AUTHORIZATION_
HEADER_ VALUE_ PREFIX - COMPLEX_
GAS_ LIMIT - CONCURRENT_
TASKS_ HEADROOM_ MULTIPLIER - Headroom multiplier for calculating concurrent tasks per worker. Applied to base task calculation to provide buffer for:
- DEFAULT_
CLIENT_ DISCONNECT_ TIMEOUT_ SECONDS - Default client disconnect timeout in seconds. This is the time the server waits for cleanup after a client disconnects.
- DEFAULT_
CONCURRENCY - DEFAULT_
CONCURRENCY_ STATUS_ CHECKER - DEFAULT_
CONCURRENCY_ STATUS_ CHECKER_ EVM - DEFAULT_
CONVERSION_ SLIPPAGE_ PERCENTAGE - DEFAULT_
EVM_ EIP1559_ ENABLED - Default EIP-1559 pricing enabled
- DEFAULT_
EVM_ GAS_ LIMIT_ ESTIMATION - Default gas limit estimation enabled
- DEFAULT_
EVM_ GAS_ PRICE_ CAP - Default gas price cap: 100 gwei in wei
- DEFAULT_
EVM_ MIN_ BALANCE - DEFAULT_
GAS_ LIMIT - DEFAULT_
HTTP_ CLIENT_ CONNECT_ TIMEOUT_ SECONDS - Default HTTP client connection timeout in seconds. Maximum time to wait for establishing a connection.
- DEFAULT_
HTTP_ CLIENT_ HTTP2_ KEEP_ ALIVE_ INTERVAL_ SECONDS - Default HTTP/2 keep-alive interval in seconds.
- DEFAULT_
HTTP_ CLIENT_ HTTP2_ KEEP_ ALIVE_ TIMEOUT_ SECONDS - Default HTTP/2 keep-alive timeout in seconds.
- DEFAULT_
HTTP_ CLIENT_ POOL_ IDLE_ TIMEOUT_ SECONDS - Default HTTP client pool idle timeout in seconds. Time after which idle connections are closed.
- DEFAULT_
HTTP_ CLIENT_ POOL_ MAX_ IDLE_ PER_ HOST - Default maximum number of idle connections per host in the connection pool.
- DEFAULT_
HTTP_ CLIENT_ TCP_ KEEPALIVE_ SECONDS - Default TCP keepalive interval in seconds.
- DEFAULT_
HTTP_ CLIENT_ TIMEOUT_ SECONDS - Default HTTP client timeout in seconds for CDP service. Overall timeout for HTTP requests in CDP service.
- DEFAULT_
LOG_ DIR - Default log directory for file logging
- DEFAULT_
LOG_ FORMAT - Default log format when not specified
- DEFAULT_
LOG_ LEVEL - Default log level when not specified
- DEFAULT_
LOG_ MODE - Default log mode when not specified
- DEFAULT_
MAX_ LOG_ FILE_ SIZE - Default maximum log file size in bytes (1GB)
- DEFAULT_
PLUGIN_ TIMEOUT_ SECONDS - Default plugin execution timeout in seconds.
Override in config.json per-plugin:
"timeout": 60 - DEFAULT_
POOL_ CONCURRENT_ TASKS_ PER_ WORKER - Concurrent tasks per worker thread in Node.js pool. Internal constant, not user-configurable.
- DEFAULT_
POOL_ CONNECT_ RETRIES - Retry attempts when connecting to pool server. Env: PLUGIN_POOL_CONNECT_RETRIES Increase for high concurrency scenarios.
- DEFAULT_
POOL_ EXECUTION_ TIMEOUT_ MS - Plugin execution timeout within the pool (milliseconds).
Internal constant - use per-plugin
timeoutin config.json instead. - DEFAULT_
POOL_ HEALTH_ CHECK_ INTERVAL_ SECS - Minimum seconds between health checks. Env: PLUGIN_POOL_HEALTH_CHECK_INTERVAL_SECS Prevents health check storms under high load.
- DEFAULT_
POOL_ IDLE_ TIMEOUT_ MS - Worker idle timeout in milliseconds. Internal constant, not user-configurable.
- DEFAULT_
POOL_ MAX_ CONNECTIONS - Maximum concurrent connections from Rust to the Node.js pool server. Env: PLUGIN_POOL_MAX_CONNECTIONS Increase for high concurrency (3000+ VUs).
- DEFAULT_
POOL_ MAX_ QUEUE_ SIZE - Maximum queued requests before rejection. Env: PLUGIN_POOL_MAX_QUEUE_SIZE Increase for high concurrency (3000+ VUs).
- DEFAULT_
POOL_ MAX_ THREADS_ FLOOR - Maximum worker threads floor (minimum threads even on small machines). Internal constant, not user-configurable.
- DEFAULT_
POOL_ MIN_ THREADS - Minimum worker threads in Node.js pool (floor). Internal constant, not user-configurable.
- DEFAULT_
POOL_ QUEUE_ SEND_ TIMEOUT_ MS - Wait time (ms) when queue is full before rejecting. Env: PLUGIN_POOL_QUEUE_SEND_TIMEOUT_MS Increase for bursty traffic patterns.
- DEFAULT_
POOL_ REQUEST_ TIMEOUT_ SECS - Timeout for individual pool requests (seconds). Env: PLUGIN_POOL_REQUEST_TIMEOUT_SECS
- DEFAULT_
POOL_ SOCKET_ BACKLOG - Socket connection backlog for the pool server. Env: PLUGIN_POOL_SOCKET_BACKLOG (internal, rarely needs tuning)
- DEFAULT_
PROVIDER_ FAILURE_ EXPIRATION_ SECS - Duration in seconds after which failures are considered stale and reset. This allows providers to naturally recover over time even without explicit success calls.
- DEFAULT_
PROVIDER_ FAILURE_ THRESHOLD - DEFAULT_
PROVIDER_ PAUSE_ DURATION_ SECS - DEFAULT_
RPC_ WEIGHT - DEFAULT_
SOCKET_ IDLE_ TIMEOUT_ SECS - Idle timeout for plugin connections (seconds). Env: PLUGIN_SOCKET_IDLE_TIMEOUT_SECS Connections idle longer than this are closed.
- DEFAULT_
SOCKET_ MAX_ CONCURRENT_ CONNECTIONS - Maximum concurrent plugin connections to the relayer. Env: PLUGIN_SOCKET_MAX_CONCURRENT_CONNECTIONS Should be >= PLUGIN_POOL_MAX_CONNECTIONS.
- DEFAULT_
SOCKET_ READ_ TIMEOUT_ SECS - Read timeout per line from plugins (seconds). Env: PLUGIN_SOCKET_READ_TIMEOUT_SECS Time to wait for a complete message from a plugin.
- DEFAULT_
SOLANA_ MAX_ TX_ DATA_ SIZE - Default maximum transaction data size for Solana
- DEFAULT_
SOLANA_ MIN_ BALANCE - DEFAULT_
STELLAR_ CONCURRENT_ TRANSACTIONS - Default concurrent transactions enabled setting for Stellar
- DEFAULT_
STELLAR_ MIN_ BALANCE - DEFAULT_
TRACE_ TIMEOUT_ MS - Trace collection timeout (milliseconds). Env: PLUGIN_TRACE_TIMEOUT_MS Short timeout since traces arrive immediately after plugin execution.
- DEFAULT_
TRANSACTION_ SPEED - DEFAULT_
TX_ VALID_ TIMESPAN - DOCKER_
LOG_ DIR - Default log directory when running in Docker
- ERC20_
TRANSFER_ GAS_ LIMIT - ERC721_
TRANSFER_ GAS_ LIMIT - EVM_
MAX_ CONSECUTIVE_ STATUS_ FAILURES - Maximum consecutive status check failures before forcing finalization for EVM networks.
- EVM_
MAX_ TOTAL_ STATUS_ FAILURES - Maximum total status check failures before forcing finalization for EVM networks.
- EVM_
MIN_ AGE_ FOR_ HASH_ RECOVERY_ MINUTES - Minimum age before attempting hash recovery for transactions (in minutes)
- EVM_
MIN_ AGE_ FOR_ RESUBMIT_ SECONDS - Minimum age of transaction before allowing resubmission and timeout checks (in seconds) Transactions younger than this will still get status updates from blockchain, but resubmission logic and timeout checks are deferred to prevent premature actions.
- EVM_
MIN_ HASHES_ FOR_ RECOVERY - Minimum number of hashes required before attempting hash recovery
- EVM_
PENDING_ RECOVERY_ TRIGGER_ SECONDS - Trigger recovery for stuck Pending transactions (in seconds)
- EVM_
PREPARE_ TIMEOUT_ MINUTES - Timeout for preparation phase: Pending → Sent (in minutes) Increased from 1 to 2 minutes to provide wider recovery window
- EVM_
RESEND_ TIMEOUT_ SECONDS - Timeout for resend phase: Sent → Submitted (in seconds)
- EVM_
SMALLEST_ UNIT_ NAME - EVM_
STATUS_ CHECK_ INITIAL_ DELAY_ SECONDS - Initial delay before first status check (in seconds)
- EVM_
SUBMIT_ TIMEOUT_ MINUTES - Timeout for submission phase: Sent → Submitted (in minutes)
- GAS_
LIMIT_ BUFFER_ MULTIPLIER - Gas limit buffer multiplier for automatic gas limit estimation, 10% increase
- GAS_
PRICE_ CACHE_ REFRESH_ TIMEOUT_ SECS - Gas price cache refresh timeout in seconds (5 minutes) Used to cleanup stuck refresh operations that may have failed to complete
- GAS_
TX_ CREATE_ CONTRACT - GAS_
TX_ DATA_ NONZERO - GAS_
TX_ DATA_ ZERO - HISTORICAL_
BLOCKS - Number of historical blocks to fetch for fee history analysis
- JUPITER_
BASE_ API_ URL - LACKS_
MEMPOOL_ TAGS - LOG_
FILE_ NAME - Log file name
- MAXIMUM_
NOOP_ RETRY_ ATTEMPTS - MAXIMUM_
SOLANA_ TX_ ATTEMPTS - Maximum number of transaction resubmission attempts before marking as Failed Each attempt creates a new signature (when blockhash expires and tx is resubmitted) Similar to EVM’s MAXIMUM_TX_ATTEMPTS but tailored for Solana’s resubmission behavior
- MAXIMUM_
TX_ ATTEMPTS - MAX_
CONCURRENT_ TASKS_ PER_ WORKER - Maximum concurrent tasks per worker thread (hard cap). This cap prevents excessive memory usage and GC pressure per worker. Validated through load testing as a stable upper bound. Internal constant, not user-configurable.
- MAX_
SOLANA_ TX_ DATA_ SIZE - MINIMUM_
SECRET_ VALUE_ LENGTH - MIN_
BUMP_ FACTOR - Minimum gas price bump factor for transaction replacements (10% increase)
- NATIVE_
SOL - NO_
MEMPOOL_ TAG - Network tag constants for EVM networks
- OPTIMISM_
BASED_ TAG - OPTIMISM_
GAS_ PRICE_ ORACLE_ ADDRESS - OPTIMISM_
TAG - @deprecated Use OPTIMISM_BASED_TAG instead. Will be removed in a future version.
- POLYGON_
ZKEVM_ TAG - PUBLIC_
ENDPOINTS - REQUEST_
MAX_ ACCOUNTS_ PER_ INSTRUCTION - Maximum number of accounts allowed per instruction in a request
- REQUEST_
MAX_ INSTRUCTIONS - Maximum number of instructions allowed in a transaction request
- REQUEST_
MAX_ INSTRUCTION_ DATA_ SIZE - Maximum instruction data size in bytes allowed in a request
- REQUEST_
MAX_ TOTAL_ ACCOUNTS - Maximum total unique accounts allowed in a transaction request
- RETRY_
JITTER_ PERCENT - The percentage (0.0 to 1.0) for jitter in retry delays
- ROLLUP_
TAG - SOLANA_
DECIMALS - SOLANA_
DEFAULT_ TX_ VALID_ TIMESPAN - Default transaction valid timespan for Solana when no explicit valid_until is provided (in milliseconds) Set to 30 minutes to balance between:
- SOLANA_
MAX_ CONSECUTIVE_ STATUS_ FAILURES - Maximum consecutive status check failures before forcing finalization for Solana.
- SOLANA_
MAX_ TOTAL_ STATUS_ FAILURES - Maximum total status check failures before forcing finalization for Solana.
- SOLANA_
MIN_ AGE_ FOR_ RESUBMIT_ CHECK_ SECONDS - Minimum age before checking for resubmit/expiration (in seconds) If transaction is younger than this, we don’t check blockhash expiration yet
- SOLANA_
PENDING_ RECOVERY_ TRIGGER_ SECONDS - Minimum age before triggering Pending status recovery (in seconds) Only schedule a recovery job if Pending transaction exceeds this age
- SOLANA_
PENDING_ TIMEOUT_ MINUTES - Timeout for Pending status: transaction preparation phase (in minutes) If a transaction stays in Pending for longer than this, mark as Failed
- SOLANA_
SENT_ TIMEOUT_ MINUTES - Timeout for Sent status: waiting for submission (in minutes) If a transaction stays in Sent for longer than this, mark as Failed
- SOLANA_
SMALLEST_ UNIT_ NAME - SOLANA_
STATUS_ CHECK_ INITIAL_ DELAY_ SECONDS - Initial delay before first status check (in seconds)
- STELLAR_
DEFAULT_ MAX_ FEE - Default maximum fee for fee-bump transactions (0.1 XLM = 1,000,000 stroops)
- STELLAR_
DEFAULT_ TRANSACTION_ FEE - STELLAR_
FEE_ FORWARDER_ MAINNET - FeeForwarder contract address on Stellar mainnet Set to empty string until mainnet deployment is available
- STELLAR_
HORIZON_ MAINNET_ URL - Horizon API base URL for Stellar mainnet
- STELLAR_
HORIZON_ TESTNET_ URL - Horizon API base URL for Stellar testnet
- STELLAR_
LEDGER_ TIME_ SECONDS - Approximate Stellar ledger close time in seconds (used for ledger-based expiration)
- STELLAR_
MAX_ CONSECUTIVE_ STATUS_ FAILURES - Maximum consecutive status check failures before forcing finalization for Stellar.
- STELLAR_
MAX_ OPERATIONS - Maximum number of operations allowed in a Stellar transaction
- STELLAR_
MAX_ STUCK_ TRANSACTION_ LIFETIME_ MINUTES - Maximum lifetime for stuck transactions (Sent, Pending, Submitted) before marking as Failed (15 minutes) Safety net for transactions without time bounds - prevents infinite retries.
- STELLAR_
MAX_ TOTAL_ STATUS_ FAILURES - Maximum total status check failures before forcing finalization for Stellar.
- STELLAR_
PENDING_ RECOVERY_ TRIGGER_ SECONDS - Minimum age before triggering Pending status recovery (in seconds) Only schedule a recovery job if Pending transaction without hash exceeds this age This prevents scheduling a job on every status check
- STELLAR_
RESEND_ TIMEOUT_ SECONDS - Minimum time before re-queuing submit job for stuck Sent transactions (30 seconds) Gives the original submit job time to complete before attempting recovery.
- STELLAR_
RESUBMIT_ BASE_ INTERVAL_ SECONDS - Base interval (seconds) for resubmitting a Submitted transaction. Stellar Core retries internally for ~3 ledgers (~15s). We start resubmitting at 10s to ensure the transaction is back in the mempool before Core’s window closes.
- STELLAR_
RESUBMIT_ MAX_ INTERVAL_ SECONDS - Maximum resubmit interval (seconds) to cap exponential backoff. Prevents excessively long gaps between resubmissions.
- STELLAR_
SMALLEST_ UNIT_ NAME - STELLAR_
SOROSWAP_ MAINNET_ FACTORY - Soroswap factory contract address on Stellar mainnet
- STELLAR_
SOROSWAP_ MAINNET_ NATIVE_ WRAPPER - Native XLM wrapper token contract address on Stellar mainnet This is the Soroban token contract that wraps native XLM for use in Soroswap
- STELLAR_
SOROSWAP_ MAINNET_ ROUTER - Soroswap router contract address on Stellar mainnet
- STELLAR_
SPONSORED_ TRANSACTION_ VALIDITY_ MINUTES - Default transaction validity duration (in minutes) for sponsored transactions Provides reasonable time for users to review and submit while ensuring transaction doesn’t expire too quickly
- STELLAR_
SPONSORED_ TRANSACTION_ VALIDITY_ SECONDS - Sponsored transaction validity in seconds (2 minutes). Used for gas abstraction authorization validity so it aligns with the transaction submission window.
- STELLAR_
STATUS_ CHECK_ INITIAL_ DELAY_ SECONDS - Initial delay before first status check (in seconds) Set to 2s for faster detection of transaction state changes
- SYSTEM_
CLEANUP_ CRON_ SCHEDULE - Cron expression for system cleanup: runs every 15 minutes
- SYSTEM_
CLEANUP_ LOCK_ TTL_ SECS - TTL for the system cleanup distributed lock (14 minutes).
- SYSTEM_
PROGRAM_ ID - TOKEN_
SWAP_ CRON_ LOCK_ TTL_ SECS - Fallback TTL for token-swap cron distributed locks (4 minutes).
- TRANSACTION_
CLEANUP_ CRON_ SCHEDULE - Cron expression for transaction cleanup: runs every 10 minutes
- TRANSACTION_
CLEANUP_ LOCK_ TTL_ SECS - TTL for the transaction cleanup distributed lock (9 minutes).
- WORKER_
DEFAULT_ MAXIMUM_ RETRIES - WORKER_
NOTIFICATION_ SENDER_ RETRIES - WORKER_
RELAYER_ HEALTH_ CHECK_ RETRIES - WORKER_
SYSTEM_ CLEANUP_ RETRIES - WORKER_
TOKEN_ SWAP_ REQUEST_ RETRIES - WORKER_
TRANSACTION_ CANCEL_ RETRIES - WORKER_
TRANSACTION_ CLEANUP_ RETRIES - WORKER_
TRANSACTION_ REQUEST_ RETRIES - WORKER_
TRANSACTION_ RESEND_ RETRIES - WORKER_
TRANSACTION_ RESUBMIT_ RETRIES - WORKER_
TRANSACTION_ STATUS_ CHECKER_ RETRIES - WORKER_
TRANSACTION_ SUBMIT_ RETRIES - WRAPPED_
SOL_ MINT - ZERO_
ADDRESS
Functions§
- get_
evm_ min_ age_ for_ hash_ recovery - Get minimum age for hash recovery duration
- get_
evm_ pending_ recovery_ trigger_ timeout - Get pending recovery trigger duration
- get_
evm_ prepare_ timeout - Get preparation timeout duration
- get_
evm_ resend_ timeout - Get resend timeout duration
- get_
evm_ status_ check_ initial_ delay - Get status check initial delay duration
- get_
evm_ submit_ timeout - Get submission timeout duration
- get_
max_ consecutive_ status_ failures - Returns the maximum consecutive status check failures allowed for a given network type.
- get_
max_ total_ status_ failures - Returns the maximum total status check failures allowed for a given network type.
- get_
solana_ status_ check_ initial_ delay - Get status check initial delay duration
- get_
stellar_ max_ stuck_ transaction_ lifetime - Get max lifetime duration for stuck transactions (Sent, Pending, Submitted)
- get_
stellar_ resend_ timeout - Get resend timeout duration for stuck Sent transactions
- get_
stellar_ resubmit_ base_ interval - Get base resubmit interval for Submitted transactions
- get_
stellar_ resubmit_ max_ interval - Get maximum resubmit interval (backoff cap) for Submitted transactions
- get_
stellar_ sponsored_ transaction_ validity_ duration - Get sponsored transaction validity duration
- get_
stellar_ status_ check_ initial_ delay - Get status check initial delay duration