services
Get a key

library / How to use Solana / Versioned transactions and lookup tables / HS0109

Deactivated lookup table check

One TypeScript file reads every address lookup table a v0 transaction names and prints a verdict for each: usable, deactivating, deactivated, missing, not a table or index past the end. With no argument it picks a recent Jupiter transaction that carries lookups.

By Carbium · Versioned transactions and lookup tables · HS0109 · updated 2026-11-23

01

What the error means

A v0 transaction names most of its accounts through address lookup tables. Before it runs, the validator loads each table the message lists and resolves the indexes against it. If a table is gone, the transaction is refused with AddressLookupTableNotFound. Wallets and RPC clients word it in their own ways, and some print it as "missing address table account".

A table can be gone for three reasons. It may never have existed, because the address was copied wrong or built on another cluster. Its authority may have closed it. Or it may have been deactivated long enough ago that the runtime treats it as closed, even while the account still sits on chain. The third case surprises people, because a read of the account succeeds and the transaction still fails.

02

The code

Install @solana/kit at 8.6.0, export CARBIUM_KEY and run the file with Node 24, which strips the types on load. Pass a table address to check one table. Pass nothing and the file lists the eight newest signatures of the Jupiter v6 program, fetches them until one carries addressTableLookups, and checks every table that transaction names.

main.ts
// HS0109 · Deactivated lookup table check// https://carbium.sh/library/howsolana/deactivated-lookup-table-check// Copyright (c) Carbium Corporation. MIT License (LICENSE). Keep this notice.// SPDX-License-Identifier: MITimport { address, createDefaultRpcTransport, createSolanaRpcFromTransport, isAddress } from "@solana/kit";const key = process.env.CARBIUM_KEY;if (!key) {  console.error("Set CARBIUM_KEY to your Carbium API key.");  process.exit(1);}const rpc = createSolanaRpcFromTransport(  createDefaultRpcTransport({    url: process.env.CARBIUM_RPC_URL ?? "https://services.carbium.sh",    headers: { "x-api-key": key },  }),);const OWNER = "AddressLookupTab1e1111111111111111111111111";const JUP = address("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4");const NEVER = 2n ** 64n - 1n;const WINDOW = 512n;type Use = { accountKey: string; writableIndexes: number[]; readonlyIndexes: number[] };type Raw = { owner: string; data: readonly [string, string] } | null;async function discover(): Promise<Use[]> {  const sigs = await rpc.getSignaturesForAddress(JUP, { limit: 8 }).send();  for (const s of sigs) {    try {      const tx = await rpc        .getTransaction(s.signature, { encoding: "json", maxSupportedTransactionVersion: 1 })        .send();      const m = tx?.transaction.message as unknown as { addressTableLookups?: Use[] } | undefined;      if (m?.addressTableLookups?.length) return m.addressTableLookups;    } catch (err) {      console.error(`skipped ${s.signature}: ${(err as Error).message}`);    }  }  return [];}function judge(raw: Raw, now: bigint, use: Use): string {  if (raw === null) return "missing: no account at this address";  if (raw.owner !== OWNER) return `not a table: owned by ${raw.owner}`;  const bytes = Buffer.from(raw.data[0], "base64");  const n = (bytes.length - 56) / 32;  if (!Number.isInteger(n) || n < 0 || bytes.readUInt32LE(0) !== 1) return "not a table: bad layout";  const since = bytes.readBigUInt64LE(4);  if (since !== NEVER) {    const gone = now - since;    return gone > WINDOW      ? `deactivated ${gone} slots ago: the runtime refuses it, close pending`      : `deactivating: ${WINDOW - gone} slots of cooldown left`;  }  const highest = Math.max(-1, ...use.writableIndexes, ...use.readonlyIndexes);  return highest >= n ? `index past the end: uses ${highest}, table holds ${n}` : `usable: ${n} addresses`;}const arg = process.argv[2];if (arg && !isAddress(arg)) {  console.error(`${arg} is not an address.`);  process.exit(1);}let uses: Use[] = [];try {  uses = arg ? [{ accountKey: arg, writableIndexes: [], readonlyIndexes: [] }] : await discover();} catch (err) {  console.error(`discovery failed: ${(err as Error).message}`);  process.exit(1);}if (uses.length === 0) {  console.error("No transaction with a lookup table in the newest signatures; run again or pass a table address.");  process.exit(1);}const [slot, tables] = await Promise.allSettled([  rpc.getSlot().send(),  rpc.getMultipleAccounts(uses.map((u) => address(u.accountKey)), { encoding: "base64" }).send(),]);if (slot.status === "rejected") {  console.error(`getSlot failed: ${slot.reason}`);  process.exit(1);}if (tables.status === "rejected") {  console.error(`getMultipleAccounts failed: ${tables.reason}`);  process.exit(1);}console.log(`slot ${slot.value}, ${uses.length} table(s)`);uses.forEach((u, i) => console.log(`${u.accountKey}  ${judge(tables.value.value[i] as Raw, slot.value, u)}`));

run: node main.ts [lookup-table-address]

