- Use protocol_params.creator_vault for buy/sell when non-default to avoid
ConstraintSeeds (2006) when gRPC/event creator drifts from on-chain bonding curve
- Preserve event creator_vault in PumpFunParams::from_trade/from_dev_trade instead
of always overwriting with PDA(creator)
- Fee recipient: prefer gRPC fee_recipient; else random from CURRENT_FEE_RECIPIENTS
pool (standard) or MAYHEM pool, matching @pump-fun/pump-sdk fees.ts
- Add cold-path helpers: extend_bonding_curve_account_instruction, PUMP_BONDING_CURVE_MIN_DATA_LEN
Made-with: Cursor
- PumpFunParams::from_trade/from_dev_trade: add mayhem_mode Option; infer Mayhem
via is_mayhem_fee_recipient when None (fixes fee recipient / NotAuthorized 6000
when AMM protocol fee pubkey is used).
- Add is_mayhem_fee_recipient and is_amm_fee_recipient helpers in pumpfun utils.
- Bump solana-* crates to 3.1.12; align tonic/prost; use solana-message for
AddressLookupTableAccount; add solana-system-interface 3.0.
- Update examples and latency script for new PumpFunParams signature.
- SWQoS and transaction builder adjustments for dependency changes.
Made-with: Cursor
- Add `mev_protection: bool` to `TradeConfig` and `InfrastructureConfig` (default: false)
- Astralane QUIC: switches to port 9000 (MEV-protected endpoint) when enabled
- BlockRazor HTTP: uses `mode=sandwichMitigation` query param when enabled
- BlockRazor gRPC: uses `mode=sandwichMitigation` when enabled
- Add `SWQOS_ENDPOINTS_ASTRALANE_QUIC_MEV` constants (port 9000) to `constants/swqos.rs`
- Fix `astralane_quic.rs` IP candidates to use the actual port from the address (supports both 7000 and 9000)
- Refactor `TradeConfig` to builder pattern via `TradeConfig::builder()`
- Introduce `TradeConfigBuilder` with all optional fields and clear defaults
- `TradeConfig::new()` kept as a shortcut (calls `builder().build()`) for backward compatibility
- Remove old `with_wsol_ata_config` / `with_check_min_tip` / `with_swqos_cores_from_end` / `with_mev_protection` chain methods
- Update all 16 examples to use `TradeConfig::builder()` with commented-out options so users can discover all available settings at a glance
- Update README.md and README_CN.md code snippets to use builder pattern
🤖 Generated with [Qoder][https://qoder.com]
Changes to src/utils/calc/common.rs:
- Add MAX_SLIPPAGE_BASIS_POINTS constant (9999 = 99.99%)
- Clamp basis_points in calculate_with_slippage_buy to prevent amount doubling
Changes to src/instruction/pumpswap.rs:
- Fix WSOL wrap amount calculation for exact vs non-exact input modes
- Use input_amount for exact mode, sol_amount for non-exact mode
🤖 Generated with [Qoder][https://qoder.com]
- Store gRPC client as Arc<ArcSwap<BlockRazorGrpcClient>> so BlockRazorBackend
can derive Clone (ArcSwap does not implement Clone).
- Cloning the outer Arc gives owned handles for tokio::spawn in start_ping_task,
fixing E0521 (borrowed self escaping to 'static future).
Made-with: Cursor
主要解决问题:
当 wait_tx_confirmed 参数为 false 时,SUBMIT_TIMEOUT_SECS 等待改为2秒,要么全部提交完成返回,要么不等待提交未返回的交易,方便快速创建交易订单。
#Let the SDK print submit_timing data (SwqosType and submission time) and return it to the buy and sell methods.
Main problems solved:
When the wait_tx_confirmed parameter is false, the SUBMIT_TIMEOUT_SECS wait is changed to 2 seconds. Either all submissions are completed and returned, or the unreturned transactions are not waited for submission, which facilitates the rapid creation of transaction orders.
Implement lock-free reconnection mechanism using ArcSwap to maintain high
performance for transaction sending while providing automatic recovery
from connection failures.
Key improvements:
- Add automatic reconnection with exponential backoff (1s -> 60s max)
- Use ArcSwap for lock-free atomic reference swapping
- Zero overhead for send_transaction path: only atomic load operation
- Background health check every 30s triggers reconnection on failure
- Reconnection success resets backoff delay to 1s
This ensures transaction sending remains fast (no lock contention) while
providing automatic recovery from network issues or server restarts.
Inspired by the proven reconnection pattern in sol-parser-sdk.
DataSize(252) filter rejects Token2022 PumpSwap pools which are 643 bytes.
This causes find_by_mint to miss pools that already exist on-chain, leading
to unnecessary 45s+ wait loops during migration detection.
Remove the DataSize filter from find_by_base_mint and find_by_quote_mint —
the Memcmp filter on program-owned accounts is specific enough.
Also add diagnostic logging on find_by_mint failure for debugging.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When using find_by_mint() followed by from_pool_address_by_rpc(), the pool
account is fetched twice via getAccount — once in find_by_mint (which returns
the decoded Pool) and again in from_pool_address_by_rpc.
from_pool_data() accepts a pre-decoded Pool reference and only fetches the
2 token balance RPC calls, saving 1 getAccount per trade.
from_pool_address_by_rpc() now delegates to from_pool_data() internally,
so existing callers are unaffected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prefer IPv4 candidates (including official Astralane direct IPs), bind local QUIC socket by remote address family, and rotate reconnect attempts across candidates for higher reliability under DNS/Cloudflare variance.
Made-with: Cursor
- Add SWQOS_ENDPOINTS_BLOCKRAZOR_GRPC with correct gRPC endpoints
- Add Grpc variant to SwqosTransport enum
- Add get_endpoint_with_transport() method for transport-aware endpoint selection
- Change BlockRazor default: transport=None now uses gRPC (was HTTP)
- Require explicit Some(SwqosTransport::Http) for HTTP fallback
This fixes the issue where BlockRazor was incorrectly using HTTP endpoints
when gRPC was intended. Users can now use gRPC by default or explicitly
specify HTTP transport when needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Major changes:
- Switch BlockRazor default transport from gRPC to HTTP to avoid FRAME_SIZE_ERROR
- gRPC mode still available via explicit SwqosTransport configuration
- Fix ZeroSlot Binary-Tx JSON-RPC 2.0 response parsing
- Properly handle success responses with "result" field
- Properly handle error responses with "error" field containing code and message
- Update version to 4.0.0
- Update README files to reflect new version
Technical details:
- BlockRazor: HTTP mode is now the default (SwqosTransport::Http or None)
- ZeroSlot: Parse JSON-RPC 2.0 format responses instead of plain text
- Proto code: Pre-generated gRPC code for BlockRazor (no protoc required)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add BlockRazorBackend enum to support both gRPC and HTTP transport
- Default to gRPC for better performance, HTTP available via explicit selection
- Update SwqosConfig::BlockRazor to accept optional SwqosTransport parameter
- Implement keep-alive ping task for both gRPC and HTTP backends
- Follow same backend pattern as Astralane (Quic/Http) and Node1 (Quic/Http)
- Manual gRPC client implementation to avoid proto compilation issues
Usage:
- Default: BlockRazorClient::new() uses gRPC
- HTTP: BlockRazorClient::new_http() for HTTP transport
- Config: SwqosConfig::BlockRazor(token, region, url, None) for gRPC
- Config: SwqosConfig::BlockRazor(token, region, url, Some(Http)) for HTTP
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add HTTP keep-alive ping task (30s interval) using free getHealth method
- Switch from JSON-RPC to faster Binary-Tx endpoint (/txb) for transaction submission
- Send raw binary transaction bytes directly to avoid encoding/decoding overhead
- Update response handling for Binary-Tx plain text status codes (200/403/419/500)
- Follow same keep-alive pattern as BlockRazor, Stellium, and Astralane clients
These changes reduce first-submit cold start latency and overall transaction submission time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add TradeConfig::with_swqos_cores_from_end(bool) to use last N CPU cores for SWQOS, reducing contention with main thread and default tokio workers.
- Add recommended_sender_thread_core_indices(swqos_count) to get the same last-N core indices for with_dedicated_sender_threads (recommended combo for lower latency).
- Document core affinity and latency in async_executor and with_dedicated_sender_threads.
Made-with: Cursor
- Rename wait_transaction_confirmed to wait_tx_confirmed (params, lib, docs, examples)
- SDK timing: use [SDK][provider] style with fixed-width labels; add newline before block
- Move print_sdk_timing_block to common::sdk_log; unify SWQOS_LABEL_WIDTH
- SWQOS submitted/failed: aligned [Provider] labels via log_swqos_submitted/submission_failed
- Extract short error message from JSON (message/data) or quoted string; prefix with 'error: '
- Format elapsed as 'X.XXXX ms' or 'X.XXXX µs' (4 decimals, space before unit); use comma before error
- Add SwqosType::as_str() for zero-allocation log labels; only parse JSON when input starts with '{'
Made-with: Cursor
- Bump version to 3.6.4 in Cargo.toml
- Update version references in README.md and README_CN.md
- Add RELEASE_v3.6.4.md with English release notes
- All workspace examples verified to compile (cargo build --workspace)
- Remove RELEASE_v3.6.3.md and docs/ASYNC_EXECUTOR_REVIEW.md
- Minor updates in types, lib, transaction_builder, async_executor, executor, params
Made-with: Cursor
- transaction_pool: add PARALLEL_SENDER_COUNT (18), ensure prefill >= 18 so
multi-channel build never serializes; prefill 64 with max(PREFILL, 18)
- async_executor: document that pool prefill must match sender thread count
- executor: do not sort submit_timings (avoids any extra work); comment that
log order is completion order
- docs: add ASYNC_EXECUTOR_REVIEW.md
- remove RELEASE_NOTES_v3.6.2.md; minor example/types/lib/params updates
Made-with: Cursor
The 32 worker tasks in swqos_worker_loop use yield_now().await when
the queue is empty, which busy-spins across all tokio threads. Replace
with tokio::sync::Notify so workers sleep until jobs are enqueued.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Pump/PumpSwap buy: track_volume OptionBool = Some(true) only when is_cashback_coin, else Some(false)
- PumpSwap sell cashback: use get_user_volume_accumulator_quote_ata(quote_mint) instead of WSOL-only ATA
- Sync idl/pump_amm.json, idl/pump_fees.json from pump-public-docs
Made-with: Cursor
Replace full eager preallocation in the SWQOS serializer with a bounded\nprewarm and lazy growth strategy.\n\n- Prewarm only a small hot set of buffers instead of allocating all\n 10,000 upfront\n- Keep the same max pool capacity and buffer size to preserve the\n original buffer-pool design in steady state\n- Stop zero-filling each buffer during initialization; reserve capacity\n and grow data on demand\n- Return temporary buffers in Base64Encoder::serialize_and_encode to\n avoid pool depletion\n- Add tests for bounded prewarm and lazy allocation/return behavior\n\nWhy:\nThe previous Lazy initialization allocated and touched ~2.44 GiB\n(10,000 x 256 KiB) on first use, which can block the first buy submit\npath and produce a large cold-start latency spike.\n\nValidation:\n- cargo fmt --all\n- cargo check --lib\n- cargo check (SolBot workspace with path dependency)
- Log build_instructions / before_submit once; per-channel submit, confirmed, total (all from grpc_recv_us)
- confirmed = per-channel submit-to-confirm duration; total = batch start-to-confirm when need_confirm
- No logging between execute_parallel and poll_any_transaction_confirmation to reduce latency
- Clone submit_timings only when log_enabled; all logging after result is ready
- Use provider name (Jito, Helius, etc.) in log lines instead of generic SWQOS
- Timing format: .4 ms; simulate (dry-run) label for simulate mode
- execute_parallel returns 4-tuple with submit_timings for per-channel timing
Made-with: Cursor
- Add Helius Sender client (helius.rs) with dual routing and swqos_only mode
- Helius min tip: 0.0002 SOL default, 0.000005 SOL when swqos_only=true
- Add TradeConfig.check_min_tip (default false) to skip min-tip validation for lower latency
- Thread check_min_tip through SwapParams and execute_parallel; only call min_tip_sol when enabled
- Add SWQOS_ENDPOINTS_HELIUS and HELIUS_TIP_ACCOUNTS in constants
- Extend SwqosConfig/SwqosType for Helius; add Helius to get_endpoint and get_swqos_client
- Update trading_client, shared_infrastructure and middleware_system examples
Made-with: Cursor
- Add pumpfun_copy_trading and pumpfun_sniper_trading to workspace members
- Add grpc_recv_us field to all TradeBuyParams/TradeSellParams in examples
- Switch address_lookup and nonce_cache to sol-parser-sdk, use event is_cashback_coin
- Remove invalid rustls call from pumpfun examples for successful build
- All 18 examples pass cargo check --workspace
Made-with: Cursor
- Bump version to 3.5.4; update README and README_CN
- Astralane: irisb binary API (no Base64), POST /irisb with query api-key&method; constants use /irisb endpoints; ping POST getHealth
- BlockRazor: Send Transaction v2 (plain Base64 body, Content-Type text/plain, auth in URI only); ping POST /v2/health; use default_http_client_builder
- SWQOS: all clients use default_http_client_builder (nextblock, temporal, zeroslot, astralane, lightspeed, jito, flashblock); remove unused Duration imports
Made-with: Cursor
In v3.5.0, confirmation was split out of execute_parallel into
poll_transaction_confirmation, but it only polled sig[0]. When
multi-channel submit is used, each channel produces a different
signature and only one lands on-chain. If the landed sig is not
sig[0], the poll times out after 15s and reports failure despite
a successful on-chain transaction.
Add poll_any_transaction_confirmation() that passes all signatures
to get_signature_statuses in a single RPC call per poll, returning
the first one that confirms. The executor now uses this instead of
polling a single signature.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make serialize_transaction_and_encode sync and route through buffer pool
(serialization::serialize_transaction_sync) to cut allocs on hot path
- Build single-submit body with format! instead of json!+to_string() in bloxroute
- Add serialize_transactions_batch_sync; bloxroute batch uses it and format! for entries
- Fix first-submit cold start: immediate first ping, then 30s keepalive interval
- Fix high latency after ~5 min: pool_max_idle_per_host=4, pool_idle_timeout=300s
(BlockRazor, Temporal, Node1, Astralane, Stellium) so submit reuses ping connection
- Ping: 1.5s timeout, consume response body so connection returns to pool
- poll_transaction_confirmation: avoid cloning status.value[0], use ref
- Translate all swqos comments to English
Co-authored-by: Cursor <cursoragent@cursor.com>
- PumpFunParams/BondingCurve: from_trade/from_dev_trade take is_cashback_coin parameter
- pumpfun_copy_trading and pumpfun_sniper_trading use sol-parser-sdk for gRPC, pass e.is_cashback_coin
- address_lookup/nonce_cache call sites updated; README EN/CN Cashback and example notes
Co-authored-by: Cursor <cursoragent@cursor.com>
Previously Soyas returned early on successful send without:
- Any logging
- Polling for transaction confirmation
Now aligned with other SWQOS clients (zeroslot, lightspeed, etc.):
- Proper error handling with reconnect retry
- Always poll for transaction confirmation
- Log confirmation success/failure with elapsed time
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change use_exact_sol_amount from bool to Option<bool>
- Default to true (via unwrap_or) for PumpFun and PumpSwap DEXes
- Option is ignored for other DEXes (Raydium, Bonk, Meteora)
- Update all examples to use None (which defaults to true for applicable DEXes)
- Update README documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>