Solana RPCSending Transactions

Sending Transactions

The four sendTransaction paths, the send-and-confirm loop, priority fees and client rules.

Transactions sent with sendTransaction take one of four paths: Network, SWQoS, Jito or Astralane. They are sent over HTTPS, or over QUIC on one long-lived connection.

Paths

PathCall and hostnameWhat it doesTipPlansRoute header
NetworksendTransaction on rpc-<region>Sent from the constant-k nodeNoneAll plansNone
SWQoSsendTransaction on staked-rpc-<region>Sent through stake-weighted QoS (SWQoS)NoneAll plansX-CK-Tx-Route
JitosendTransaction or sendBundle on rpc-<region>A Jito-tipped transaction, or 1 to 5 transactions relayed as one bundleYou, to a Jito tip accountAll plansX-CK-Tx-Route (sendTransaction)
AstralanesendTransaction on rpc-<region>Sent through Astralane's sender in the regionYou, to an Astralane tip accountAll plansX-CK-Tx-Route: astralane
QUICQUIC streams on quic-<region> and staked-quic-<region>One connection, any of the four paths per transactionPer pathAll plansPer-path detail in the reply

The Benchmarks page shows live landing times and success rates for the network and staked paths.

Neon Zero

Neon Zero gates sendTransaction on each region's distance to the current slot leader, on its own neon-rpc hostnames. It is included in the Nexus plan; see Neon Zero.

A send-and-confirm loop

This example transfers 0.001 SOL. It sets a priority fee, sends without preflight, rebroadcasts until the transaction confirms, and stops when the blockhash expires.

Plan required

These examples call getLatestBlockhash and getSignatureStatuses, which need the Operator, Blade Runner or Nexus plan.

npm install @solana/kit @solana-program/system @solana-program/compute-budget
send.ts
import { readFileSync } from "node:fs";
import {
  address,
  appendTransactionMessageInstructions,
  createKeyPairSignerFromBytes,
  createSolanaRpc,
  createTransactionMessage,
  getBase64EncodedWireTransaction,
  getSignatureFromTransaction,
  lamports,
  pipe,
  setTransactionMessageFeePayerSigner,
  setTransactionMessageLifetimeUsingBlockhash,
  signTransactionMessageWithSigners,
} from "@solana/kit";
import {
  getSetComputeUnitLimitInstruction,
  getSetComputeUnitPriceInstruction,
} from "@solana-program/compute-budget";
import { getTransferSolInstruction } from "@solana-program/system";

const rpc = createSolanaRpc(
  `https://rpc-newyork.constant-k.com/?api-key=${process.env.CK_API_KEY}`,
);

// A Solana CLI keypair file (JSON array of 64 bytes)
const payer = await createKeyPairSignerFromBytes(
  new Uint8Array(JSON.parse(readFileSync(process.env.KEYPAIR_PATH!, "utf8"))),
);

// 1. Get a recent blockhash
const { value: latestBlockhash } = await rpc
  .getLatestBlockhash({ commitment: "confirmed" })
  .send();

// 2. Build the message: compute budget first, then your instructions
const message = pipe(
  createTransactionMessage({ version: 0 }),
  (m) => setTransactionMessageFeePayerSigner(payer, m),
  (m) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, m),
  (m) =>
    appendTransactionMessageInstructions(
      [
        getSetComputeUnitLimitInstruction({ units: 1_000 }),
        getSetComputeUnitPriceInstruction({ microLamports: 10_000n }),
        getTransferSolInstruction({
          source: payer,
          destination: address("RECIPIENT_ADDRESS"),
          amount: lamports(1_000_000n), // 0.001 SOL
        }),
      ],
      m,
    ),
);

// 3. Sign and serialize
const signedTx = await signTransactionMessageWithSigners(message);
const signature = getSignatureFromTransaction(signedTx);
const wireTx = getBase64EncodedWireTransaction(signedTx);

// 4. Send, then rebroadcast until it confirms or the blockhash expires
const sendOptions = { encoding: "base64", skipPreflight: true, maxRetries: 0n } as const;

while (true) {
  await rpc.sendTransaction(wireTx, sendOptions).send();
  await new Promise((resolve) => setTimeout(resolve, 400));

  const { value: [status] } = await rpc.getSignatureStatuses([signature]).send();
  if (status?.err) {
    throw new Error(`Transaction ${signature} failed`, { cause: status.err });
  }
  if (status?.confirmationStatus === "confirmed" || status?.confirmationStatus === "finalized") {
    console.log("Confirmed:", signature);
    break;
  }

  const blockHeight = await rpc.getBlockHeight({ commitment: "confirmed" }).send();
  if (blockHeight > latestBlockhash.lastValidBlockHeight) {
    throw new Error(`Blockhash expired before ${signature} landed. Rebuild and resend.`);
  }
}

The script runs with KEYPAIR_PATH=~/.config/solana/id.json npx tsx send.ts.

Confirmation over WebSocket

With a WebSocket connection, @solana/kit waits for confirmation instead of polling:

import {
  assertIsTransactionWithBlockhashLifetime,
  createSolanaRpc,
  createSolanaRpcSubscriptions,
  getSignatureFromTransaction,
  sendAndConfirmTransactionFactory,
} from "@solana/kit";

