Solana RPCSending Transactions

Network

The default sendTransaction path on the rpc-<region> hostnames: its rate, node rebroadcasting and resending the same transaction.

The network path is the default: sendTransaction on an rpc-<region> hostname, served by the constant-k node. The call works as it does on any Solana RPC. Hostnames are on Endpoints.

Rates

PlanNetwork path
Free1/s
Operator15/s
Blade Runner50/s
Nexus200/s

The figure is a rate per second, not a monthly allowance, and nothing accrues or expires. Network sends have no monthly cap. Limits are counted per region, so a key holds the full rate in New York and the full rate in Frankfurt at the same time. See Upstream limits.

Rebroadcasting

The staked route takes one shot: no retry and no rebroadcast. That is why maxRetries is forced to 0 on staked hostnames, and why the client owns retries there. See Staked endpoints.

The constant-k node behaves differently. These settings are the same in every region.

SettingValue
Leaders a send is forwarded toThe next 4 in the schedule
Rebroadcast interval420 ms
Rebroadcasts when maxRetries is unset2
Highest maxRetries the node honours5

Which of the two applies depends on how the send was routed.

SendRebroadcast by
Any send on a regular hostnameThe node, on the schedule above, unless maxRetries: 0 is set.
A staked hostname, local_ valueThe node, on the schedule above. maxRetries is passed through, so the client's own value applies.
A staked hostname, staked valueNobody. maxRetries was rewritten to 0 before the send, and that rewritten value also applies if the staked route errors and the transaction is re-sent from the constant-k node.

A client that sets maxRetries: 0 and rebroadcasts on its own, as the send-and-confirm loop does, replaces this entirely. A client loop makes the interval and the stopping condition explicit, and does not share the node's retry queue with every other caller when the network is busy.

Resending the same transaction

The staked path serves a repeat of the same transaction from the constant-k node, so one transaction is never handed to the staked route twice. The window is 60 seconds, about the life of a blockhash.

The match is on the encoded transaction string as sent. A signed transaction always serializes to the same bytes and the same signature, so a rebroadcast matches and is safe by construction. Re-signing against a fresh blockhash produces a different transaction, which takes the staked path again. The same transaction re-encoded from base58 to base64, or the other way, does not match.

Re-signing while the previous transaction can still land is the hazard this does not cover: two transactions with different blockhashes are two transactions, and both can execute. The old blockhash has to expire first.

A transaction served this way is still sent, and the node rebroadcasts it as described in Rebroadcasting.

Example

npm install @solana/kit @solana-program/system @solana-program/compute-budget
network-send.ts
import { readFileSync } from "node:fs";
import {
  address,
  appendTransactionMessageInstructions,
  createKeyPairSignerFromBytes,
  createSolanaRpc,
  createTransactionMessage,
  getBase64EncodedWireTransaction,
  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"))),
);

const { value: latestBlockhash } = await rpc
  .getLatestBlockhash({ commitment: "confirmed" })
  .send();

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,
    ),
);

const signedTx = await signTransactionMessageWithSigners(message);
const wireTx = getBase64EncodedWireTransaction(signedTx);

const signature = await rpc
  .sendTransaction(wireTx, { encoding: "base64", skipPreflight: true, maxRetries: 0n })
  .send();

console.log("Sent:", signature);

On this page