The tables come back in one getMultipleAccounts call, read together with getSlot, and both calls settle separately so a failure of one prints its own error. Every call runs at confirmed, which @solana/kit 8.6.0 fills in when commitment is left out. The transaction fetch sends maxSupportedTransactionVersion: 1, so a v1 transaction does not answer -32015. A failed swap still carries its message, so discovery does not skip failed transactions.

03

Reading the verdicts

Each table gets one line. The deactivation slot at byte 4 of the account data decides most of it, and the current slot gives the age.

VerdictWhat it meansTransaction result
missingNo account at that address.Fails with the not-found error.
not a tableThe account exists and another program owns it, or its data has the wrong layout.Fails as an invalid owner or invalid data.
usableThe deactivation slot holds the largest u64, 18446744073709551615.Resolves, if every index fits.
deactivatingA deactivation slot is set and fewer than 512 slots have passed.Still resolves; the file prints the slots left.
deactivatedMore than 512 slots have passed since the deactivation slot.Fails, although the account still exists until the authority closes it.
index past the endA used index is at or above the table's address count.Fails as an invalid index.

The 512 comes from the runtime's list of recent slot hashes, which holds that many entries. A table stops resolving once its deactivation slot has dropped out of that list. Skipped slots never enter that list, so when leaders miss slots the cooldown runs a few slots past 512, and the file's count of slots left is an estimate near the end. At a slot time of about 200 ms, 512 slots is under two minutes, so a deactivation ends quickly in wall time even though the number looks large.

$Addresses appended to a table cannot be used in the slot that appended them. A transaction built in that same slot fails on the new indexes. The file does not detect this case, and it clears itself a slot later.
04

Fixing the transaction

When the verdict is missing or deactivated, the transaction message is stale. Rebuild it. If a library or service handed you the message, ask for a new one, or fetch the table again by address before compiling. A client that caches tables keeps sending the dead one until its cache expires.

A message you compiled yourself needs a fresh table list. Drop the closed table and either compile with another table that holds the addresses, or send the addresses inline. Inline addresses cost 32 bytes each against 1 byte per index, so a message that fit with a table may need to split. Compare against the 1232-byte limit before you resend. For a decode of how a table is laid out, see Lookup table contents reader.

05

On Carbium

The table read is one getMultipleAccounts call, charged 10 cells per pubkey, so a transaction with three tables costs 30 cells. getSlot costs 1 cell. Discovery adds one getSignaturesForAddress at 50 cells and up to eight getTransaction calls at 50 each, so the worst case is 450 cells before the table read. Each rate class absorbs a burst of at least 1,024 cells, and no class's share of one run comes near that, so a single run fits inside the bursts. Pass a table address and discovery never runs. RPC cell costs are listed per method, and the plan limits set the rates.

06

Where it ends

The file judges tables as they stand now. A transaction that failed an hour ago may have failed on a table that was active then, and the file cannot tell you what the chain held at that moment.

It does not recheck the transaction. A table can be fine while the message fails for another reason, such as an expired blockhash or an index error from a different lookup. The file checks the indexes it can see in the transaction it fetched, and a table address passed by hand has none to check.

Discovery reads only the eight newest signatures of one busy program, and it skips any signature whose getTransaction answer is null. It never reaches old history. The file only reads: it holds no keypair and cannot close, extend or recreate a table.

07

When it goes wrong

what goes wrongwhat to do
The file prints missing for a table address you copied from a client log.The table was closed or never existed on mainnet. Take the address from a newer transaction, or rebuild the message with a table that is live.
The file prints deactivated, yet getAccountInfo returns the account.The authority has not closed it yet, but the runtime already refuses it. Treat it as gone and stop using that table in new messages.
getTransaction answers -32015 during discovery.The call needs maxSupportedTransactionVersion: 1, as the file sends. Absent or 0 fails for a v1 transaction or a block holding one.
Discovery reports that no transaction with a lookup table turned up.None of the eight newest transactions carried a lookup, or each came back null or with an error. The file prints a skipped line for each error, and a null passes without a line. Run it again or pass a table address.
A listed signature returns null from getTransaction.The address index can list signatures below the validator's ledger floor. Use newer signatures and keep the null handling.
HTTP 429 with a retry-after hint.Repeated discovery runs on a low plan can exceed the rate. Pass a table address to skip the signature and transaction calls.
08

Questions

Why does a deactivated table still show up in getAccountInfo?

Deactivation only records a slot in the header. The account stays until the authority closes it, which the runtime allows after the cooldown. During that stretch a read succeeds and a transaction using it fails.

Can I reactivate a deactivated table?

No. Deactivation is one way. Create a new table, extend it with the addresses you need and wait a slot before using the new entries.

How do I avoid the error in a client that builds messages?

Fetch the tables when you compile a message and drop any that read as missing or deactivated. Do not hold tables in a long-lived cache without checking the deactivation slot.

Does a frozen table cause this error?

No. A frozen table has no authority, so nobody can deactivate or close it. It resolves as long as its indexes fit.