const key = process.env.CK_API_KEY;
const rpc = createSolanaRpc(`https://rpc-newyork.constant-k.com/?api-key=${key}`);
const rpcSubscriptions = createSolanaRpcSubscriptions(
  `wss://ws-newyork.constant-k.com:1337/ws?api-key=${key}`,
);

const sendAndConfirmTransaction = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions });

// signedTx: built and signed as in the example above
assertIsTransactionWithBlockhashLifetime(signedTx);
await sendAndConfirmTransaction(signedTx, {
  commitment: "confirmed",
  skipPreflight: true,
});
console.log("Confirmed:", getSignatureFromTransaction(signedTx));

Priority fees

Leaders order transactions partly by priority fee. On legacy and version 0 transactions it is a price per compute unit, in micro-lamports, set with a SetComputeUnitPrice instruction. A realistic compute unit limit alongside it avoids paying for units the transaction does not use. Version 1 sets the fee as a total in lamports; see Version 1 transactions.

A price comes from what recent transactions paid to write to the same accounts.

import { address, createSolanaRpc } from "@solana/kit";

const rpc = createSolanaRpc(
  `https://rpc-newyork.constant-k.com/?api-key=${process.env.CK_API_KEY}`,
);

// Fees recently paid by transactions that wrote to these accounts
const fees = await rpc
  .getRecentPrioritizationFees([address("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4")])
  .send();

const sorted = fees.map((f) => f.prioritizationFee).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
const p75 = sorted[Math.floor(sorted.length * 0.75)] ?? 0n;
console.log(`75th percentile: ${p75} micro-lamports per CU`);

Version 1 transactions

sendTransaction takes the signed bytes and does not care which format they are, so sending version 1 needs no parameter or hostname change. constant-k nodes run solana-core 4.2.2 or later and serve it. Four things change in how you build the transaction:

  • The signing library decides the format: @solana/kit 8.0.0 or later, or the Rust solana-* crates at 4.2.
  • The priority fee is a total in lamports in the message config, not a price per compute unit in a ComputeBudget instruction.
  • An unset config field means the minimum, not a default, so the compute unit limit and the loaded accounts data size have to be set explicitly.
  • Address lookup tables do not exist in version 1. A transaction that needs one stays on version 0.

Transaction v1 covers the message config, the limits, the client minimums and reading these transactions back.

Durable nonces

A durable nonce transaction replaces the recent blockhash with a value stored in a nonce account, so it does not expire. Solana plans to remove durable nonces. The Solana Foundation tracks the plan on its Durable Nonce Deprecation page.

ItemStatus on 2026-10-29
Durable nonce transactionsWork on mainnet. constant-k sends them on the network and staked paths.
ReplacementAn onchain offline signer program. Two candidates: Anza's Programmatic Signer (on devnet, audits pending) and Blueshift's Vector. No final choice.
RemovalNo date set. Expected about six months after a replacement is audited and live on mainnet. Removal needs a feature gate.

Transactions that use a recent blockhash are not affected.

With an offline signer program, the cold key signs a message that lists the instructions. A fee payer wraps the message in an ordinary transaction with a recent blockhash. The program checks the signature, advances its own nonce and runs the instructions through CPI.

AreaWhat changes
ExpiryThe wrapping transaction expires like any other, so the client rules apply to it. The signed message does not expire until it is used or cancelled.
RetriesThe program runs a signed message once. Two wrapping transactions that carry it cannot both run it. A wrapping transaction that fails does not use up the message.
FeesgetFeeForMessage reads the fee from the nonce account when a message's blockhash is a nonce value. That fallback ends when durable nonces are removed.
ReadingWrapping transactions can be version 1. getTransaction and getBlock need maxSupportedTransactionVersion set to 1. See Transaction v1.
SignersThe fee payer is the only signer. The account that acts is a program-derived address (PDA) in innerInstructions, not a top-level signer.

Client rules

RuleDetail
A fresh blockhashFetched with confirmed commitment immediately before signing. lastValidBlockHeight says when to stop retrying.
Preflight off in productionskipPreflight: true drops a simulation before the send. In development, simulateTransaction is a separate call with its own lower rate limit.
Client-owned retriesmaxRetries: 0, with the client rebroadcasting the same signed transaction until it confirms or the blockhash expires. Left unset, the node rebroadcasts twice instead. See Rebroadcasting.
No re-signing while the old transaction can still landA new blockhash makes a new transaction, and both can execute. The old blockhash has to expire first.
One region per flowSend and confirm on the same region. Nodes can differ by a slot or two. See Choosing a region.
Distance to the nodeYour latency to the node adds directly to landing time.
Rebroadcasts countEvery rebroadcast counts toward your sendTransaction limit. A 400 ms loop sends about 2.5 calls per second per transaction.

What affects landing

No RPC can guarantee that a transaction lands. These factors decide it:

FactorEffect
Priority feeRanked against other transactions that want the same accounts.
DistanceFrom your sender to the node, and from the node to the current leader. The leader changes every four slots, about 1.1 seconds at current slot times, so this distance keeps changing.
Blockhash ageAn old blockhash leaves less time to land.
Compute unit limitOn legacy and version 0, an oversized limit lowers your priority per unit. On version 1 the fee is a total, so the limit changes your cost, not your price per unit.

The same transaction through several providers

Only one copy can land. The others fail as duplicates, or, on a durable nonce, fail once the nonce advances. That is the expected outcome rather than a fault in any one path. X-CK-Tx-Route reports the path constant-k used, not which provider's copy won.

On this page