Compare commits

..

3 Commits

Author SHA1 Message Date
Wood 2e39649ebc chore: release v3.6.1
Made-with: Cursor
2026-03-10 01:44:03 +08:00
Wood 0201d3443a chore: remove obsolete release notes (v3.4.1, v3.5.0)
Made-with: Cursor
2026-03-10 01:42:43 +08:00
Wood 9872b1b4a7 feat(swqos): Astralane QUIC region-based endpoints and endpoint selection
- Add SWQOS_ENDPOINTS_ASTRALANE_QUIC array (8 regions: ny, fr, ams, lim, sg, ams, la, lim)
- Select QUIC endpoint by region and optional custom URL in get_swqos_client (was hardcoded)
- Use primary endpoints only; avoid ams2/fr2 for lower latency
- Align with Astralane QUIC docs (port 7000, gateway.astralane.io)

Made-with: Cursor
2026-03-10 01:40:25 +08:00
6 changed files with 19 additions and 84 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "sol-trade-sdk"
version = "3.6.0"
version = "3.6.1"
edition = "2021"
authors = [
"William <byteblock6@gmail.com>",
+2 -2
View File
@@ -90,14 +90,14 @@ Add the dependency to your `Cargo.toml`:
```toml
# Add to your Cargo.toml
sol-trade-sdk = { path = "./sol-trade-sdk", version = "3.6.0" }
sol-trade-sdk = { path = "./sol-trade-sdk", version = "3.6.1" }
```
### Use crates.io
```toml
# Add to your Cargo.toml
sol-trade-sdk = "3.6.0"
sol-trade-sdk = "3.6.1"
```
## 🛠️ Usage Examples
-40
View File
@@ -1,40 +0,0 @@
# sol-trade-sdk v3.4.1
Rust SDK for Solana DEX trading (Pump.fun, PumpSwap, Raydium, Bonk, Meteora, etc.).
## What's Changed
### New Features
- **PumpFun & PumpSwap Cashback** (#77): Support for cashback in PumpFun and PumpSwap trading flows. See [Cashback documentation](docs/PUMP_CASHBACK_README.md).
- **Events**: `is_cashback_coin` is now passed from events; PumpFun examples use `sol-parser-sdk` only for event parsing.
### Performance
- **SWQoS**: Reduced submit latency; fixed high latency after ~5 minutes idle.
### Bug Fixes
- **WSOL ATA**: WSOL Associated Token Account creation now runs in background with retry and timeout for more reliable setup.
- Silenced unused and deprecated compiler warnings.
### Documentation
- README (EN/中文): Added Cashback section, outline, examples and tables.
- Updated crates.io / docs references in README.
---
## Cargo
**From Git (this release):**
```toml
sol-trade-sdk = { git = "https://github.com/0xfnzero/sol-trade-sdk", tag = "v3.4.1" }
```
**From crates.io** (when published):
```toml
sol-trade-sdk = "3.4.1"
```
**Full Changelog**: https://github.com/0xfnzero/sol-trade-sdk/compare/v3.4.0...v3.4.1
-37
View File
@@ -1,37 +0,0 @@
# sol-trade-sdk v3.5.0
Rust SDK for Solana DEX trading (Pump.fun, PumpSwap, Raydium, Bonk, Meteora, etc.).
## What's Changed
### Performance
- **Executor hot path**: Sample `Instant::now()` only when `log_enabled` or `simulate` (total, build, submit, confirm) to reduce cold-path syscalls.
- **SWQOS**: `execute_parallel` now takes `&[Arc<SwqosClient>]` to avoid cloning the client list on each swap.
- **Constants**: Named constants for instruction/account sizes and HTTP client timeouts; no magic numbers in hot paths.
### Code Quality
- **Protocol params**: Single `validate_protocol_params()` used for both buy and sell; removed duplicate match blocks in `lib.rs`.
- **Comments**: Bilingual (English + 中文) doc and inline comments across execution, executor, perf (hardware_optimizations, syscall_bypass), and swqos/common.
- **Prefetch/safety**: Clearer docs for cache prefetch and `unsafe` usage (valid read-only ref, no concurrent write).
### Documentation
- README (EN/CN): Version references updated to 3.5.0 for path and crates.io usage.
---
## Cargo
**From Git (this release):**
```toml
sol-trade-sdk = { git = "https://github.com/0xfnzero/sol-trade-sdk", tag = "v3.5.0" }
```
**From crates.io:**
```toml
sol-trade-sdk = "3.5.0"
```
**Full Changelog**: https://github.com/0xfnzero/sol-trade-sdk/compare/v3.4.1...v3.5.0
+12 -2
View File
@@ -268,8 +268,18 @@ pub const SWQOS_ENDPOINTS_ASTRALANE: [&str; 8] = [
"http://lim.gateway.astralane.io/irisb",
];
/// Astralane QUIC 默认端点。
pub const ASTRALANE_QUIC_ENDPOINT: &str = "lim.gateway.astralane.io:7000";
/// Astralane QUIC endpoints (port 7000). Region order: NewYork, Frankfurt, Amsterdam, SLC, Tokyo, London, LosAngeles, Default.
/// See: https://github.com/Astralane/astralane-quic-client. We use fr, ams, la, ny, lim, sg only (avoid ams2/fr2 for lower latency).
pub const SWQOS_ENDPOINTS_ASTRALANE_QUIC: [&str; 8] = [
"ny.gateway.astralane.io:7000", // NewYork
"fr.gateway.astralane.io:7000", // Frankfurt
"ams.gateway.astralane.io:7000", // Amsterdam
"lim.gateway.astralane.io:7000", // SLC (no slc, use lim)
"sg.gateway.astralane.io:7000", // Tokyo (Asia)
"ams.gateway.astralane.io:7000", // London (Europe, avoid ams2)
"la.gateway.astralane.io:7000", // LosAngeles
"lim.gateway.astralane.io:7000", // Default
];
pub const SWQOS_ENDPOINTS_STELLIUM: [&str; 8] = [
"http://ewr1.flashrpc.com",
+4 -2
View File
@@ -37,6 +37,7 @@ use crate::{
SWQOS_ENDPOINTS_FLASHBLOCK,
SWQOS_ENDPOINTS_BLOCKRAZOR,
SWQOS_ENDPOINTS_ASTRALANE,
SWQOS_ENDPOINTS_ASTRALANE_QUIC,
SWQOS_ENDPOINTS_STELLIUM,
SWQOS_ENDPOINTS_SOYAS,
SWQOS_ENDPOINTS_SPEEDLANDING,
@@ -365,9 +366,10 @@ impl SwqosConfig {
SwqosConfig::Astralane(auth_token, region, url, transport) => {
let use_quic = transport.map_or(false, |t| t == SwqosTransport::Quic);
if use_quic {
let quic_endpoint = crate::constants::swqos::ASTRALANE_QUIC_ENDPOINT;
let quic_endpoint = url
.unwrap_or_else(|| SWQOS_ENDPOINTS_ASTRALANE_QUIC[region as usize].to_string());
let astralane_client =
AstralaneClient::new_quic(rpc_url.clone(), quic_endpoint, auth_token).await?;
AstralaneClient::new_quic(rpc_url.clone(), &quic_endpoint, auth_token).await?;
Ok(Arc::new(astralane_client))
} else {
let endpoint = SwqosConfig::get_endpoint(SwqosType::Astralane, region, url);