The biggest Solana news today wasn’t Grayscale or Western Union
It was @heliuslabs making 493 billion transactions searchable by account at Web2 speed
IBRL, from writes to reads 🏎️
earlier today @heliuslabs launched a new RPC method, getTransactionsForAddress (gTFA)
let's talk about how it works under the hood
solana transactions typically reference 6-10 accounts (up to ~256)
when you query "get me the history of account X", you are asking the RPC to scan transactions and find the ones that include X in their list of accounts
this is essentially trying to find a needle in a haystack
you can't simply add a standard index on the "accounts" array at scale – databases struggle with indexing variable length arrays
the solution: we built our own index, with one entry per unique (transaction, account) pair
this is no small feat – there are ~493 billion transactions (and growing)
our index currently holds over 2.3 trillion (!) rows
despite the size, the P50 lookup time is ~8ms under production load
and we have many other indices to power lookups by slot, time, status, etc
all running on purpose-built bare metal hosts with petabytes of top-of-the line NVMEs, replicated across multiple regions
tldr – we suffered so you don't have to
enjoy
2.93萬
256
本頁面內容由第三方提供。除非另有說明,OKX 不是所引用文章的作者,也不對此類材料主張任何版權。該內容僅供參考,並不代表 OKX 觀點,不作為任何形式的認可,也不應被視為投資建議或購買或出售數字資產的招攬。在使用生成式人工智能提供摘要或其他信息的情況下,此類人工智能生成的內容可能不準確或不一致。請閱讀鏈接文章,瞭解更多詳情和信息。OKX 不對第三方網站上的內容負責。包含穩定幣、NFTs 等在內的數字資產涉及較高程度的風險,其價值可能會產生較大波動。請根據自身財務狀況,仔細考慮交易或持有數字資產是否適合您。


