- 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
These incomplete SDK implementations in the Rust repository were outdated
and redundant. The complete versions are maintained in separate repositories:
- sol-trade-sdk-ts (Node.js)
- sol-trade-sdk-python (Python)
🤖 Generated with [Qoder](https://qoder.com)
- 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>
Bump crate/docs version to 4.0.2 and add release notes covering IPv4/IPv6 address-family handling, direct-IP candidate preference, and endpoint failover rotation for more stable low-latency QUIC submission.
Made-with: Cursor
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
## Changes since v4.0.0
### Bug Fixes
- Fixed BlockRazor gRPC endpoints to use correct gRPC service URLs
- Set gRPC as the default transport layer for BlockRazor with HTTP fallback
This release improves the reliability and performance of BlockRazor integration by prioritizing gRPC communication while maintaining HTTP fallback compatibility.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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