|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Running an archive node for a blockchain like Ethereum or Polygon is an undertaking that’s both labor-intensive and costly. It’s more or less the pinnacle of node setups. The node will require good hardware, maintenance (i.e., good monitoring), and also time—at least whenever monitoring kicks in or a new release is due. Typically, one will only take this on for a specific reason.
為以太坊或 Polygon 等區塊鏈運行存檔節點是一項勞動密集且成本高昂的工作。它或多或少是節點設定的頂峰。該節點將需要良好的硬體、維護(即良好的監控)以及時間——至少在監控啟動或新版本到期時。通常,人們只會出於特定原因才會採取這項行動。
An archive node is more than a full node. A full node “only” stores the entire blockchain, whereas an archive node additionally stores every state that each smart contract and transaction ever had (i.e., at every block height). However, the additional data of an archive node can be reconstructed from the data of a full node.
存檔節點不僅僅是一個完整節點。完整節點「僅」儲存整個區塊鏈,而存檔節點還儲存每個智慧合約和交易曾經擁有的每個狀態(即在每個區塊高度)。然而,歸檔節點的附加資料可以從全節點的資料重建。
Since this often leads to discussions on Twitter or online forums, I like to bring an analogy to Bitcoin: An archive node for Ethereum is akin to a Bitcoin node that stores the UTXO (Unspent Transaction Output) set valid at every block height. This isn’t particularly interesting for Bitcoin because (a) these data can be reconstructed much faster and (b) they don’t hold any special informational value. It’s different with Ethereum because there are smart contracts whose intermediate states are stored, making it possible to directly query, for example, how much USDT an account had at any given time (block height).
由於這經常會引起Twitter 或線上論壇上的討論,因此我喜歡用比特幣進行類比:以太坊的存檔節點類似於比特幣節點,用於儲存在每個區塊高度有效的UTXO(未花費交易輸出)集。這對比特幣來說並不是特別有趣,因為(a)這些數據可以更快地重建,並且(b)它們不具有任何特殊的資訊價值。它與以太坊不同,因為智慧合約儲存了中間狀態,可以直接查詢,例如,一個帳戶在任何給定時間(區塊高度)有多少 USDT。
I synchronized my first archive node for the Ethereum ecosystem in 2019. It was out of pure curiosity: I had purchased a lot of server hardware for a project (96 cores, 768 GiB RAM, over 40 TiB SSD storage) and wanted to push it to the limit. So, I synchronized an archive node for Ethereum using geth, which took exactly 7 days and 22 hours. I still remember it so precisely because I discussed the topic on coinforum.de and documented my progress.
我在2019 年同步了以太坊生態系統的第一個存檔節點。它到極限。因此,我使用 geth 同步了以太坊的一個存檔節點,整整花了 7 天 22 小時。我仍然記得如此清晰,因為我在 coinforum.de 上討論了這個主題並記錄了我的進展。
Long-term, better reasons are needed. That’s a significant difference between Ethereum and Bitcoin. Bitcoiners synchronize the entire blockchain out of idealism. In Ethereum, most users utilize node providers like Infura or Alchemy. These providers allow roughly 100,000 free API calls, sufficient for smaller projects and wallets.
從長遠來看,需要更好的理由。這是以太坊和比特幣之間的顯著差異。比特幣愛好者出於理想主義同步整個區塊鏈。在以太坊中,大多數用戶使用 Infura 或 Alchemy 等節點提供者。這些提供者允許大約 100,000 次免費 API 調用,足以滿足小型專案和錢包的需求。
When and for whom is an archive node useful?
歸檔節點何時有用、對誰有用?
It becomes critical when one wants or needs to conduct blockchain analyses. If, for instance, you want to know which accounts held what amounts of a token on Ethereum at any time, you need to scan the blockchain block by block to find all addresses and then query the historical balances for each ERC20 transaction. This quickly exceeds the free API calls provided by Alchemy and Infura and can become expensive fast. In such cases, an archive node is worthwhile because scanning all blocks leads to as many API calls as there are blocks in the blockchain. Ethereum currently has over 20 million blocks.
當人們想要或需要進行區塊鏈分析時,它就變得至關重要。例如,如果您想隨時知道哪些帳戶在以太坊上持有多少代幣,您需要逐塊掃描區塊鏈以找到所有地址,然後查詢每筆 ERC20 交易的歷史餘額。這很快就超過了 Alchemy 和 Infura 提供的免費 API 調用,很快就會變得昂貴。在這種情況下,歸檔節點是值得的,因為掃描所有區塊會導致與區塊鏈中的區塊一樣多的 API 呼叫。以太坊目前擁有超過 2000 萬個區塊。
I now operate such nodes for clients. The reasons can sometimes be absurd. For instance, a company offers assistance in complying with EU regulations, which require demonstrating the CO2 consumption for each crypto asset. If you have a token on Ethereum, you must trace back all past transactions and swaps to calculate the gas used by the token. The gas corresponds to the required computational power and thus serves as an indicator of CO2 consumption.
我現在為客戶經營這樣的節點。原因有時可能是荒謬的。例如,一家公司提供遵守歐盟法規的協助,該法規要求證明每種加密資產的二氧化碳消耗量。如果你在以太坊上有一個代幣,你必須追溯所有過去的交易和掉期來計算該代幣使用的gas。此氣體對應於所需的計算能力,因此可以作為二氧化碳消耗的指標。
This is, of course, ludicrous. As a Proof-of-Stake blockchain, Ethereum consumes very little energy, and synchronizing an archive node likely generates far more CO2 than you could ever save through the regulation (if at all). But it’s not my job to ask such questions, but rather to set up nodes.
這當然是可笑的。作為權益證明區塊鏈,以太坊消耗的能源非常少,而且同步存檔節點可能產生的二氧化碳遠多於您透過法規節省的二氧化碳(如果有的話)。但提出這樣的問題不是我的工作,而是設定節點。
What resources are needed to operate an Ethereum archive node?
運行以太坊存檔節點需要哪些資源?
The differences between nodes and clients can be substantial. I have experience with Ethereum, Polygon, and Solana.
節點和客戶端之間的差異可能很大。我有以太坊、Polygon 和 Solana 的經驗。
Using the Nethermind client, Ethereum requires about 15 terabytes of storage for the execution layer data, 8 CPU cores (preferably 16 for synchronization), and 128 gigabytes of RAM. An alternative client is Erigon, which requires only three terabytes of data. Erigon stores data differently than Nethermind, using a flat architecture that only saves deltas between some blocks. This may result in slightly longer query times for historical data but saves a lot of space.
使用 Nethermind 用戶端,以太坊需要大約 15 TB 的儲存空間用於執行層資料、8 個 CPU 核心(最好是 16 個用於同步)和 128 GB 的 RAM。另一種客戶端是 Erigon,它只需要 3 TB 的資料。 Erigon 儲存資料的方式與 Nethermind 不同,它使用扁平架構,僅保存某些區塊之間的增量。這可能會導致歷史資料的查詢時間稍長,但會節省大量空間。
For a server, the demand is moderate. Once synchronized, less is needed. The biggest challenge is the hard drives, or rather the SSDs. To understand why, you must know how smart contracts work with the Ethereum Virtual Machine (EVM). I’ll keep it brief: Each smart contract has its own virtual memory space, which may load different parts depending on the account. This leads to numerous read and write operations (I/O) with each new block and during synchronization.
對伺服器來說,需求適中。一旦同步,就需要更少的東西。最大的挑戰是硬碟,或者更確切地說是SSD。要理解其中的原因,您必須了解智慧合約如何與以太坊虛擬機器(EVM)搭配使用。我簡單說一下:每個智能合約都有自己的虛擬記憶體空間,根據帳戶的不同,虛擬記憶體空間可能會載入不同的部分。這會導致每個新區塊以及在同步期間進行大量讀寫操作 (I/O)。
Therefore, traditional hard drives (HDDs) are outdated; SSDs are needed. Users of Nethermind must chain several SSDs together to store at least 15 terabytes. This can quickly cost a four-figure amount if
因此,傳統硬碟(HDD)已經過時;需要SSD。 Nethermind 的用戶必須將多個 SSD 連接在一起才能儲存至少 15 TB。如果這樣做的話,這很快就會花費四位數的費用
免責聲明:info@kdj.com
所提供的資訊並非交易建議。 kDJ.com對任何基於本文提供的資訊進行的投資不承擔任何責任。加密貨幣波動性較大,建議您充分研究後謹慎投資!
如果您認為本網站使用的內容侵犯了您的版權,請立即聯絡我們(info@kdj.com),我們將及時刪除。
-
- Invesco QQQ Trust:百萬富翁製造商 ETF?
- 2024-11-23 20:30:02
- 該指數中的許多股票都是您可能會發現的大型科技股:英偉達、微軟、蘋果和亞馬遜。
-
- 比特幣正在做一些以前從未做過的事情,它可能會帶來巨大的收益
- 2024-11-23 20:20:02
- 美國證券交易委員會 (SEC) 於 2024 年 1 月批准了 11 隻現貨比特幣 ETF。