DEV Community

duongynhi000005-oss
duongynhi000005-oss

Posted on

Inside the Block: How Solana Validators Actually Order Transactions Post-Alpenglow (Empirical Study)

Why "Higher Priority Fee = Earlier Block Position" Is Only Half True on Solana

Most Solana developers assume that setting a higher SetComputeUnitPrice guarantees an earlier position inside a block. When we measured live post-Alpenglow Solana Mainnet blocks across Agave CentralScheduler, Agave UnifiedScheduler, Jito-Solana Block Engine, and Frankendancer/Firedancer Pack tiles, we found a much more nuanced reality.

Full reproducible code & dataset (docker compose up --build): https://github.com/duongynhi000005-oss/solana-inside-the-block-scheduler-analyzer


1. The Priority Score Formula Inside Agave's Scheduler

In Agave (prio_graph_scheduler.rs), transactions are not ranked by raw priority fee. They are ranked by reward per requested Compute Unit (CU):

Priority_Score = (ComputeUnitPrice_MicroLamports * Requested_CU_Limit + Base_Fee)
                 / (Requested_CU_Limit + Signature_And_Account_Lock_Overhead_CU)
Enter fullscreen mode Exit fullscreen mode

If your swap only consumes 22,000 CU but you leave the default 200,000 CU limit without calling SetComputeUnitLimit(25_000), your effective scheduler priority is diluted by up to 6x during write-lock contention.


2. Write-Lock Contention vs. Multi-Thread BankingStage Racing

Across our Mainnet sample (slots 464182838–464182886):

  1. Uncontended Transactions: Packed in parallel across 4 non-vote banking threads, achieving a Spearman rank correlation of 0.74 to 0.89 between CU price and intra-slot entry index.
  2. Multi-Thread Flush Inversions (18% of pairs): When two non-conflicting transactions arrive in the same 50ms window on different worker threads, the thread executing a lighter batch frequently flushes to the PoH Recorder 1–3 entries ahead of a higher-fee transaction whose thread was finishing a heavy CPI instruction.
  3. Hot Writable Account Chains: Transactions writing to the same AMM pool state account are chained sequentially inside PrioGraph, delaying lower-priority writers while non-conflicting low-fee transfers sail through on adjacent threads.

3. Reproducing the Measurements in One Command

We packaged our entire telemetry collector and analyzer into a read-only Docker Compose suite (zero private keys required, dry-run by default):

git clone https://github.com/duongynhi000005-oss/solana-inside-the-block-scheduler-analyzer.git
cd solana-inside-the-block-scheduler-analyzer
docker compose up --build
Enter fullscreen mode Exit fullscreen mode

Top comments (0)