· Checked November 18, 2026

Which language should decode your Solana transactions?

Use Rust for the stages that touch raw shreds, because only Rust has the official Agave crates for shred recovery and entry parsing. Go and Python decode finished transactions well, including v1. TypeScript suits alerting and glue code. Many teams run a Rust receiver and decode the rest wherever their product already lives.

The five stages every decoder runs#

Receive#

Read UDP datagrams from the port you gave us and hand them on without blocking. Every language here has a standard socket API, so this stage is about discipline (a dedicated reader, a large enough buffer), not about libraries.

Reassemble#

Group shreds by slot and erasure set, recover missing data shreds where the coding shreds allow it, and stitch the payloads back into the byte stream the leader produced. This is the stage with the least library support outside Rust.

Decode transactions#

Split the reassembled bytes into entries, and each entry into signed transactions. Three formats are live: legacy, v0 and v1 (E4 tech facts T-01), and a decoder has to recognise all three from the first bytes, as versioned transactions explains.

Decode programs#

Turn instruction bytes into meaning: an Anchor discriminator plus Borsh arguments, or a hand-written layout for older programs such as SPL Token. This stage is about knowing the layouts, and any language can do it.

Write#

Send decoded rows to a bus, a database or an alert channel. Your existing stack usually decides this stage for you.

Stage by stage, language by language#

StageRustGoPythonTypeScript
Receive UDPstd or tokio sockets; no garbage collector pausesnet package; goroutine per readersocket or asyncio; the default build runs Python code on one thread at a timedgram on the event loop; keep handlers short
Reassemble shredsOfficial crates: solana-ledger (shred types) and solana-entry (entries)No official package; port the parsing and verify against fixturesNo official package; better done offline or by a Rust front endNo official package; port the entry framing yourself
Decode transactionssolana-transaction 5.x (matching solana-entry): legacy, v0, v1solana-go v1.26.0: legacy, v0, v1solders 0.29.0: legacy, v0, v1@solana/kit 8.6.0: legacy, v0, v1
Decode programsBorsh and IDL types; full controlBorsh libraries; IDL work by handBorsh libraries; quick to iterate in notebooksBorsh libraries; IDL tooling common in the JavaScript world
WriteAny clientAny clientStrong for Parquet and dataframesStrong for webhooks and chat alerts

Read the table by row. If one row is hard in your language, that row is the candidate for a second language, not the whole pipeline.

What each language's tooling offers today#

Rust. The shred and entry types live in Agave's own crates, solana-ledger and solana-entry, both at 4.4.1 on the check date. They need Agave's unstable API feature, and solana-ledger builds only with the dependency patches Agave pins in its own workspace, so plan an afternoon for the first build (E4 tech facts C-01 and C-02). Transaction types come from solana-transaction and solana-message; use the 5.x line that solana-entry 4.4.1 depends on, so the types match, and it parses all three formats (C-01, T-09).

Go. solana-go v1.26.0 parses legacy, v0 and v1 transactions from bytes. One trap: its message version getter returns an enum where v1 is the value 2, so compare against the named constant (E4 tech facts C-08). In its favour, its TransactionFromDecoder stops at the exact end of one transaction for all three formats, so it can walk the transactions inside an entry one after another (E4 tech facts C-11). The Go decoder walks through that version check.

Python. solders 0.29.0 parses all three formats into typed message objects (C-07). It is a good fit for offline captures, notebooks and research tables; see decoding in Python.

TypeScript. The official JavaScript library decodes transactions. At version 8.6.0, @solana/kit decoded every legacy, v0 and v1 transaction in our fixture set, matching signature, version and fee payer (E4 tech facts C-09). One trap: its decoder's read() treats everything after the offset as a single transaction, so inside an entry, where transactions sit back to back, you have to measure each transaction's length yourself before decoding it (E4 tech facts C-10). The TypeScript decoder guide shows the length walk. The TypeScript walk-through covers the entry framing you write by hand.

When two languages beat one#

A split stack is common and sensible. A small Rust process receives packets, reassembles shreds and emits serialized transactions. Everything after that, from program decoding to alerts, runs in the language your team already ships. The boundary is a plain byte format, so the downstream side never needs the Agave crates.

Split when the receive and reassemble rows are your bottleneck, or when the people who maintain the product do not write Rust. Keep one language when a single developer owns the whole pipeline and the traffic is modest. Where the two halves run is a separate choice, covered in in-process or a separate service.

What this comparison does not claim#

There are no throughput or timing figures on this page. Speed depends on your machine, your traffic and how carefully each stage is written, and a number from someone else's hardware would mislead you. Measure each stage on your own server with your own fixtures before you commit to a rewrite.

Language questions#

Is Python too slow for decoding Solana transactions?#

For offline analysis and research datasets, Python with solders is a reasonable choice. For a live path that must keep up with every packet, put the receive and reassemble stages in a compiled language and let Python consume decoded rows.

Can TypeScript handle raw shreds?#

It can read the datagrams, but you write the shred and entry parsing yourself, since the official parsing code is Rust. Many teams use TypeScript only after a Rust front end.

Does Go have an official shred parser?#

No official one on the check date. solana-go covers transactions; the shred and entry layers are yours to port and test.

Which language do the official Agave crates support?#

Rust only. That is the main reason the reassembly row favours Rust.

When the language is not your real problem#

If your receiver drops packets because the socket buffer is too small or the reader thread blocks, a rewrite in another language will not fix it. Likewise, if you need execution results such as balances or logs, no decoder language helps, because shreds do not carry them. Fix the socket setup or pick a data source with execution results first.

Pick a starting point#

Start from the Rust transaction decoder if you want the official crates end to end, or open the quickstart to decode a first transaction from the stream before you settle on a stack. The shred parser library cards list what exists for each language.

Whatever the language, allocation is where parsers lose time first, which zero copy parsing addresses in Rust.

Sources#

Raw shreds on your own server

Ultra Low Latency Shreds is $200 and Standard Shreds is $100. You pay in crypto, tell us which IPv4 address and UDP port should receive the stream, and we wire it up by hand.