From 2e47f42f0571489da8abffd42e95826186ae4a99 Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 27 Dec 2025 00:04:16 -0800 Subject: [PATCH 1/2] fix: Add gRPC config to TpuClientConfig and bump version --- .github/workflows/build-tpu-native.yml | 14 ++++++++++++++ examples/next-js/package.json | 2 +- packages/fastlane/Cargo.lock | 21 ++++++++------------- packages/fastlane/Cargo.toml | 2 +- packages/fastlane/index.d.ts | 8 ++++++++ packages/fastlane/package.json | 2 +- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-tpu-native.yml b/.github/workflows/build-tpu-native.yml index 963936b..7fd57c5 100644 --- a/.github/workflows/build-tpu-native.yml +++ b/.github/workflows/build-tpu-native.yml @@ -158,9 +158,19 @@ jobs: registry-url: https://registry.npmjs.org/ cache: pnpm + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Install dependencies run: pnpm install --no-frozen-lockfile + - name: Regenerate JS + types (index.js / index.d.ts) + run: pnpm exec napi build --platform --release --target x86_64-unknown-linux-gnu + shell: bash + working-directory: packages/fastlane + - name: Download all artifacts uses: actions/download-artifact@v4 with: @@ -174,6 +184,10 @@ jobs: ls -la *.node working-directory: packages/fastlane + - name: Verify gRPC config is present in types + run: node -e "const fs=require('node:fs'); const dts=fs.readFileSync('index.d.ts','utf8'); const required=['grpcUrl','grpcXToken']; const missing=required.filter(k=>!dts.includes(k)); if(missing.length){ console.error('Missing fields in index.d.ts:', missing.join(', ')); process.exit(1);} console.log('index.d.ts contains gRPC fields');" + working-directory: packages/fastlane + - name: Publish run: | npm config set provenance true diff --git a/examples/next-js/package.json b/examples/next-js/package.json index 18f563e..df95547 100644 --- a/examples/next-js/package.json +++ b/examples/next-js/package.json @@ -13,7 +13,7 @@ "@phosphor-icons/react": "^2.1.10", "@pipeit/actions": "workspace:*", "@pipeit/core": "^0.2.5", - "@pipeit/fastlane": "^0.1.2", + "@pipeit/fastlane": "^0.1.5", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-avatar": "^1.1.10", "@radix-ui/react-dialog": "^1.1.15", diff --git a/packages/fastlane/Cargo.lock b/packages/fastlane/Cargo.lock index d9ab3c8..9b7bbe0 100644 --- a/packages/fastlane/Cargo.lock +++ b/packages/fastlane/Cargo.lock @@ -232,15 +232,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "autotools" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" -dependencies = [ - "cc", -] - [[package]] name = "axum" version = "0.8.8" @@ -2243,7 +2234,7 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pipeit-fastlane" -version = "0.1.4" +version = "0.1.5" dependencies = [ "anyhow", "dashmap 6.1.0", @@ -2405,12 +2396,16 @@ dependencies = [ [[package]] name = "protobuf-src" version = "1.1.0+21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7ac8852baeb3cc6fb83b93646fb93c0ffe5d14bf138c945ceb4b9948ee0e3c1" dependencies = [ - "autotools", + "protoc-bin-vendored", ] +[[package]] +name = "protoc-bin-vendored" +version = "2.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68e1821cd48a880fe335a80ecb6af0efdd4820fe9cd79920a413d6e15ab39351" + [[package]] name = "pulldown-cmark" version = "0.13.0" diff --git a/packages/fastlane/Cargo.toml b/packages/fastlane/Cargo.toml index a9edd01..18f3683 100644 --- a/packages/fastlane/Cargo.toml +++ b/packages/fastlane/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pipeit-fastlane" -version = "0.1.4" +version = "0.1.5" edition = "2021" description = "Native QUIC client for direct Solana TPU transaction submission" license = "MIT" diff --git a/packages/fastlane/index.d.ts b/packages/fastlane/index.d.ts index 2a8601a..1241e81 100644 --- a/packages/fastlane/index.d.ts +++ b/packages/fastlane/index.d.ts @@ -9,6 +9,13 @@ export interface TpuClientConfig { rpcUrl: string /** WebSocket URL for slot update subscriptions. */ wsUrl: string + /** + * Optional gRPC URL for Yellowstone slot subscriptions. + * When set, this takes precedence over WebSocket tracking. + */ + grpcUrl?: string + /** Optional gRPC x-token for authenticated Yellowstone endpoints. */ + grpcXToken?: string /** Number of upcoming leaders to send transactions to (default: 2). */ fanout?: number /** Whether to pre-warm connections to upcoming leaders (default: true). */ @@ -85,6 +92,7 @@ export declare class TpuClient { /** * Sends a serialized transaction to TPU endpoints (single attempt). * + * Uses slot-aware leader selection when available, falling back to fanout. * Returns detailed per-leader results including retry statistics. * For higher landing rates, use `send_until_confirmed` instead. */ diff --git a/packages/fastlane/package.json b/packages/fastlane/package.json index fccd18e..97185d4 100644 --- a/packages/fastlane/package.json +++ b/packages/fastlane/package.json @@ -1,6 +1,6 @@ { "name": "@pipeit/fastlane", - "version": "0.1.4", + "version": "0.1.5", "description": "Native QUIC client for direct Solana TPU transaction submission", "main": "index.js", "types": "index.d.ts", From baa72ad7b61f4901ea33d31b3cace7ecf627c0ea Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 27 Dec 2025 00:05:42 -0800 Subject: [PATCH 2/2] fix: deploy --- examples/next-js/package.json | 2 +- package.json | 2 +- pnpm-lock.yaml | 68 +++++++++++++++++------------------ 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/examples/next-js/package.json b/examples/next-js/package.json index df95547..f356ae4 100644 --- a/examples/next-js/package.json +++ b/examples/next-js/package.json @@ -13,7 +13,7 @@ "@phosphor-icons/react": "^2.1.10", "@pipeit/actions": "workspace:*", "@pipeit/core": "^0.2.5", - "@pipeit/fastlane": "^0.1.5", + "@pipeit/fastlane": "^0.1.4", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-avatar": "^1.1.10", "@radix-ui/react-dialog": "^1.1.15", diff --git a/package.json b/package.json index ac0bec8..883b1d6 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "@solana/prettier-config-solana": "^0.0.6", "@types/node": "^24.10.0", "prettier": "^3.6.2", - "turbo": "^2.6.0", + "turbo": "^2.7.2", "typescript": "^5.9.3", "vitest": "^3.2.4" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b552a7..ef73625 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: ^3.6.2 version: 3.6.2 turbo: - specifier: ^2.6.0 - version: 2.6.0 + specifier: ^2.7.2 + version: 2.7.2 typescript: specifier: ^5.9.3 version: 5.9.3 @@ -42,8 +42,8 @@ importers: specifier: ^0.2.5 version: 0.2.5(59e1c826774811eacd0a7dd223ad1500) '@pipeit/fastlane': - specifier: ^0.1.2 - version: 0.1.2 + specifier: ^0.1.4 + version: 0.1.4 '@radix-ui/react-accordion': specifier: ^1.2.12 version: 1.2.12(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) @@ -1141,8 +1141,8 @@ packages: '@solana/transaction-messages': '*' '@solana/transactions': '*' - '@pipeit/fastlane@0.1.2': - resolution: {integrity: sha512-c4WJuDmfazLBHVHHqvfeZrmIiPBTWtldT/hAzZnZQ/8qqWx8hz8Jm9cJ2I9cXemtwryn9z1SIil0m45cV6azjA==} + '@pipeit/fastlane@0.1.4': + resolution: {integrity: sha512-RZoNTs9AtP/9qO8Yp1sgTpdYNxBt34PbtUFK6sh5QqJF1ePoCXcW+52vzpxFWaHse9IMJAsyQGh9ZEI23zL4VQ==} engines: {node: '>= 18'} '@pkgjs/parseargs@0.11.0': @@ -5083,38 +5083,38 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - turbo-darwin-64@2.6.0: - resolution: {integrity: sha512-6vHnLAubHj8Ib45Knu+oY0ZVCLO7WcibzAvt5b1E72YHqAs4y8meMAGMZM0jLqWPh/9maHDc16/qBCMxtW4pXg==} + turbo-darwin-64@2.7.2: + resolution: {integrity: sha512-dxY3X6ezcT5vm3coK6VGixbrhplbQMwgNsCsvZamS/+/6JiebqW9DKt4NwpgYXhDY2HdH00I7FWs3wkVuan4rA==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.6.0: - resolution: {integrity: sha512-IU+gWMEXNBw8H0pxvE7nPEa5p6yahxbN8g/Q4Bf0AHymsAFqsScgV0peeNbWybdmY9jk1LPbALOsF2kY1I7ZiQ==} + turbo-darwin-arm64@2.7.2: + resolution: {integrity: sha512-1bXmuwPLqNFt3mzrtYcVx1sdJ8UYb124Bf48nIgcpMCGZy3kDhgxNv1503kmuK/37OGOZbsWSQFU4I08feIuSg==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.6.0: - resolution: {integrity: sha512-CKoiJ2ZFJLCDsWdRlZg+ew1BkGn8iCEGdePhISVpjsGwkJwSVhVu49z2zKdBeL1IhcSKS2YALwp9ellNZANJxw==} + turbo-linux-64@2.7.2: + resolution: {integrity: sha512-kP+TiiMaiPugbRlv57VGLfcjFNsFbo8H64wMBCPV2270Or2TpDCBULMzZrvEsvWFjT3pBFvToYbdp8/Kw0jAQg==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.6.0: - resolution: {integrity: sha512-WroVCdCvJbrhNxNdw7XB7wHAfPPJPV+IXY+ZKNed+9VdfBu/2mQNfKnvqTuFTH7n+Pdpv8to9qwhXRTJe26upg==} + turbo-linux-arm64@2.7.2: + resolution: {integrity: sha512-VDJwQ0+8zjAfbyY6boNaWfP6RIez4ypKHxwkuB6SrWbOSk+vxTyW5/hEjytTwK8w/TsbKVcMDyvpora8tEsRFw==} cpu: [arm64] os: [linux] - turbo-windows-64@2.6.0: - resolution: {integrity: sha512-7pZo5aGQPR+A7RMtWCZHusarJ6y15LQ+o3jOmpMxTic/W6Bad+jSeqo07TWNIseIWjCVzrSv27+0odiYRYtQdA==} + turbo-windows-64@2.7.2: + resolution: {integrity: sha512-rPjqQXVnI6A6oxgzNEE8DNb6Vdj2Wwyhfv3oDc+YM3U9P7CAcBIlKv/868mKl4vsBtz4ouWpTQNXG8vljgJO+w==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.6.0: - resolution: {integrity: sha512-1Ty+NwIksQY7AtFUCPrTpcKQE7zmd/f7aRjdT+qkqGFQjIjFYctEtN7qo4vpQPBgCfS1U3ka83A2u/9CfJQ3wQ==} + turbo-windows-arm64@2.7.2: + resolution: {integrity: sha512-tcnHvBhO515OheIFWdxA+qUvZzNqqcHbLVFc1+n+TJ1rrp8prYicQtbtmsiKgMvr/54jb9jOabU62URAobnB7g==} cpu: [arm64] os: [win32] - turbo@2.6.0: - resolution: {integrity: sha512-kC5VJqOXo50k0/0jnJDDjibLAXalqT9j7PQ56so0pN+81VR4Fwb2QgIE9dTzT3phqOTQuEXkPh3sCpnv5Isz2g==} + turbo@2.7.2: + resolution: {integrity: sha512-5JIA5aYBAJSAhrhbyag1ZuMSgUZnHtI+Sq3H8D3an4fL8PeF+L1yYvbEJg47akP1PFfATMf5ehkqFnxfkmuwZQ==} hasBin: true tw-animate-css@1.4.0: @@ -6199,7 +6199,7 @@ snapshots: '@solana/transaction-messages': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) '@solana/transactions': 5.0.0(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3) - '@pipeit/fastlane@0.1.2': {} + '@pipeit/fastlane@0.1.4': {} '@pkgjs/parseargs@0.11.0': optional: true @@ -10931,32 +10931,32 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - turbo-darwin-64@2.6.0: + turbo-darwin-64@2.7.2: optional: true - turbo-darwin-arm64@2.6.0: + turbo-darwin-arm64@2.7.2: optional: true - turbo-linux-64@2.6.0: + turbo-linux-64@2.7.2: optional: true - turbo-linux-arm64@2.6.0: + turbo-linux-arm64@2.7.2: optional: true - turbo-windows-64@2.6.0: + turbo-windows-64@2.7.2: optional: true - turbo-windows-arm64@2.6.0: + turbo-windows-arm64@2.7.2: optional: true - turbo@2.6.0: + turbo@2.7.2: optionalDependencies: - turbo-darwin-64: 2.6.0 - turbo-darwin-arm64: 2.6.0 - turbo-linux-64: 2.6.0 - turbo-linux-arm64: 2.6.0 - turbo-windows-64: 2.6.0 - turbo-windows-arm64: 2.6.0 + turbo-darwin-64: 2.7.2 + turbo-darwin-arm64: 2.7.2 + turbo-linux-64: 2.7.2 + turbo-linux-arm64: 2.7.2 + turbo-windows-64: 2.7.2 + turbo-windows-arm64: 2.7.2 tw-animate-css@1.4.0: {}