Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.
TLDR:
What is a pending block? It’s the block a node (whether proposer or not) believes will be next in line for inclusion on the chain. A proposer’s pending block is built from their local mempool and is what they’ll broadcast. A non-proposer’s pending block, however, is only a “best guess” since the proposer might have a different mempool or prioritization strategy.
How does Geth create it? Up to version 1.14.0, Geth continuously managed a pending block in the background, updating it as new transactions arrived. Now, Geth builds a pending block on demand, caches it briefly (2 seconds by default), then discards or updates it when a new block is published or if a reorg happens.
Why do transaction sets differ? Nodes prioritize local transactions first (if they meet gas requirements) and then sort remote ones by their effective gas tip. The block proposer might see different transactions altogether and order them differently based on fees, local config, or simply having a newer view of the mempool.
What does the code show? By comparing the “pending” block to the finalized block with the same block number, you can see which transactions made it and how their positions changed. In practice, you’ll often find:
Some transactions in the pending block don’t appear in the finalized block.
The finalized block may include additional transactions.
Transaction orders may differ because the proposer’s actual block can diverge from your local pending snapshot.
Overall, monitoring the pending block gives insights into potential arbitrage or flash loan opportunities, but it’s never a hard guarantee that your transactions will be included exactly as you see them.In the Ethereum blockchain, understanding the concept of a pending block is crucial for seizing arbitrage opportunities, executing flash loans, and managing risks. Monitoring pending blocks allows users to identify large transactions or price discrepancies across decentralized exchanges.When a user queries the pending block through a node client, several processes occur under the hood to assemble and manage this block. Since Geth stays the most popular Ethereum execution client, let’s explore how Geth specifically constructs the pending block.
Start for free and get your app to production levels immediately. No credit card required. You can sign up with your GitHub, X, Google, or Microsoft account.
The pending tag of blocks allows developers to get information on the transactions expected to be included in the next block. According to the JSON-RPC specification for Ethereum clients, there are five block tags that the clients must use:
Earliest. Refers to the lowest numbered block available to the client.
Pending. Refers to the next block anticipated by the client, built atop the latest and including transactions typically sourced from the local mempool.
Latest. Points to the most recent block in the client’s observed canonical chain, subject to potential reorganizations even under normal conditions.
Safe. Represents the latest block secure from reorganizations under assumptions of an honest majority and specific synchronicity conditions.
Finalized. Denotes the most recent crypto-economically secure block, immune to reorganizations except under manual intervention coordinated by the community.
It must be noted that if the node is a block proposer, then the pending block is the one the node intends to broadcast later. This pending block is built using the latest transactions from the local mempool, prioritized, and validated according to the consensus rules.On the other hand, if the node is not a block proposer (whether it is a validator or a non-validator), the pending block still consists of transactions from the local mempool. However, these transactions are included based on the node’s expectations of what might be in the next block, but there is no guarantee that these transactions will be included. The actual inclusion of transactions depends on the block proposer who might have a different mempool state and transaction selection criteria.
Let’s explore the pending block on the example of the Geth execution client. Recently, the client has been updated and a pending block is created upon request (whenever this block tag is used) and cached for a period set in the pendingTTL (time-to-live) property of the miner (currently, it’s set to 2 sec).Before the update, the pending block was managed continuously in the background. Geth would keep updating the pending block as new transactions arrived in the mempool, and the state of the blockchain changed. To check which client version you are connected to, you can use the web3_clientVersion RPC method.Let’s examine the lifecycle of the pending block before the update has been introduced (Geth < 1.14.0). The component of the Geth client that is responsible for managing the pending block is the miner.After receiving the request to interact with a pending block, the Geth checks if a pending block is already available and up-to-date. If it is not available, the validator fetches, validates, sorts pending transactions in the local mempool, and then includes them in the pending block. From now on, it generates and maintains the pending block continuously. If a pending block is available, the worker ensures it is updated with any new transactions or state changes that have occurred.Here are the scenarios that can occur to an existing pending block:
Update. When new transactions arrive in the mempool, they are validated, sorted, and included in the pending block.
Discarding. When a new block is built and added to the blockchain or a blockchain reorganization occurs, the current pending block may become invalid due to changes in the state. A new pending block is generated based on the new blockchain state.
To better understand the construction of a pending block, we need to examine how transactions are filtered and ordered in the mempool (or txpool, as it’s called in Geth).
When transactions are added to the mempool, they undergo several validation steps to ensure they meet network conditions and node-specific configurations. Two relevant gas checks related to the article’s topic are listed below.GasFeeCap ≥ GasTipCap and GasTipCap ≥ MinGasTipOnce validated, transactions are dynamically filtered and sorted to maintain the mempool’s efficiency and relevance.FilteringTransactions remain in the mempool if their gas fee cap exceeds the current base fee. Additionally, the effective gas tip must be greater than or equal to the minimum gas tip specified in the node configuration.GasFeeCap ≥ BaseFee and EffectiveGasTip ≥ MinGasTipEffectiveGasTip = min(GasFeeCap - BaseFee, GasTipCap)SortingTransactions in the mempool are primarily sorted by their gas price, specifically their effective gas tip, which is the difference between the gas fee cap and the base fee or the gas tip cap, whichever is lower.
Gas fee cap and gas tip cap were introduced with EIP-1559 transactions. Legacy transactions, also known as Type-0 transactions, do not have these properties and only specify a gas price. These legacy transactions are sorted by gas price alone, without the need for calculating an effective gas tip.
For transactions from the same account, they are sorted by nonce to ensure they can be executed sequentially. If necessary, the time when the transaction was first seen can also be considered to help order transactions with the same gas price.
When requesting a pending block, transactions are sourced from the mempool. Geth employs filtering and sorting logic mentioned the mempool section to ensure that pending transactions adhere to the current network conditions and node configuration.Local transactions are given the highest priority and are included in the block before considering remote ones, regardless of their effective gas tip, as long as it exceeds the minimum gas tip set in the node configuration.
Check that the connection to the Ethereum node is established, get the node version and fetch a pending block.
def main(): if not web3.is_connected(): print("\nFailed to connect to the Ethereum node.") return print("\nConnected to the Ethereum node.") print("Node version:", web3.client_version) # Fetch pending block pending_block = web3.eth.get_block('pending') pending_block_number = pending_block.number
To fetch a finalized block with the same number as the pending block we fetched earlier, a few retries may be needed.
# Retry fetching the finalized block with the same block number as the pending block finalized_block = None start_time = time.time() while True: try: finalized_block = web3.eth.get_block(pending_block_number, full_transactions=True) break except Exception as e: if time.time() - start_time > 60: print(f"Failed to fetch the finalized block within 60 seconds: {e}") return time.sleep(2)
import osimport timefrom dotenv import load_dotenvfrom web3 import Web3# Load environment variablesload_dotenv()ETH_NODE_URL = os.getenv("ETH_NODE_URL")# Create connection to Ethereum nodeweb3 = Web3(Web3.HTTPProvider(ETH_NODE_URL))def main(): if not web3.is_connected(): print("\nFailed to connect to the Ethereum node.") return print("\nConnected to the Ethereum node.") print("Node version:", web3.client_version) # Fetch pending block pending_block = web3.eth.get_block('pending') pending_block_number = pending_block.number # Retry fetching the finalized block with the same block number as the pending block finalized_block = None start_time = time.time() while True: try: finalized_block = web3.eth.get_block(pending_block_number, full_transactions=True) break except Exception as e: if time.time() - start_time > 60: print(f"Failed to fetch the finalized block within 60 seconds: {e}") return time.sleep(2) # Compare transactions in the pending block and finalized block print(f"\nComparing txs in pending block and finalized block (block number: {pending_block_number}):") pending_block_tx_hashes = {tx.hex() for tx in pending_block.transactions} finalized_block_tx_hashes = {tx['hash'].hex() for tx in finalized_block.transactions} common_txs = pending_block_tx_hashes.intersection(finalized_block_tx_hashes) pending_only_txs = pending_block_tx_hashes - finalized_block_tx_hashes finalized_only_txs = finalized_block_tx_hashes - pending_block_tx_hashes print(f"\nTxs in pending block: {len(pending_block.transactions)}") print(f"Txs in latest block: {len(finalized_block.transactions)}") position_changes = { "same_position": 0, "higher_position": 0, "lower_position": 0 } for tx_hash in common_txs: pending_index = [tx.hex() for tx in pending_block.transactions].index(tx_hash) finalized_index = [tx['hash'].hex() for tx in finalized_block.transactions].index(tx_hash) if pending_index == finalized_index: position_changes["same_position"] += 1 elif pending_index > finalized_index: position_changes["higher_position"] += 1 else: position_changes["lower_position"] += 1 print(f"\nTxs with higher position in the latest: {position_changes['higher_position']}") print(f"Txs with the same position in the latest: {position_changes['same_position']}") print(f"Txs with lower position in the latest: {position_changes['lower_position']}") print(f"Txs not included in the latest: {len(pending_only_txs)}")if __name__ == "__main__": main()
If you run the code above, you will notice that the transactions in the pending block differ from those in the final block added to the blockchain.The point is that the pending block is constructed by any node (validator or non-validator), but the finalized block is constructed by the block proposer (validator). The block proposer may have a different view of the mempool, apply different prioritization criteria, or include different transactions based on network conditions and their own transaction pool.When examining the transactions in the pending block versus the finalized block for block number 20212119, we can observe some interesting patterns and differences:
Metric
Number of transactions
Pending block
122
Finalized block
189
Transactions with higher positions in the latest block
0
Transactions with the same position in the latest block
0
Transactions with lower positions in the latest block
The finalized block contains significantly more transactions than the pending block. This means that additional transactions were included by the block proposer after the pending block snapshot was taken.
Almost all transactions (120 out of 122) from the pending block ended up in a lower position in the finalized block.
Two transactions from the pending block were not included in the finalized block at all. This could be due to various reasons such as insufficient fees, reorganization, or replacement by higher-priority transactions.
The goal of this article was to demystify the concept of a pending block in the Ethereum blockchain, specifically focusing on how Geth, the most popular Ethereum execution client, constructs pending blocks.
Block proposer and non-block proposer limitations:
Block proposers construct the pending block using the latest transactions from the local mempool, ensuring they are prioritized and validated according to consensus rules. These blocks are proposed to the network for inclusion in the blockchain.
Non-block proposers (which can include validators when they are not proposing a block) construct a pending block based on their expectations of the next block’s transactions but lack the guarantee of actual inclusion, as the final decision rests with the block proposer.
Transaction ordering in a pending block:
Transactions in the pending block are sourced from the mempool and primarily sorted by their effective gas tip, calculated as the difference between the gas fee cap and the base fee or the gas tip cap.
Local transactions are prioritized over remote transactions, regardless of their effective gas tip, as long as they meet the minimum gas tip requirement.
Handling of legacy transactions:
Legacy transactions (Type-0) are sorted by gas price alone, without considering the effective gas tip. This ensures backward compatibility and straightforward inclusion based on gas price.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Chainstack","description":"Chainstack developer documentation — deploy and manage blockchain nodes across 70+ protocols via managed cloud infrastructure or self-hosted on your own Kubernetes","colors":{"primary":"#007aff","light":"#007aff","dark":"#007aff"},"logo":{"light":"https://mintcdn.com/chainstack/4kCLdVG8vhROt3j-/logo/light.svg?fit=max\u0026auto=format\u0026n=4kCLdVG8vhROt3j-\u0026q=85\u0026s=7d2d6d754203b9b3aa553e71ac4d9991","dark":"https://mintcdn.com/chainstack/4kCLdVG8vhROt3j-/logo/dark.svg?fit=max\u0026auto=format\u0026n=4kCLdVG8vhROt3j-\u0026q=85\u0026s=0f1b86eba2477ec37c2464be89df9e6d","href":"https://chainstack.com/"},"favicon":"https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/favicon.png?fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=d58df95278b0108206c861030eca1a8a","api":{"openapi":["openapi/hyperliquid_node_api/hypercore_info/info_meta.json","openapi/hyperliquid_node_api/hypercore_info/info_meta_and_asset_ctxs.json","openapi/hyperliquid_node_api/hyperevm/evm_net_version.json","openapi/hyperliquid_node_api/hyperevm/evm_web3_client_version.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_block_number.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_call.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_chain_id.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_filter_changes.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_filter_logs.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_header_by_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_header_by_number.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_transaction_by_sender_and_nonce.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_uncle_by_block_hash_and_index.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_uncle_by_block_number_and_index.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_new_filter.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_uninstall_filter.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_get_raw_block.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_get_raw_header.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_get_raw_receipts.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_get_raw_transaction.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_trace_block.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_trace_call.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_trace_transaction.json","openapi/hyperliquid_node_api/hyperevm/evm_erigon_get_header_by_number.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_big_block_gas_price.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_blob_base_fee.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_call_many.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_create_access_list.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_estimate_gas.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_fee_history.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_gas_price.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_balance.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_block_by_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_block_by_number.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_block_receipts.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_block_transaction_count_by_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_block_transaction_count_by_number.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_code.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_logs.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_proof.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_raw_transaction_by_block_hash_and_index.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_raw_transaction_by_block_number_and_index.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_raw_transaction_by_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_storage_at.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_system_txs_by_block_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_system_txs_by_block_number.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_transaction_by_block_hash_and_index.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_transaction_by_block_number_and_index.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_transaction_by_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_transaction_count.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_transaction_receipt.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_uncle_count_by_block_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_get_uncle_count_by_block_number.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_max_priority_fee_per_gas.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_new_block_filter.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_protocol_version.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_send_raw_transaction.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_simulate_v1.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_syncing.json","openapi/hyperliquid_node_api/hyperevm/evm_eth_using_big_blocks.json","openapi/hyperliquid_node_api/hyperevm/evm_net_listening.json","openapi/hyperliquid_node_api/hyperevm/evm_net_peer_count.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_api_level.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_block_details.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_block_details_by_hash.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_block_transactions.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_contract_creator.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_header_by_number.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_internal_operations.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_transaction_by_sender_and_nonce.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_get_transaction_error.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_has_code.json","openapi/hyperliquid_node_api/hyperevm/evm_ots_trace_transaction.json","openapi/hyperliquid_node_api/hyperevm/evm_trace_block.json","openapi/hyperliquid_node_api/hyperevm/evm_trace_call.json","openapi/hyperliquid_node_api/hyperevm/evm_trace_call_many.json","openapi/hyperliquid_node_api/hyperevm/evm_trace_filter.json","openapi/hyperliquid_node_api/hyperevm/evm_trace_raw_transaction.json","openapi/hyperliquid_node_api/hyperevm/evm_trace_replay_block_transactions.json","openapi/hyperliquid_node_api/hyperevm/evm_trace_replay_transaction.json","openapi/hyperliquid_node_api/hypercore_info/info_batch_clearinghouse_states.json","openapi/hyperliquid_node_api/hypercore_info/info_funding_history.json","openapi/hyperliquid_node_api/hypercore_info/info_predicted_fundings.json","openapi/hyperliquid_node_api/hypercore_info/info_spot_meta_and_asset_ctxs.json","openapi/hyperliquid_node_api/hypercore_info/info_token_details.json","openapi/hyperliquid_node_api/hypercore_info/info_user_funding.json","openapi/hyperliquid_node_api/hypercore_info/info_user_non_funding_ledger_updates.json","openapi/hyperliquid_node_api/hypercore_info/info_spotmeta.json","openapi/hyperliquid_node_api/hypercore_info/info_clearinghousestate.json","openapi/hyperliquid_node_api/hypercore_info/info_spotclearinghousestate.json","openapi/hyperliquid_node_api/hypercore_info/info_openorders.json","openapi/hyperliquid_node_api/hypercore_info/info_exchangestatus.json","openapi/hyperliquid_node_api/hypercore_info/info_frontendopenorders.json","openapi/hyperliquid_node_api/hypercore_info/info_liquidatable.json","openapi/hyperliquid_node_api/hypercore_info/info_activeassetdata.json","openapi/hyperliquid_node_api/hypercore_info/info_maxmarketorderntls.json","openapi/hyperliquid_node_api/hypercore_info/info_vaultsummaries.json","openapi/hyperliquid_node_api/hypercore_info/info_uservaultequities.json","openapi/hyperliquid_node_api/hypercore_info/info_leadingvaults.json","openapi/hyperliquid_node_api/hypercore_info/info_extraagents.json","openapi/hyperliquid_node_api/hypercore_info/info_subaccounts.json","openapi/hyperliquid_node_api/hypercore_info/info_userfees.json","openapi/hyperliquid_node_api/hypercore_info/info_userratelimit.json","openapi/hyperliquid_node_api/hypercore_info/info_spotdeploystate.json","openapi/hyperliquid_node_api/hypercore_info/info_perpdeployauctionstatus.json","openapi/hyperliquid_node_api/hypercore_info/info_delegations.json","openapi/hyperliquid_node_api/hypercore_info/info_perpdexs.json","openapi/hyperliquid_node_api/hypercore_info/info_delegator_summary.json","openapi/hyperliquid_node_api/hypercore_info/info_delegator_history.json","openapi/hyperliquid_node_api/hypercore_info/info_delegator_rewards.json","openapi/hyperliquid_node_api/hypercore_info/info_max_builder_fee.json","openapi/hyperliquid_node_api/hypercore_info/info_user_to_multi_sig_signers.json","openapi/hyperliquid_node_api/hypercore_info/info_user_role.json","openapi/hyperliquid_node_api/hypercore_info/info_perps_at_open_interest_cap.json","openapi/hyperliquid_node_api/hypercore_info/info_validator_l1_votes.json","openapi/hyperliquid_node_api/hypercore_info/info_web_data2.json","openapi/hyperliquid_node_api/hypercore_info/info_allmids.json","openapi/hyperliquid_node_api/hypercore_info/info_user_fills.json","openapi/hyperliquid_node_api/hypercore_info/info_user_fills_by_time.json","openapi/hyperliquid_node_api/hypercore_info/info_portfolio.json","openapi/hyperliquid_node_api/hypercore_info/info_referral.json","openapi/hyperliquid_node_api/hypercore_info/info_order_status.json","openapi/hyperliquid_node_api/hypercore_info/info_l2_book.json","openapi/hyperliquid_node_api/hypercore_info/info_candle_snapshot.json","openapi/hyperliquid_node_api/hypercore_info/info_historical_orders.json","openapi/hyperliquid_node_api/hypercore_info/info_user_twap_slice_fills.json","openapi/hyperliquid_node_api/hypercore_info/info_recent_trades.json","openapi/hyperliquid_node_api/hypercore_info/info_vault_details.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_place_order.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_cancel_order.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_cancel_by_cloid.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_schedule_cancel.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_modify_order.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_batch_modify.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_update_leverage.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_update_isolated_margin.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_usd_send.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_spot_send.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_withdraw.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_spot_perp_transfer.json","openapi/hyperliquid_node_api/hypercore_info/info_web_data3.json","openapi/hyperliquid_node_api/hypercore_info/info_user_dex_abstraction.json","openapi/hyperliquid_node_api/hypercore_info/info_user_abstraction.json","openapi/hyperliquid_node_api/hypercore_info/info_borrow_lend_user_state.json","openapi/hyperliquid_node_api/hypercore_info/info_borrow_lend_reserve_state.json","openapi/hyperliquid_node_api/hypercore_info/info_all_borrow_lend_reserve_states.json","openapi/hyperliquid_node_api/hypercore_info/info_all_perp_metas.json","openapi/hyperliquid_node_api/hypercore_info/info_perp_annotation.json","openapi/hyperliquid_node_api/hypercore_info/info_perp_categories.json","openapi/hyperliquid_node_api/hypercore_info/info_perp_dex_limits.json","openapi/hyperliquid_node_api/hypercore_info/info_perp_dex_status.json","openapi/hyperliquid_node_api/hypercore_info/info_spot_pair_deploy_auction_status.json","openapi/hyperliquid_node_api/hypercore_info/info_margin_table.json","openapi/hyperliquid_node_api/hypercore_info/info_aligned_quote_token_info.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_twap_order.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_twap_cancel.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_approve_agent.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_approve_builder_fee.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_set_referrer.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_create_sub_account.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_sub_account_transfer.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_sub_account_spot_transfer.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_convert_to_multi_sig_user.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_multi_sig.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_user_set_abstraction.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_agent_set_abstraction.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_user_dex_abstraction.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_agent_enable_dex_abstraction.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_evm_user_modify.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_send_asset.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_send_to_evm_with_data.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_vault_transfer.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_token_delegate.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_c_deposit.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_c_withdraw.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_spot_deploy.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_perp_deploy.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_c_signer_action.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_c_validator_action.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_validator_l1_stream.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_noop.json","openapi/hyperliquid_node_api/hypercore_exchange/exchange_reserve_request_weight.json","openapi/hyperliquid_node_api/hyperevm/evm_debug_trace_block_by_number.json","openapi/ethereum_node_api/transaction_info/eth_getTransactionReceipt.json","openapi/ethereum_node_api/transaction_info/eth_getTransactionByBlockNumberAndIndex.json","openapi/ethereum_node_api/transaction_info/eth_getBlockReceipts.json","openapi/ethereum_node_api/transaction_info/eth_getTransactionByHash.json","openapi/ethereum_node_api/transaction_info/eth_newPendingTransactionFilter.json","openapi/ethereum_node_api/transaction_info/eth_getTransactionByBlockHashAndIndex.json","openapi/ethereum_node_api/chain_info/eth_syncing.json","openapi/ethereum_node_api/chain_info/eth_chainId.json","openapi/ethereum_node_api/debug_and_trace/custom_js_tracer.json","openapi/ethereum_node_api/debug_and_trace/debug_traceTransaction.json","openapi/ethereum_node_api/debug_and_trace/debug_traceCall.json","openapi/ethereum_node_api/debug_and_trace/trace_transaction.json","openapi/ethereum_node_api/debug_and_trace/debug_traceBlockByHash.json","openapi/ethereum_node_api/debug_and_trace/trace_block.json","openapi/ethereum_node_api/debug_and_trace/debug_traceBlockByNumber.json","openapi/ethereum_node_api/gas_data/eth_gasPrice.json","openapi/ethereum_node_api/gas_data/eth_estimateGas.json","openapi/ethereum_node_api/gas_data/eth_maxPriorityFeePerGas.json","openapi/ethereum_node_api/filter_handling/eth_getFilterChanges.json","openapi/ethereum_node_api/filter_handling/eth_uninstallFilter.json","openapi/ethereum_node_api/client_info/net_peerCount.json","openapi/ethereum_node_api/client_info/net_listening.json","openapi/ethereum_node_api/client_info/web3_clientVersion.json","openapi/ethereum_node_api/blocks_info/eth_getBlockByNumber.json","openapi/ethereum_node_api/blocks_info/eth_getBlockTransactionCountByHash.json","openapi/ethereum_node_api/blocks_info/eth_blockNumber.json","openapi/ethereum_node_api/blocks_info/eth_newBlockFilter.json","openapi/ethereum_node_api/blocks_info/eth_getBlockByHash.json","openapi/ethereum_node_api/blocks_info/eth_getBlockTransactionCountByNumber.json","openapi/ethereum_node_api/accounts_info/eth_getStorageAt.json","openapi/ethereum_node_api/accounts_info/eth_getBalance.json","openapi/ethereum_node_api/accounts_info/eth_getTransactionCount.json","openapi/ethereum_node_api/accounts_info/eth_getCode.json","openapi/ethereum_node_api/accounts_info/eth_getProof.json","openapi/ethereum_node_api/logs_and_events/eth_newFilter.json","openapi/ethereum_node_api/logs_and_events/eth_getLogs.json","openapi/ethereum_node_api/execute_transactions/eth_simulateV1.json","openapi/ethereum_node_api/execute_transactions/eth_call.json","openapi/ethereum_node_api/execute_transactions/eth_sendRawTransaction.json","openapi/ethereum_beacon_chain_api/configuration_info/node_config.json","openapi/ethereum_beacon_chain_api/configuration_info/genesis_data.json","openapi/ethereum_beacon_chain_api/configuration_info/fork_schedule.json","openapi/ethereum_beacon_chain_api/configuration_info/fork_version_by_state_id.json","openapi/ethereum_beacon_chain_api/configuration_info/deposit_contract.json","openapi/ethereum_beacon_chain_api/state/getStateRoot.json","openapi/ethereum_beacon_chain_api/state/getFinalityCheckpoints.json","openapi/ethereum_beacon_chain_api/state/getCommitteesByStateIdEpochIndexAndSlot.json","openapi/ethereum_beacon_chain_api/state/getBlobsByBlockId.json","openapi/ethereum_beacon_chain_api/state/getSyncCommitteeContribution.json","openapi/ethereum_beacon_chain_api/state/getBeaconBlockRootByBlockId.json","openapi/ethereum_beacon_chain_api/state/getBeaconBlocksByBlockId.json","openapi/ethereum_beacon_chain_api/state/getBeaconHeadersByBlockId.json","openapi/ethereum_beacon_chain_api/state/getBeaconHeadersBySlotAndParentRoot.json","openapi/ethereum_beacon_chain_api/state/getSyncCommitteesByStateIdAndEpoch.json","openapi/ethereum_beacon_chain_api/events/subscribe_to_events.json","openapi/ethereum_beacon_chain_api/validatiors_info/validator_information_by_state_id.json","openapi/ethereum_beacon_chain_api/validatiors_info/proposer_duties.json","openapi/ethereum_beacon_chain_api/validatiors_info/validator_information_by_state_id_or_public_key.json","openapi/ethereum_beacon_chain_api/validatiors_info/attestation_data.json","openapi/ethereum_beacon_chain_api/validatiors_info/produce_unsigned_blinded_block.json","openapi/ethereum_beacon_chain_api/validatiors_info/voluntary_exits.json","openapi/ethereum_beacon_chain_api/validatiors_info/produce_unsigned_block.json","openapi/ethereum_beacon_chain_api/validatiors_info/attestation_of_beacon_block_by_block_id.json","openapi/ethereum_beacon_chain_api/validatiors_info/proposer_slashings.json","openapi/ethereum_beacon_chain_api/validatiors_info/validator_balances.json","openapi/ethereum_beacon_chain_api/validatiors_info/attester_slashings.json","openapi/ethereum_beacon_chain_api/validatiors_info/beacon_pool_attestations.json","openapi/polygon_node_api/transaction_info/eth_getTransactionReceipt.json","openapi/polygon_node_api/transaction_info/eth_getTransactionByBlockNumberAndIndex.json","openapi/polygon_node_api/transaction_info/eth_getBlockReceipts.json","openapi/polygon_node_api/transaction_info/eth_getTransactionByHash.json","openapi/polygon_node_api/transaction_info/eth_newPendingTransactionFilter.json","openapi/polygon_node_api/transaction_info/eth_getTransactionByBlockHashAndIndex.json","openapi/polygon_node_api/chain_info/eth_syncing.json","openapi/polygon_node_api/chain_info/eth_chainId.json","openapi/polygon_node_api/debug_and_trace/debug_traceTransaction.json","openapi/polygon_node_api/debug_and_trace/debug_traceCall.json","openapi/polygon_node_api/debug_and_trace/debug_traceBlockByHash.json","openapi/polygon_node_api/debug_and_trace/debug_traceBlockByNumber.json","openapi/polygon_node_api/gas_data/eth_gasPrice.json","openapi/polygon_node_api/gas_data/eth_estimateGas.json","openapi/polygon_node_api/filter_handling/eth_getFilterChanges.json","openapi/polygon_node_api/filter_handling/eth_uninstallFilter.json","openapi/polygon_node_api/client_info/net_peerCount.json","openapi/polygon_node_api/client_info/net_listening.json","openapi/polygon_node_api/client_info/web3_clientVersion.json","openapi/polygon_node_api/blocks_info/eth_getBlockByNumber.json","openapi/polygon_node_api/blocks_info/eth_getBlockTransactionCountByHash.json","openapi/polygon_node_api/blocks_info/eth_blockNumber.json","openapi/polygon_node_api/blocks_info/eth_newBlockFilter.json","openapi/polygon_node_api/blocks_info/eth_getBlockByHash.json","openapi/polygon_node_api/blocks_info/eth_getBlockTransactionCountByNumber.json","openapi/polygon_node_api/account_info/eth_getStorageAt.json","openapi/polygon_node_api/account_info/eth_getBalance.json","openapi/polygon_node_api/account_info/eth_getTransactionCount.json","openapi/polygon_node_api/account_info/eth_getCode.json","openapi/polygon_node_api/logs_and_events/eth_newFilter.json","openapi/polygon_node_api/logs_and_events/eth_getLogs.json","openapi/polygon_node_api/execute_transactions/eth_call.json","openapi/polygon_node_api/execute_transactions/eth_sendRawTransaction.json","openapi/bnb_node_api/eth_getBlockByNumber.json","openapi/bnb_node_api/eth_getTransactionReceipt.json","openapi/bnb_node_api/eth_getStorageAt.json","openapi/bnb_node_api/eth_getTransactionByBlockNumberAndIndex.json","openapi/bnb_node_api/eth_getBlockTransactionCountByHash.json","openapi/bnb_node_api/eth_getBalance.json","openapi/bnb_node_api/net_peerCount.json","openapi/bnb_node_api/eth_gasPrice.json","openapi/bnb_node_api/trace_replayBlockTransactions.json","openapi/bnb_node_api/trace_callMany.json","openapi/bnb_node_api/eth_blockNumber.json","openapi/bnb_node_api/trace_get.json","openapi/bnb_node_api/net_listening.json","openapi/bnb_node_api/custom_js_tracer.json","openapi/bnb_node_api/eth_newBlockFilter.json","openapi/bnb_node_api/eth_getFilterChanges.json","openapi/bnb_node_api/debug_traceTransaction.json","openapi/bnb_node_api/eth_estimateGas.json","openapi/bnb_node_api/eth_getTransactionCount.json","openapi/bnb_node_api/eth_getBlockReceipts.json","openapi/bnb_node_api/debug_traceCall.json","openapi/bnb_node_api/trace_replayTransaction.json","openapi/bnb_node_api/eth_getTransactionByHash.json","openapi/bnb_node_api/eth_newPendingTransactionFilter.json","openapi/bnb_node_api/eth_syncing.json","openapi/bnb_node_api/trace_transaction.json","openapi/bnb_node_api/debug_traceBlockByHash.json","openapi/bnb_node_api/eth_getBlockByHash.json","openapi/bnb_node_api/eth_call.json","openapi/bnb_node_api/eth_chainId.json","openapi/bnb_node_api/trace_block.json","openapi/bnb_node_api/eth_getBlockTransactionCountByNumber.json","openapi/bnb_node_api/eth_uninstallFilter.json","openapi/bnb_node_api/trace_call.json","openapi/bnb_node_api/eth_getCode.json","openapi/bnb_node_api/eth_maxPriorityFeePerGas.json","openapi/bnb_node_api/web3_clientVersion.json","openapi/bnb_node_api/eth_getTransactionByBlockHashAndIndex.json","openapi/bnb_node_api/eth_newFilter.json","openapi/bnb_node_api/eth_getLogs.json","openapi/bnb_node_api/eth_getProof.json","openapi/bnb_node_api/debug_traceBlockByNumber.json","openapi/bnb_node_api/eth_sendRawTransaction.json","openapi/base_node_api/eth_protocolVersion.json","openapi/base_node_api/eth_getUncleByBlockNumberAndIndex.json","openapi/base_node_api/eth_getBlockByNumber.json","openapi/base_node_api/eth_getTransactionReceipt.json","openapi/base_node_api/eth_getStorageAt.json","openapi/base_node_api/debug_traceCallMany.json","openapi/base_node_api/eth_getTransactionByBlockNumberAndIndex.json","openapi/base_node_api/eth_getBlockTransactionCountByHash.json","openapi/base_node_api/eth_getUncleCountByBlockHash.json","openapi/base_node_api/eth_getBalance.json","openapi/base_node_api/eth_getRawTransactionByBlockNumberAndIndex.json","openapi/base_node_api/debug_getModifiedAccountsByNumber.json","openapi/base_node_api/eth_gasPrice.json","openapi/base_node_api/trace_replayBlockTransactions.json","openapi/base_node_api/eth_blockNumber.json","openapi/base_node_api/trace_get.json","openapi/base_node_api/eth_getFilterLogs.json","openapi/base_node_api/eth_getUncleCountByBlockNumber.json","openapi/base_node_api/eth_createAccessList.json","openapi/base_node_api/net_listening.json","openapi/base_node_api/eth_newBlockFilter.json","openapi/base_node_api/eth_getFilterChanges.json","openapi/base_node_api/debug_traceTransaction.json","openapi/base_node_api/eth_estimateGas.json","openapi/base_node_api/eth_getTransactionCount.json","openapi/base_node_api/eth_getBlockReceipts.json","openapi/base_node_api/debug_traceCall.json","openapi/base_node_api/trace_replayTransaction.json","openapi/base_node_api/eth_getTransactionByHash.json","openapi/base_node_api/eth_getRawTransactionByHash.json","openapi/base_node_api/eth_newPendingTransactionFilter.json","openapi/base_node_api/eth_syncing.json","openapi/base_node_api/trace_transaction.json","openapi/base_node_api/debug_traceBlockByHash.json","openapi/base_node_api/eth_accounts.json","openapi/base_node_api/eth_getBlockByHash.json","openapi/base_node_api/web3_sha3.json","openapi/base_node_api/eth_callMany.json","openapi/base_node_api/eth_call.json","openapi/base_node_api/eth_chainId.json","openapi/base_node_api/eth_feeHistory.json","openapi/base_node_api/trace_block.json","openapi/base_node_api/eth_getBlockTransactionCountByNumber.json","openapi/base_node_api/eth_uninstallFilter.json","openapi/base_node_api/debug_storageRangeAt.json","openapi/base_node_api/trace_call.json","openapi/base_node_api/eth_getCode.json","openapi/base_node_api/eth_maxPriorityFeePerGas.json","openapi/base_node_api/debug_getModifiedAccountsByHash.json","openapi/base_node_api/web3_clientVersion.json","openapi/base_node_api/trace_callMany_method.json","openapi/base_node_api/eth_getRawTransactionByBlockHashAndIndex.json","openapi/base_node_api/eth_getTransactionByBlockHashAndIndex.json","openapi/base_node_api/eth_getUncleByBlockHashAndIndex.json","openapi/base_node_api/eth_newFilter.json","openapi/base_node_api/eth_getLogs.json","openapi/base_node_api/eth_getProof.json","openapi/base_node_api/debug_traceBlockByNumber.json","openapi/base_node_api/eth_sendRawTransaction.json","openapi/base_node_api/eth_sendRawTransactionSync.json","openapi/avalanche_node_api/chain_info/eth_syncing.json","openapi/avalanche_node_api/chain_info/eth_chainId.json","openapi/avalanche_node_api/debug_and_trace/debug_traceTransaction.json","openapi/avalanche_node_api/debug_and_trace/debug_traceCall.json","openapi/avalanche_node_api/debug_and_trace/debug_traceBlockByHash.json","openapi/avalanche_node_api/debug_and_trace/debug_traceBlockByNumber.json","openapi/avalanche_node_api/gas_data/eth_gasPrice.json","openapi/avalanche_node_api/gas_data/eth_estimateGas.json","openapi/avalanche_node_api/transactions_info/eth_getTransactionReceipt.json","openapi/avalanche_node_api/transactions_info/eth_getTransactionByBlockNumberAndIndex.json","openapi/avalanche_node_api/transactions_info/eth_getTransactionByHash.json","openapi/avalanche_node_api/transactions_info/eth_newPendingTransactionFilter.json","openapi/avalanche_node_api/transactions_info/eth_getTransactionByBlockHashAndIndex.json","openapi/avalanche_node_api/filter_handling/eth_getFilterChanges.json","openapi/avalanche_node_api/filter_handling/eth_uninstallFilter.json","openapi/avalanche_node_api/client_info/net_listening.json","openapi/avalanche_node_api/client_info/web3_clientVersion.json","openapi/avalanche_node_api/blocks_info/eth_getBlockByNumber.json","openapi/avalanche_node_api/blocks_info/eth_getBlockTransactionCountByHash.json","openapi/avalanche_node_api/blocks_info/eth_blockNumber.json","openapi/avalanche_node_api/blocks_info/eth_newBlockFilter.json","openapi/avalanche_node_api/blocks_info/eth_getBlockByHash.json","openapi/avalanche_node_api/blocks_info/eth_getBlockTransactionCountByNumber.json","openapi/avalanche_node_api/accounts_info/eth_getStorageAt.json","openapi/avalanche_node_api/accounts_info/eth_getBalance.json","openapi/avalanche_node_api/accounts_info/eth_getTransactionCount.json","openapi/avalanche_node_api/accounts_info/eth_getCode.json","openapi/avalanche_node_api/logs_and_events/eth_newFilter.json","openapi/avalanche_node_api/logs_and_events/eth_getLogs.json","openapi/avalanche_node_api/execute_transactions/eth_call.json","openapi/avalanche_node_api/execute_transactions/eth_sendRawTransaction.json","openapi/ton_node_api/v2/getMasterchainBlockSignatures.json","openapi/ton_node_api/v2/getBlockTransactionsExt.json","openapi/ton_node_api/v2/runGetMethod.json","openapi/ton_node_api/v2/getAddressState.json","openapi/ton_node_api/v2/unpackAddress.json","openapi/ton_node_api/v2/lookupBlock.json","openapi/ton_node_api/v2/tryLocateTx.json","openapi/ton_node_api/v2/tryLocateResultTx.json","openapi/ton_node_api/v2/getTransactions.json","openapi/ton_node_api/v2/packAddress.json","openapi/ton_node_api/v2/getExtendedAddressInformation.json","openapi/ton_node_api/v2/getBlockHeader.json","openapi/ton_node_api/v2/getMasterchainInfo.json","openapi/ton_node_api/v2/getWalletInformation.json","openapi/ton_node_api/v2/tryLocateSourceTx.json","openapi/ton_node_api/v2/getBlockTransactions.json","openapi/ton_node_api/v2/getAddressInformation.json","openapi/ton_node_api/v2/detectAddress.json","openapi/ton_node_api/v2/getShardBlockProof.json","openapi/ton_node_api/v2/getAddressBalance.json","openapi/ton_node_api/v2/getConsensusBlock.json","openapi/ton_node_api/v2/shards.json","openapi/ton_node_api/v2/getConfigParam.json","openapi/ton_node_api/v2/getTokenData.json","openapi/ton_node_api/v3/runGetMethod.json","openapi/ton_node_api/v3/getNFTTransfers.json","openapi/ton_node_api/v3/getMasterchainBlockShardState.json","openapi/ton_node_api/v3/getNFTItems.json","openapi/ton_node_api/v3/getWalletInfo.json","openapi/ton_node_api/v3/getTransactions.json","openapi/ton_node_api/v3/getTransactionsByMasterchainBlock.json","openapi/ton_node_api/v3/getMasterchainInfo.json","openapi/ton_node_api/v3/estimateFee.json","openapi/ton_node_api/v3/getAdjacentTransactions.json","openapi/ton_node_api/v3/getTransactionsByMessage.json","openapi/ton_node_api/v3/getJettonMasters.json","openapi/ton_node_api/v3/getNFTCollections.json","openapi/ton_node_api/v3/getJettonWallets.json","openapi/ton_node_api/v3/getBlocks.json","openapi/ton_node_api/v3/getJettonTransfers.json","openapi/ton_node_api/v3/getAccountInfo.json","openapi/ton_node_api/v3/getAddressBookInfo.json","openapi/ton_node_api/v3/getMessages.json","openapi/ton_node_api/v3/getJettonBurns.json","openapi/ton_node_api/v3/getMasterchainBlockShards.json","openapi/arbitrum_node_api/transaction_info/eth_getTransactionReceipt.json","openapi/arbitrum_node_api/transaction_info/eth_getTransactionByBlockNumberAndIndex.json","openapi/arbitrum_node_api/transaction_info/eth_getTransactionByHash.json","openapi/arbitrum_node_api/transaction_info/eth_getTransactionByBlockHashAndIndex.json","openapi/arbitrum_node_api/transaction_info/eth_simulateV1.json","openapi/arbitrum_node_api/chain_info/eth_syncing.json","openapi/arbitrum_node_api/chain_info/eth_chainId.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_callMany.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_transaction.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_filter.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_replayBlockTransactions.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_get.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_replayTransaction.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_block.json","openapi/arbitrum_node_api/debug_and_trace/arbtrace_call.json","openapi/arbitrum_node_api/gas_data/eth_gasPrice.json","openapi/arbitrum_node_api/gas_data/eth_estimateGas.json","openapi/arbitrum_node_api/filter_handling/eth_getFilterChanges.json","openapi/arbitrum_node_api/filter_handling/eth_uninstallFilter.json","openapi/arbitrum_node_api/client_info/web3_clientVersion.json","openapi/arbitrum_node_api/blocks_info/eth_getBlockByNumber.json","openapi/arbitrum_node_api/blocks_info/eth_getBlockTransactionCountByHash.json","openapi/arbitrum_node_api/blocks_info/eth_blockNumber.json","openapi/arbitrum_node_api/blocks_info/eth_newBlockFilter.json","openapi/arbitrum_node_api/blocks_info/eth_getBlockByHash.json","openapi/arbitrum_node_api/blocks_info/eth_getBlockTransactionCountByNumber.json","openapi/arbitrum_node_api/accounts_info/eth_getStorageAt.json","openapi/arbitrum_node_api/accounts_info/eth_getBalance.json","openapi/arbitrum_node_api/accounts_info/eth_getTransactionCount.json","openapi/arbitrum_node_api/accounts_info/eth_getCode.json","openapi/arbitrum_node_api/logs_and_events/eth_newFilter.json","openapi/arbitrum_node_api/logs_and_events/eth_getLogs.json","openapi/arbitrum_node_api/execute_transactions/eth_call.json","openapi/arbitrum_node_api/execute_transactions/eth_sendRawTransaction.json","openapi/zksync_node_api/zks_getTestnetPaymaster.json","openapi/zksync_node_api/zks_estimateFee.json","openapi/zksync_node_api/zks_estimateGasL1ToL2.json","openapi/zksync_node_api/zks_getBytecodeByHash.json","openapi/zksync_node_api/zks_getMainContract.json","openapi/zksync_node_api/zks_L1ChainId.json","openapi/zksync_node_api/zks_getBlockDetails.json","openapi/zksync_node_api/zks_getBridgeContracts.json","openapi/zksync_node_api/zks_getL2ToL1LogProof.json","openapi/zksync_node_api/zks_getAllAccountBalances.json","openapi/zksync_node_api/zks_L1BatchNumber.json","openapi/zksync_node_api/zks_getL1BatchBlockRange.json","openapi/zksync_node_api/zks_getL1BatchDetails.json","openapi/zksync_node_api/zks_getTransactionDetails.json","openapi/zksync_node_api/zks_getRawBlockTransactions.json","openapi/optimism_node_api/eth_getBlockByNumber.json","openapi/optimism_node_api/eth_getTransactionReceipt.json","openapi/optimism_node_api/eth_getStorageAt.json","openapi/optimism_node_api/debug_traceCallMany.json","openapi/optimism_node_api/eth_getTransactionByBlockNumberAndIndex.json","openapi/optimism_node_api/eth_getBlockTransactionCountByHash.json","openapi/optimism_node_api/eth_getUncleCountByBlockHash.json","openapi/optimism_node_api/eth_getBalance.json","openapi/optimism_node_api/eth_getRawTransactionByBlockNumberAndIndex.json","openapi/optimism_node_api/debug_getModifiedAccountsByNumber.json","openapi/optimism_node_api/eth_gasPrice.json","openapi/optimism_node_api/eth_blockNumber.json","openapi/optimism_node_api/eth_getFilterLogs.json","openapi/optimism_node_api/eth_getUncleCountByBlockNumber.json","openapi/optimism_node_api/eth_createAccessList.json","openapi/optimism_node_api/net_listening.json","openapi/optimism_node_api/eth_newBlockFilter.json","openapi/optimism_node_api/eth_getFilterChanges.json","openapi/optimism_node_api/debug_traceTransaction.json","openapi/optimism_node_api/eth_estimateGas.json","openapi/optimism_node_api/eth_getTransactionCount.json","openapi/optimism_node_api/eth_getBlockReceipts.json","openapi/optimism_node_api/debug_traceCall.json","openapi/optimism_node_api/eth_getTransactionByHash.json","openapi/optimism_node_api/eth_getRawTransactionByHash.json","openapi/optimism_node_api/eth_syncing.json","openapi/optimism_node_api/debug_traceBlockByHash.json","openapi/optimism_node_api/eth_getBlockByHash.json","openapi/optimism_node_api/web3_sha3.json","openapi/optimism_node_api/eth_callMany.json","openapi/optimism_node_api/eth_call.json","openapi/optimism_node_api/eth_chainId.json","openapi/optimism_node_api/eth_feeHistory.json","openapi/optimism_node_api/eth_getBlockTransactionCountByNumber.json","openapi/optimism_node_api/eth_uninstallFilter.json","openapi/optimism_node_api/debug_storageRangeAt.json","openapi/optimism_node_api/eth_getCode.json","openapi/optimism_node_api/eth_maxPriorityFeePerGas.json","openapi/optimism_node_api/debug_getModifiedAccountsByHash.json","openapi/optimism_node_api/web3_clientVersion.json","openapi/optimism_node_api/eth_getRawTransactionByBlockHashAndIndex.json","openapi/optimism_node_api/eth_getTransactionByBlockHashAndIndex.json","openapi/optimism_node_api/eth_newFilter.json","openapi/optimism_node_api/eth_getLogs.json","openapi/optimism_node_api/eth_getProof.json","openapi/optimism_node_api/debug_traceBlockByNumber.json","openapi/optimism_node_api/eth_sendRawTransaction.json","openapi/solana_node_api/getLatestBlockhash.json","openapi/solana_node_api/getRecentPrioritizationFees.json","openapi/solana_node_api/getInflationRate.json","openapi/solana_node_api/getBlockProduction.json","openapi/solana_node_api/getHighestSnapshotSlot.json","openapi/solana_node_api/getMaxShredInsertSlot.json","openapi/solana_node_api/getFirstAvailableBlock.json","openapi/solana_node_api/getBlockTime.json","openapi/solana_node_api/getMinimumBalanceForRentExemption.json","openapi/solana_node_api/getProgramAccounts.json","openapi/solana_node_api/getBlock.json","openapi/solana_node_api/getInflationReward.json","openapi/solana_node_api/getFeeForMessage.json","openapi/solana_node_api/getClusterNodes.json","openapi/solana_node_api/getStakeMinimumDelegation.json","openapi/solana_node_api/getTokenAccountsByOwner.json","openapi/solana_node_api/simulateTransaction.json","openapi/solana_node_api/sendTransaction.json","openapi/solana_node_api/getTransactionCount.json","openapi/solana_node_api/getVersion.json","openapi/solana_node_api/getVoteAccounts.json","openapi/solana_node_api/getSlotLeaders.json","openapi/solana_node_api/minimumLedgerSlot.json","openapi/solana_node_api/getTokenSupply.json","openapi/solana_node_api/getTokenAccountsByDelegate.json","openapi/solana_node_api/getHealth.json","openapi/solana_node_api/getGenesisHash.json","openapi/solana_node_api/getSignaturesForAddress.json","openapi/solana_node_api/isBlockhashValid.json","openapi/solana_node_api/getRecentBlockhash.json","openapi/solana_node_api/getBalance.json","openapi/solana_node_api/getSignatureStatuses.json","openapi/solana_node_api/getLeaderSchedule.json","openapi/solana_node_api/getSlotLeader.json","openapi/solana_node_api/getEpochInfo.json","openapi/solana_node_api/getEpochSchedule.json","openapi/solana_node_api/getTokenAccountBalance.json","openapi/solana_node_api/getLargestAccounts.json","openapi/solana_node_api/getRecentPerformanceSamples.json","openapi/solana_node_api/getSupply.json","openapi/solana_node_api/getBlocks.json","openapi/solana_node_api/getInflationGovernor.json","openapi/solana_node_api/getIdentity.json","openapi/solana_node_api/getAccountInfo.json","openapi/solana_node_api/getTokenLargestAccounts.json","openapi/solana_node_api/getBlockCommitment.json","openapi/solana_node_api/getMaxRetransmitSlot.json","openapi/solana_node_api/getMultipleAccounts.json","openapi/solana_node_api/getSlot.json","openapi/solana_node_api/getBlockHeight.json","openapi/solana_node_api/getTransaction.json","openapi/solana_node_api/getBlocksWithLimit.json","openapi/ronin_node_api/eth_getBlockByNumber.json","openapi/ronin_node_api/eth_getTransactionReceipt.json","openapi/ronin_node_api/eth_getStorageAt.json","openapi/ronin_node_api/eth_getTransactionByBlockNumberAndIndex.json","openapi/ronin_node_api/eth_getBlockTransactionCountByHash.json","openapi/ronin_node_api/eth_getBalance.json","openapi/ronin_node_api/net_peerCount.json","openapi/ronin_node_api/eth_gasPrice.json","openapi/ronin_node_api/eth_blockNumber.json","openapi/ronin_node_api/net_listening.json","openapi/ronin_node_api/eth_newBlockFilter.json","openapi/ronin_node_api/eth_getFilterChanges.json","openapi/ronin_node_api/debug_traceTransaction.json","openapi/ronin_node_api/eth_estimateGas.json","openapi/ronin_node_api/eth_getTransactionCount.json","openapi/ronin_node_api/debug_traceCall.json","openapi/ronin_node_api/eth_getTransactionByHash.json","openapi/ronin_node_api/eth_syncing.json","openapi/ronin_node_api/debug_traceBlockByHash.json","openapi/ronin_node_api/eth_getBlockByHash.json","openapi/ronin_node_api/eth_call.json","openapi/ronin_node_api/eth_chainId.json","openapi/ronin_node_api/eth_getBlockTransactionCountByNumber.json","openapi/ronin_node_api/eth_uninstallFilter.json","openapi/ronin_node_api/eth_getCode.json","openapi/ronin_node_api/eth_maxPriorityFeePerGas.json","openapi/ronin_node_api/web3_clientVersion.json","openapi/ronin_node_api/eth_getTransactionByBlockHashAndIndex.json","openapi/ronin_node_api/eth_newFilter.json","openapi/ronin_node_api/eth_getLogs.json","openapi/ronin_node_api/debug_traceBlockByNumber.json","openapi/ronin_node_api/eth_sendRawTransaction.json","openapi/gnosis_node_api/transaction_info/eth_getTransactionReceipt.json","openapi/gnosis_node_api/transaction_info/eth_getTransactionByBlockNumberAndIndex.json","openapi/gnosis_node_api/transaction_info/eth_getTransactionByHash.json","openapi/gnosis_node_api/transaction_info/eth_newPendingTransactionFilter.json","openapi/gnosis_node_api/transaction_info/eth_getTransactionByBlockHashAndIndex.json","openapi/gnosis_node_api/chain_info/eth_syncing.json","openapi/gnosis_node_api/chain_info/eth_chainId.json","openapi/gnosis_node_api/gas_data/eth_gasPrice.json","openapi/gnosis_node_api/gas_data/eth_estimateGas.json","openapi/gnosis_node_api/filter_handling/eth_getFilterChanges.json","openapi/gnosis_node_api/filter_handling/eth_uninstallFilter.json","openapi/gnosis_node_api/client_info/net_peerCount.json","openapi/gnosis_node_api/client_info/net_listening.json","openapi/gnosis_node_api/client_info/web3_clientVersion.json","openapi/gnosis_node_api/blocks_info/eth_getBlockByNumber.json","openapi/gnosis_node_api/blocks_info/eth_getBlockTransactionCountByHash.json","openapi/gnosis_node_api/blocks_info/eth_blockNumber.json","openapi/gnosis_node_api/blocks_info/eth_newBlockFilter.json","openapi/gnosis_node_api/blocks_info/eth_getBlockByHash.json","openapi/gnosis_node_api/blocks_info/eth_getBlockTransactionCountByNumber.json","openapi/gnosis_node_api/accounts_info/eth_getStorageAt.json","openapi/gnosis_node_api/accounts_info/eth_getBalance.json","openapi/gnosis_node_api/accounts_info/eth_getTransactionCount.json","openapi/gnosis_node_api/accounts_info/eth_getCode.json","openapi/gnosis_node_api/logs_and_events/eth_newFilter.json","openapi/gnosis_node_api/logs_and_events/eth_getLogs.json","openapi/gnosis_node_api/execute_transactions/eth_call.json","openapi/gnosis_node_api/execute_transactions/eth_sendRawTransaction.json","openapi/cronos_node_api/eth_getBlockByNumber.json","openapi/cronos_node_api/eth_getTransactionReceipt.json","openapi/cronos_node_api/eth_getStorageAt.json","openapi/cronos_node_api/eth_getTransactionByBlockNumberAndIndex.json","openapi/cronos_node_api/eth_getBlockTransactionCountByHash.json","openapi/cronos_node_api/eth_getBalance.json","openapi/cronos_node_api/net_peerCount.json","openapi/cronos_node_api/eth_gasPrice.json","openapi/cronos_node_api/eth_blockNumber.json","openapi/cronos_node_api/net_listening.json","openapi/cronos_node_api/eth_newBlockFilter.json","openapi/cronos_node_api/eth_getFilterChanges.json","openapi/cronos_node_api/eth_estimateGas.json","openapi/cronos_node_api/eth_getTransactionCount.json","openapi/cronos_node_api/eth_getTransactionByHash.json","openapi/cronos_node_api/eth_newPendingTransactionFilter.json","openapi/cronos_node_api/eth_syncing.json","openapi/cronos_node_api/eth_getBlockByHash.json","openapi/cronos_node_api/eth_call.json","openapi/cronos_node_api/eth_chainId.json","openapi/cronos_node_api/eth_getBlockTransactionCountByNumber.json","openapi/cronos_node_api/eth_uninstallFilter.json","openapi/cronos_node_api/eth_getCode.json","openapi/cronos_node_api/eth_maxPriorityFeePerGas.json","openapi/cronos_node_api/web3_clientVersion.json","openapi/cronos_node_api/eth_getTransactionByBlockHashAndIndex.json","openapi/cronos_node_api/eth_newFilter.json","openapi/cronos_node_api/eth_getLogs.json","openapi/cronos_node_api/eth_getProof.json","openapi/cronos_node_api/eth_sendRawTransaction.json","openapi/fantom_node_api/eth_getBlockByNumber.json","openapi/fantom_node_api/eth_getTransactionReceipt.json","openapi/fantom_node_api/eth_getStorageAt.json","openapi/fantom_node_api/eth_getTransactionByBlockNumberAndIndex.json","openapi/fantom_node_api/eth_getBlockTransactionCountByHash.json","openapi/fantom_node_api/eth_getBalance.json","openapi/fantom_node_api/net_peerCount.json","openapi/fantom_node_api/eth_gasPrice.json","openapi/fantom_node_api/eth_blockNumber.json","openapi/fantom_node_api/net_listening.json","openapi/fantom_node_api/eth_newBlockFilter.json","openapi/fantom_node_api/eth_getFilterChanges.json","openapi/fantom_node_api/eth_estimateGas.json","openapi/fantom_node_api/eth_getTransactionCount.json","openapi/fantom_node_api/eth_getTransactionByHash.json","openapi/fantom_node_api/eth_newPendingTransactionFilter.json","openapi/fantom_node_api/eth_syncing.json","openapi/fantom_node_api/eth_getBlockByHash.json","openapi/fantom_node_api/eth_call.json","openapi/fantom_node_api/eth_chainId.json","openapi/fantom_node_api/eth_getBlockTransactionCountByNumber.json","openapi/fantom_node_api/eth_uninstallFilter.json","openapi/fantom_node_api/eth_getCode.json","openapi/fantom_node_api/eth_maxPriorityFeePerGas.json","openapi/fantom_node_api/web3_clientVersion.json","openapi/fantom_node_api/eth_getTransactionByBlockHashAndIndex.json","openapi/fantom_node_api/eth_newFilter.json","openapi/fantom_node_api/eth_getLogs.json","openapi/fantom_node_api/eth_getProof.json","openapi/fantom_node_api/eth_sendRawTransaction.json","openapi/bitcoin_node_api/prioritisetransaction.json","openapi/bitcoin_node_api/getblockfilter.json","openapi/bitcoin_node_api/getrawtransaction.json","openapi/bitcoin_node_api/getchaintxstats.json","openapi/bitcoin_node_api/getnetworkhashps.json","openapi/bitcoin_node_api/decodescript.json","openapi/bitcoin_node_api/getnettotals.json","openapi/bitcoin_node_api/getmininginfo.json","openapi/bitcoin_node_api/getnodeaddresses.json","openapi/bitcoin_node_api/verifychain.json","openapi/bitcoin_node_api/getmempooldescendants.json","openapi/bitcoin_node_api/getblockchaininfo.json","openapi/bitcoin_node_api/getblockheader.json","openapi/bitcoin_node_api/decoderawtransaction.json","openapi/bitcoin_node_api/getmempoolentry.json","openapi/bitcoin_node_api/getpeerinfo.json","openapi/bitcoin_node_api/getrpcinfo.json","openapi/bitcoin_node_api/getmempoolancestors.json","openapi/bitcoin_node_api/preciousblock.json","openapi/bitcoin_node_api/validateaddress.json","openapi/bitcoin_node_api/getbestblockhash.json","openapi/bitcoin_node_api/getmempoolinfo.json","openapi/bitcoin_node_api/gettxoutproof.json","openapi/bitcoin_node_api/getmemoryinfo.json","openapi/bitcoin_node_api/getblocktemplate.json","openapi/bitcoin_node_api/getblock.json","openapi/bitcoin_node_api/getblockstats.json","openapi/bitcoin_node_api/gettxout.json","openapi/bitcoin_node_api/getchaintips.json","openapi/bitcoin_node_api/getblockhash.json","openapi/bitcoin_node_api/getdifficulty.json","openapi/bitcoin_node_api/verifytxoutproof.json","openapi/bitcoin_node_api/getconnectioncount.json","openapi/bitcoin_node_api/getrawmempool.json","openapi/bitcoin_node_api/uptime.json","openapi/bitcoin_node_api/getnetworkinfo.json","openapi/bitcoin_node_api/estimatesmartfee.json","openapi/bitcoin_node_api/gettxoutsetinfo.json","openapi/starknet_node_api/starknet_getStorageAt.json","openapi/starknet_node_api/starknet_getTransactionByHash.json","openapi/starknet_node_api/starknet_simulateTransactions.json","openapi/starknet_node_api/starknet_estimateFee.json","openapi/starknet_node_api/starknet_getClassAt.json","openapi/starknet_node_api/starknet_estimateMessageFee.json","openapi/starknet_node_api/starknet_call.json","openapi/starknet_node_api/starknet_traceBlockTransactions.json","openapi/starknet_node_api/starknet_getTransactionByBlockIdAndIndex.json","openapi/starknet_node_api/starknet_getClassHashAt.json","openapi/starknet_node_api/starknet_getNonce.json","openapi/faucet_api/transaction_history.json","openapi/faucet_api/get_tokens.json","openapi/plasma_node_api/accounts_info/eth_getBalance.json","openapi/plasma_node_api/accounts_info/eth_getCode.json","openapi/plasma_node_api/accounts_info/eth_getStorageAt.json","openapi/plasma_node_api/accounts_info/eth_getTransactionCount.json","openapi/plasma_node_api/accounts_info/eth_getProof.json","openapi/plasma_node_api/accounts_info/eth_getAccount.json","openapi/plasma_node_api/blocks_info/eth_blockNumber.json","openapi/plasma_node_api/blocks_info/eth_getBlockByNumber.json","openapi/plasma_node_api/blocks_info/eth_getBlockByHash.json","openapi/plasma_node_api/blocks_info/eth_getBlockTransactionCountByNumber.json","openapi/plasma_node_api/blocks_info/eth_getBlockTransactionCountByHash.json","openapi/plasma_node_api/blocks_info/eth_getBlockReceipts.json","openapi/plasma_node_api/blocks_info/eth_getUncleCountByBlockNumber.json","openapi/plasma_node_api/blocks_info/eth_getUncleCountByBlockHash.json","openapi/plasma_node_api/blocks_info/eth_getUncleByBlockNumberAndIndex.json","openapi/plasma_node_api/blocks_info/eth_getUncleByBlockHashAndIndex.json","openapi/plasma_node_api/blocks_info/eth_getHeaderByNumber.json","openapi/plasma_node_api/blocks_info/eth_getHeaderByHash.json","openapi/plasma_node_api/transaction_info/eth_getTransactionByHash.json","openapi/plasma_node_api/transaction_info/eth_getTransactionReceipt.json","openapi/plasma_node_api/transaction_info/eth_getTransactionByBlockNumberAndIndex.json","openapi/plasma_node_api/transaction_info/eth_getTransactionByBlockHashAndIndex.json","openapi/plasma_node_api/transaction_info/eth_getRawTransactionByHash.json","openapi/plasma_node_api/transaction_info/eth_getRawTransactionByBlockNumberAndIndex.json","openapi/plasma_node_api/transaction_info/eth_getRawTransactionByBlockHashAndIndex.json","openapi/plasma_node_api/transaction_info/eth_getTransactionBySenderAndNonce.json","openapi/plasma_node_api/execute_transactions/eth_call.json","openapi/plasma_node_api/execute_transactions/eth_estimateGas.json","openapi/plasma_node_api/execute_transactions/eth_createAccessList.json","openapi/plasma_node_api/execute_transactions/eth_simulateV1.json","openapi/plasma_node_api/gas_data/eth_gasPrice.json","openapi/plasma_node_api/gas_data/eth_maxPriorityFeePerGas.json","openapi/plasma_node_api/gas_data/eth_feeHistory.json","openapi/plasma_node_api/gas_data/eth_blobBaseFee.json","openapi/plasma_node_api/chain_info/eth_chainId.json","openapi/plasma_node_api/chain_info/eth_syncing.json","openapi/plasma_node_api/chain_info/eth_protocolVersion.json","openapi/plasma_node_api/chain_info/eth_accounts.json","openapi/plasma_node_api/chain_info/eth_hashrate.json","openapi/plasma_node_api/filter_handling/eth_newFilter.json","openapi/plasma_node_api/filter_handling/eth_newBlockFilter.json","openapi/plasma_node_api/filter_handling/eth_newPendingTransactionFilter.json","openapi/plasma_node_api/filter_handling/eth_uninstallFilter.json","openapi/plasma_node_api/logs_and_events/eth_getLogs.json","openapi/plasma_node_api/client_info/web3_clientVersion.json","openapi/plasma_node_api/client_info/web3_sha3.json","openapi/plasma_node_api/client_info/net_version.json","openapi/plasma_node_api/client_info/net_listening.json","openapi/plasma_node_api/client_info/net_peerCount.json","openapi/plasma_node_api/debug_and_trace/debug_getRawHeader.json","openapi/plasma_node_api/debug_and_trace/debug_getRawBlock.json","openapi/plasma_node_api/debug_and_trace/debug_getRawTransaction.json","openapi/plasma_node_api/debug_and_trace/debug_getRawReceipts.json","openapi/plasma_node_api/debug_and_trace/debug_traceCall.json","openapi/plasma_node_api/debug_and_trace/trace_call.json","openapi/plasma_node_api/debug_and_trace/trace_callMany.json","openapi/plasma_node_api/debug_and_trace/trace_replayBlockTransactions.json","openapi/plasma_node_api/debug_and_trace/trace_block.json","openapi/plasma_node_api/debug_and_trace/trace_get.json"]},"appearance":{"default":"light"},"background":{"decoration":"gradient","color":{"dark":"#000020"}},"navbar":{"links":[],"primary":{"type":"button","label":"Start for free","href":"https://console.chainstack.com/user/account/create"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/chainstack","x":"https://x.com/ChainstackHQ","discord":"https://discord.gg/Cymtg2f7pX","telegram":"https://t.me/chainstack","facebook":"https://www.facebook.com/chainstack","youtube":"https://www.youtube.com/c/Chainstack"},"links":[{"header":"Platform","items":[{"label":"Solution","href":"https://chainstack.com/solution"},{"label":"Pricing","href":"https://chainstack.com/pricing"},{"label":"Enterprise","href":"https://chainstack.com/enterprise"},{"label":"Customers","href":"https://chainstack.com/customers"},{"label":"Marketplace","href":"https://chainstack.com/marketplace"},{"label":"Hosting","href":"https://chainstack.com/hosting"},{"label":"Chainstack Cloud","href":"https://chainstack.com/chainstack-cloud"}]},{"header":"Developers","items":[{"label":"Login","href":"https://console.chainstack.com/user/account"},{"label":"Sign up","href":"https://console.chainstack.com/user/account"},{"label":"Faucets","href":"https://chainstack.com/faucets"},{"label":"Labs","href":"https://chainstack.com/labs"},{"label":"Status","href":"https://status.chainstack.com/"}]},{"header":"Company","items":[{"label":"About us","href":"https://chainstack.com/about"},{"label":"Contact us","href":"https://chainstack.com/contact"},{"label":"Careers","href":"https://chainstack.bamboohr.com/jobs"},{"label":"Ambassadors","href":"https://chainstack.com/chainstack-ambassadors-program"},{"label":"Labs","href":"https://chainstack.com/labs"},{"label":"Security","href":"https://chainstack.com/security"},{"label":"SLA","href":"https://chainstack.com/enterprise-support-sla"}]},{"header":"Support","items":[{"label":"Help center","href":"https://support.chainstack.com/hc/en-us"},{"label":"Developer portal","href":"https://docs.chainstack.com/"},{"label":"Terms of service","href":"https://chainstack.com/tos"},{"label":"Privacy policy","href":"https://chainstack.com/privacy"}]}]},"seo":{"metatags":{"og:site_name":"Chainstack Developer Portal"}},"fonts":{"heading":{"family":"Poppins"},"body":{"family":"Inter"}},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-WMRDXP6"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","grok","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"global":{"anchors":[{"anchor":"MCP","icon":"plug","href":"/docs/chainstack-mcp-server"},{"anchor":"llms-full.txt","icon":"brain","href":"https://docs.chainstack.com/llms-full.txt"},{"anchor":"Status","icon":"signal","href":"https://status.chainstack.com/"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/Cymtg2f7pX"},{"anchor":"Telegram","icon":"telegram","href":"https://t.me/chainstack"},{"anchor":"Blog","icon":"newspaper","href":"https://chainstack.com/blog/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chainstack","hasAudioNarration":false,"actualSubdomain":"chainstack","customDomains":["docs.chainstack.com"],"gitSource":{"type":"github","owner":"chainstack","repo":"dev-portal","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae19cacf9cefd8f8d793453","collectionId":"62634df7-921a-496e-bda7-badff338524b","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae19cacf9cefd8f8d793453"},"feedback":{"edits":true,"thumbs":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae19cacf9cefd8f8d793453","clientVersion":"0.0.4005","searchFilterCounts":[{"language":"default","tag":"Cloud","count":2171},{"language":"default","tag":"API","count":1571},{"language":"default","tag":"Node APIs","count":1522},{"language":"default","tag":"Guides","count":392},{"language":"default","tag":"Release notes","count":259},{"language":"default","tag":"Web3 [de]coded","count":229},{"language":"default","tag":"Hyperliquid node API","count":215},{"language":"default","tag":"TRON node API","count":155},{"language":"default","tag":"Protocols","count":113},{"language":"default","tag":"Arc node API","count":87}],"searchSettings":{"maxResults":50}},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"docs/ethereum-how-to-analyze-pending-blocks","slug":"/docs/ethereum-how-to-analyze-pending-blocks","pageMetadata":{"title":"Ethereum: How to analyze pending blocks","description":"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.","href":"/docs/ethereum-how-to-analyze-pending-blocks"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,Check,CodeBlock,CodeGroup,Heading,Icon,Info,Table,Visibility}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Icon)_missingMdxReference(`Icon`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Visibility)_missingMdxReference(`Visibility`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`TLDR:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What is a pending block?`}),` It’s the block a node (whether proposer or not) believes will be next in line for inclusion on the chain. A proposer’s pending block is built from their local mempool and is what they’ll broadcast. A non-proposer’s pending block, however, is only a “best guess” since the proposer might have a different mempool or prioritization strategy.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`How does Geth create it?`}),` Up to version 1.14.0, Geth continuously managed a pending block in the background, updating it as new transactions arrived. Now, Geth builds a pending block on demand, caches it briefly (2 seconds by default), then discards or updates it when a new block is published or if a reorg happens.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Why do transaction sets differ?`}),` Nodes prioritize local transactions first (if they meet gas requirements) and then sort remote ones by their effective gas tip. The block proposer might see different transactions altogether and order them differently based on fees, local config, or simply having a newer view of the mempool.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What does the code show?`}),` By comparing the “pending” block to the finalized block with the same block number, you can see which transactions made it and how their positions changed. In practice, you’ll often find:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Some transactions in the pending block don’t appear in the finalized block.`}),`\n`,_jsx(_components.li,{children:`The finalized block may include additional transactions.`}),`\n`,_jsx(_components.li,{children:`Transaction orders may differ because the proposer’s actual block can diverge from your local pending snapshot.`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`main-article`,children:`Main article`}),`\n`,_jsx(_components.p,{children:`Overall, monitoring the pending block gives insights into potential arbitrage or flash loan opportunities, but it’s never a hard guarantee that your transactions will be included exactly as you see them.`}),`\n`,_jsx(_components.p,{children:`In the Ethereum blockchain, understanding the concept of a pending block is crucial for seizing arbitrage opportunities, executing flash loans, and managing risks. Monitoring pending blocks allows users to identify large transactions or price discrepancies across decentralized exchanges.`}),`\n`,_jsxs(_components.p,{children:[`When a user queries the pending block through a node client, several processes occur under the hood to assemble and manage this block. Since Geth stays `,_jsx(_components.a,{href:`https://www.ethernodes.org/`,children:`the most popular Ethereum execution client`}),`, let’s explore how Geth specifically constructs the pending block.`]}),`\n`,_jsx(Visibility,{for:`humans`,children:_jsxs(Check,{children:[_jsx(Heading,{level:`3`,id:`run-ethereum-nodes-on-chainstack`,children:`Run Ethereum nodes on Chainstack`}),_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://console.chainstack.com/`,children:`Start for free`}),` and get your app to production levels immediately. No credit card required. You can sign up with your GitHub, X, Google, or Microsoft account.`]})]})}),`\n`,_jsx(Heading,{level:`2`,id:`introduction`,children:`Introduction`}),`\n`,_jsxs(_components.p,{children:[`The pending tag of blocks allows developers to get information on the transactions expected to be included in the next block. According to the `,_jsx(_components.a,{href:`https://github.com/ethereum/execution-apis/blob/main/src/schemas/block.yaml`,children:`JSON-RPC specification`}),` for Ethereum clients, there are five block tags that the clients must use:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Earliest`}),`. Refers to the lowest numbered block available to the client.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pending`}),`. Refers to the next block anticipated by the client, built atop the latest and including transactions typically sourced from the local mempool.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Latest`}),`. Points to the most recent block in the client’s observed canonical chain, subject to potential reorganizations even under normal conditions.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Safe`}),`. Represents the latest block secure from reorganizations under assumptions of an honest majority and specific synchronicity conditions.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Finalized`}),`. Denotes the most recent crypto-economically secure block, immune to reorganizations except under manual intervention coordinated by the community.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`It must be noted that if the node is a block proposer, then the pending block is the one the node intends to broadcast later. This pending block is built using the latest transactions from the local mempool, prioritized, and validated according to the consensus rules.`}),`\n`,_jsxs(_components.p,{children:[`On the other hand, if the node is not a block proposer (whether it is a validator or a non-validator), the pending block still consists of transactions from the local mempool. However, these transactions are included based on the node’s expectations of what might be in the next block, but there is no guarantee that these transactions will be included. `,_jsx(_components.strong,{children:`The actual inclusion of transactions depends on the block proposer who might have a different mempool state and transaction selection criteria.`})]}),`\n`,_jsx(Heading,{level:`2`,id:`geth-implementation`,children:`Geth implementation`}),`\n`,_jsxs(_components.p,{children:[`Let’s explore the pending block on the example of the Geth execution client. Recently, `,_jsx(_components.a,{href:`https://github.com/ethereum/go-ethereum/releases/tag/v1.14.0`,children:`the client has been updated`}),` and a pending block is created upon request (whenever this block tag is used) and cached for a period set in the pendingTTL (time-to-live) property of the miner (`,_jsx(_components.a,{href:`https://github.com/ethereum/go-ethereum/blob/master/miner/pending.go`,children:`currently, it’s set to 2 sec`}),`).`]}),`\n`,_jsxs(_components.p,{children:[`Before the update, the pending block was managed continuously in the background. Geth would keep updating the pending block as new transactions arrived in the mempool, and the state of the blockchain changed. To check which client version you are connected to, you can use the `,_jsx(_components.a,{href:`/reference/ethereum-clientversion`,children:`web3_clientVersion RPC method`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Let’s examine the lifecycle of the pending block before the update has been introduced (Geth \u003c 1.14.0). The component of the Geth client that is responsible for managing the pending block is `,_jsx(_components.a,{href:`https://github.com/ethereum/go-ethereum/blob/v1.13.15/miner/worker.go`,children:`the miner`}),`.`]}),`\n`,_jsx(_components.p,{children:`After receiving the request to interact with a pending block, the Geth checks if a pending block is already available and up-to-date. If it is not available, the validator fetches, validates, sorts pending transactions in the local mempool, and then includes them in the pending block. From now on, it generates and maintains the pending block continuously. If a pending block is available, the worker ensures it is updated with any new transactions or state changes that have occurred.`}),`\n`,_jsx(_components.p,{children:`Here are the scenarios that can occur to an existing pending block:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Update`}),`. When new transactions arrive in the mempool, they are validated, sorted, and included in the pending block.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Discarding`}),`. When a new block is built and added to the blockchain or a blockchain reorganization occurs, the current pending block may become invalid due to changes in the state. A new pending block is generated based on the new blockchain state.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`To better understand the construction of a pending block, we need to examine how transactions are filtered and ordered in the mempool (or txpool, as it’s called in Geth).`}),`\n`,_jsx(Heading,{level:`3`,id:`mempool`,children:`Mempool`}),`\n`,_jsxs(_components.p,{children:[`When transactions are added to the mempool, they undergo several `,_jsx(_components.a,{href:`https://github.com/ethereum/go-ethereum/blob/master/core/txpool/validation.go`,children:`validation`}),` steps to ensure they meet network conditions and node-specific configurations. Two relevant gas checks related to the article’s topic are listed below.`]}),`\n`,_jsx(_components.p,{children:`GasFeeCap ≥ GasTipCap and GasTipCap ≥ MinGasTip`}),`\n`,_jsx(_components.p,{children:`Once validated, transactions are dynamically filtered and sorted to maintain the mempool’s efficiency and relevance.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Filtering`})}),`\n`,_jsx(_components.p,{children:`Transactions remain in the mempool if their gas fee cap exceeds the current base fee. Additionally, the effective gas tip must be greater than or equal to the minimum gas tip specified in the node configuration.`}),`\n`,_jsx(_components.p,{children:`GasFeeCap ≥ BaseFee and EffectiveGasTip ≥ MinGasTip`}),`\n`,_jsx(_components.p,{children:`EffectiveGasTip = min(GasFeeCap - BaseFee, GasTipCap)`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Sorting`})}),`\n`,_jsx(_components.p,{children:`Transactions in the mempool are primarily sorted by their gas price, specifically their effective gas tip, which is the difference between the gas fee cap and the base fee or the gas tip cap, whichever is lower.`}),`\n`,_jsxs(Info,{children:[_jsx(Heading,{level:`3`,id:`eip-1559`,children:`EIP-1559`}),_jsxs(_components.p,{children:[`Gas fee cap and gas tip cap were introduced with EIP-1559 transactions. Legacy transactions, also known as Type-0 transactions, do not have these properties and only specify a gas price. These legacy transactions are sorted `,_jsx(_components.a,{href:`https://github.com/ethereum/go-ethereum/blob/7cfff30ba3a67de767a9b2a7405b91f120873d10/core/types/tx_legacy.go#L101`,children:`by gas price alone`}),`, without the need for calculating an effective gas tip.`]})]}),`\n`,_jsx(_components.p,{children:`For transactions from the same account, they are sorted by nonce to ensure they can be executed sequentially. If necessary, the time when the transaction was first seen can also be considered to help order transactions with the same gas price.`}),`\n`,_jsx(Heading,{level:`3`,id:`pending-block`,children:`Pending block`}),`\n`,_jsx(_components.p,{children:`When requesting a pending block, transactions are sourced from the mempool. Geth employs filtering and sorting logic mentioned the mempool section to ensure that pending transactions adhere to the current network conditions and node configuration.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://github.com/ethereum/go-ethereum/blob/master/miner/worker.go#L415`,children:`Local transactions`}),` are given the highest priority and are included in the block before considering remote ones, regardless of their effective gas tip, as long as it exceeds the minimum gas tip set in the node configuration.`]}),`\n`,_jsxs(Info,{children:[_jsx(Heading,{level:`3`,id:`local-transactions`,children:`Local transactions`}),_jsxs(_components.p,{children:[`Local transactions in Geth are those originating from addresses `,_jsx(_components.a,{href:`https://geth.ethereum.org/docs/fundamentals/command-line-options`,children:`explicitly added to the node’s configuration`}),` or transactions submitted directly by the node itself.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`code-walkthrough`,children:`Code walkthrough`}),`\n`,_jsx(_components.p,{children:`Now let’s have a hands-on walkthrough in Python. Here’s what we are going to do:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Check the version of the node we are connected to.`}),`\n`,_jsx(_components.li,{children:`Fetch a pending block and its number.`}),`\n`,_jsx(_components.li,{children:`Fetch the latest block with the same number.`}),`\n`,_jsx(_components.li,{children:`Compare transactions in the pending and latest blocks.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Log in to your `,_jsx(_components.a,{href:`https://console.chainstack.com/`,children:`Chainstack account`}),` and get a `,_jsx(_components.a,{href:`https://chainstack.com/build-better-with-ethereum/`,children:`reliable Ethereum RPC endpoint`}),`. You can get by with a full node for this exercise.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Open your terminal (Command Prompt for Windows or Terminal for macOS/Linux) and run the following command to clone the GitHub repository.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Bash`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`git`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` clone`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://github.com/smypmsa/geth-pending-latest-block.git`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` your-repository`})]}),`\n`]})})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Set up your Python virtual environment.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`macOS/Linux`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`python3`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -m`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` venv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` venv`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`source`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` venv/bin/activate`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Windows`,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`python -m venv venv`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`venv\\\\Scripts\\\\activate`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`With the virtual environment activated, run the following command to install the required dependencies.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Bash`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -r`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` requirements.txt`})]}),`\n`]})})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Create the environment variable file (.env) and paste your Chainstack endpoint URL there.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ETH_NODE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`your_eth_node_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})})}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://github.com/smypmsa/geth-pending-latest-block`,children:`GitHub repository`}),` for all the scripts.`]}),`\n`,_jsx(Heading,{level:`3`,id:`connect-to-the-node`,children:`Connect to the node`}),`\n`,_jsx(_components.p,{children:`Load the configuration file (.env), read its values and connect to the Ethereum node.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dotenv `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_dotenv`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Web3`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Load environment variables`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`load_dotenv()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ETH_NODE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ETH_NODE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create connection to Ethereum node`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`web3 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Web3(Web3.HTTPProvider(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ETH_NODE_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`fetch-a-pending-block`,children:`Fetch a pending block`}),`\n`,_jsx(_components.p,{children:`Check that the connection to the Ethereum node is established, get the node version and fetch a pending block.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3.is_connected():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Failed to connect to the Ethereum node.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Connected to the Ethereum node.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Node version:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, web3.client_version)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Fetch pending block`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3.eth.get_block(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'pending'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_number `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block.number`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`fetch-a-finalized-block`,children:`Fetch a finalized block`}),`\n`,_jsx(_components.p,{children:`To fetch a finalized block with the same number as the pending block we fetched earlier, a few retries may be needed.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`12`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Retry fetching the finalized block with the same block number as the pending block`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` start_time `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.time()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3.eth.get_block(pending_block_number, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`full_transactions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.time() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` start_time `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 60`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Failed to fetch the finalized block within 60 seconds: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`e`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`compare-transactions`,children:`Compare transactions`}),`\n`,_jsx(_components.p,{children:`Get transactions that are common for both blocks and that are unique for each block.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Compare transactions in the pending block and finalized block`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Comparing txs in pending block and finalized block (block number: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pending_block_number`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`):\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {tx.hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block.transactions}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {tx[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hash'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block.transactions}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` common_txs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes.intersection(finalized_block_tx_hashes)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_only_txs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block_tx_hashes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_only_txs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`Let’s also compare the positions of transactions in the pending block with their positions in the latest block.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"same_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"higher_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"lower_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx_hash `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` common_txs:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [tx.hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block.transactions].index(tx_hash)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [tx[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hash'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block.transactions].index(tx_hash)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_index:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"same_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` elif`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_index:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"higher_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lower_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`putting-it-all-together`,children:`Putting it all together`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`74`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`74`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dotenv `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_dotenv`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Web3`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Load environment variables`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`load_dotenv()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ETH_NODE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ETH_NODE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create connection to Ethereum node`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`web3 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Web3(Web3.HTTPProvider(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ETH_NODE_URL`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3.is_connected():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Failed to connect to the Ethereum node.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Connected to the Ethereum node.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Node version:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, web3.client_version)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Fetch pending block`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3.eth.get_block(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'pending'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_number `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block.number`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Retry fetching the finalized block with the same block number as the pending block`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` start_time `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.time()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` web3.eth.get_block(pending_block_number, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`full_transactions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` break`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Exception`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.time() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` start_time `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 60`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Failed to fetch the finalized block within 60 seconds: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`e`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` time.sleep(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Compare transactions in the pending block and finalized block`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Comparing txs in pending block and finalized block (block number: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`pending_block_number`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`):\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {tx.hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block.transactions}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {tx[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hash'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block.transactions}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` common_txs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes.intersection(finalized_block_tx_hashes)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_only_txs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block_tx_hashes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_only_txs `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block_tx_hashes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block_tx_hashes`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Txs in pending block: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`len`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(pending_block.transactions)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Txs in latest block: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`len`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(finalized_block.transactions)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"same_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"higher_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"lower_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx_hash `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` common_txs:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [tx.hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_block.transactions].index(tx_hash)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [tx[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'hash'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].hex() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tx `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_block.transactions].index(tx_hash)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_index:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"same_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` elif`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pending_index `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` finalized_index:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"higher_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lower_position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Txs with higher position in the latest: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'higher_position'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Txs with the same position in the latest: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'same_position'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Txs with lower position in the latest: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`position_changes[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'lower_position'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Txs not included in the latest: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`len`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(pending_only_txs)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` __name__`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"__main__\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` main()`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`pending-and-latest-blocks-analysis`,children:`Pending and latest blocks analysis`}),`\n`,_jsx(_components.p,{children:`If you run the code above, you will notice that the transactions in the pending block differ from those in the final block added to the blockchain.`}),`\n`,_jsxs(_components.p,{children:[`The point is that the pending block is constructed by any node (validator or non-validator), but the finalized block is constructed by the block proposer (validator). `,_jsx(_components.strong,{children:`The block proposer may have a different view of the mempool, apply different prioritization criteria, or include different transactions based on network conditions and their own transaction pool.`})]}),`\n`,_jsx(_components.p,{children:`When examining the transactions in the pending block versus the finalized block for block number 20212119, we can observe some interesting patterns and differences:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Metric`}),_jsx(_components.th,{children:`Number of transactions`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Pending block`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`122`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Finalized block`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`189`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Transactions with higher positions in the latest block`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Transactions with the same position in the latest block`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Transactions with lower positions in the latest block`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`120`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Transactions not included in the latest block`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`key-observations`,children:`Key observations`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`The finalized block contains significantly more transactions than the pending block. This means that additional transactions were included by the block proposer after the pending block snapshot was taken.`}),`\n`,_jsx(_components.li,{children:`Almost all transactions (120 out of 122) from the pending block ended up in a lower position in the finalized block.`}),`\n`,_jsx(_components.li,{children:`Two transactions from the pending block were not included in the finalized block at all. This could be due to various reasons such as insufficient fees, reorganization, or replacement by higher-priority transactions.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`conclusion`,children:`Conclusion`}),`\n`,_jsx(_components.p,{children:`The goal of this article was to demystify the concept of a pending block in the Ethereum blockchain, specifically focusing on how Geth, the most popular Ethereum execution client, constructs pending blocks.`}),`\n`,_jsx(Heading,{level:`3`,id:`key-findings`,children:`Key findings`}),`\n`,_jsx(_components.p,{children:`Block proposer and non-block proposer limitations:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Block proposers construct the pending block using the latest transactions from the local mempool, ensuring they are prioritized and validated according to consensus rules. These blocks are proposed to the network for inclusion in the blockchain.`}),`\n`,_jsx(_components.li,{children:`Non-block proposers (which can include validators when they are not proposing a block) construct a pending block based on their expectations of the next block’s transactions but lack the guarantee of actual inclusion, as the final decision rests with the block proposer.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Transaction ordering in a pending block:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Transactions in the pending block are sourced from the mempool and primarily sorted by their effective gas tip, calculated as the difference between the gas fee cap and the base fee or the gas tip cap.`}),`\n`,_jsx(_components.li,{children:`Local transactions are prioritized over remote transactions, regardless of their effective gas tip, as long as they meet the minimum gas tip requirement.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Handling of legacy transactions:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Legacy transactions (Type-0) are sorted by gas price alone, without considering the effective gas tip. This ensures backward compatibility and straightforward inclusion based on gas price.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`about-author`,children:`About author`}),`\n`,_jsx(CardGroup,{children:_jsxs(Card,{title:`Anton Sauchyk`,children:[_jsx(`img`,{src:`https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg?fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=1d13d3584862f1be3a84fa3f8e38fea7`,alt:`Anton Sauchyk`,style:{width:`80px`,height:`80px`,borderRadius:`50%`,objectFit:`cover`,display:`block`,margin:`0 auto`},noZoom:true,\"data-og-width\":`400`,width:`400`,\"data-og-height\":`400`,height:`400`,\"data-path\":`images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=4b4cf2c618c2e0d192efaf1952982724 280w, https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=add9efeb5b72fb4f195b2e32c310ab6b 560w, https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=626d83440e40968a2e689d3510887b49 840w, https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=befac8c9ce62fb014800a5ff804584fa 1100w, https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=6dcf3cf6ab7c5c7349f8041d5dae1e24 1650w, https://mintcdn.com/chainstack/UN3rP7zhB69idvnC/images/docs/profile_images/1817926677730664448/3nNn0T2p_400x400.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=UN3rP7zhB69idvnC\u0026q=85\u0026s=cc8e68a0d52f4125b72b369110fbadbe 2500w`}),_jsxs(_components.p,{children:[_jsx(Icon,{icon:`code`,iconType:`solid`}),` Developer Advocate @ Chainstack\n`,_jsx(`br`,{}),_jsx(Icon,{icon:`laptop`,iconType:`solid`}),` Multiple years of software development and Web3 expertise`]}),_jsxs(`div`,{style:{display:`flex`,justifyContent:`center`,gap:`12px`},children:[_jsx(`a`,{href:`https://github.com/smypmsa`,style:{textDecoration:`none`,borderBottom:`none`},children:_jsx(Icon,{icon:`github`,iconType:`brands`})}),_jsx(`a`,{href:`https://x.com/sensuniama`,style:{textDecoration:`none`,borderBottom:`none`},children:_jsx(Icon,{icon:`twitter`,iconType:`brands`})}),_jsx(`a`,{href:`https://www.linkedin.com/in/anton-sauchyk/`,style:{textDecoration:`none`,borderBottom:`none`},children:_jsx(Icon,{icon:`linkedin`,iconType:`brands`})})]})]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Ethereum: How to analyze pending blocks","description":"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.","href":"/docs/ethereum-how-to-analyze-pending-blocks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Main article","slug":"main-article","depth":2,"children":[{"title":"Run Ethereum nodes on Chainstack","slug":"run-ethereum-nodes-on-chainstack","depth":3,"children":[]}]},{"title":"Introduction","slug":"introduction","depth":2,"children":[]},{"title":"Geth implementation","slug":"geth-implementation","depth":2,"children":[{"title":"Mempool","slug":"mempool","depth":3,"children":[]},{"title":"EIP-1559","slug":"eip-1559","depth":3,"children":[]},{"title":"Pending block","slug":"pending-block","depth":3,"children":[]},{"title":"Local transactions","slug":"local-transactions","depth":3,"children":[]}]},{"title":"Code walkthrough","slug":"code-walkthrough","depth":2,"children":[{"title":"Prerequisites","slug":"prerequisites","depth":3,"children":[]},{"title":"Connect to the node","slug":"connect-to-the-node","depth":3,"children":[]},{"title":"Fetch a pending block","slug":"fetch-a-pending-block","depth":3,"children":[]},{"title":"Fetch a finalized block","slug":"fetch-a-finalized-block","depth":3,"children":[]},{"title":"Compare transactions","slug":"compare-transactions","depth":3,"children":[]},{"title":"Putting it all together","slug":"putting-it-all-together","depth":3,"children":[]}]},{"title":"Pending and latest blocks analysis","slug":"pending-and-latest-blocks-analysis","depth":2,"children":[{"title":"Key observations","slug":"key-observations","depth":3,"children":[]}]},{"title":"Conclusion","slug":"conclusion","depth":2,"children":[{"title":"Key findings","slug":"key-findings","depth":3,"children":[]},{"title":"About author","slug":"about-author","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"chainstack","siteName":"Chainstack","title":"Ethereum: How to analyze pending blocks - Chainstack","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-22T06:46:23.140Z","gitLastModified":"2026-06-22T06:42:12.000Z","originalFileLocation":"docs/ethereum-how-to-analyze-pending-blocks.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Chainstack\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Ethereum: How to analyze pending blocks - Chainstack\">\u003cmeta data-mint-head property=\"og:description\" content=\"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Chainstack Developer Portal\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chainstack.mintlify.app/_mintlify/api/og/v2?division=Protocols\u0026amp;title=Ethereum%3A+How+to+analyze+pending+blocks\u0026amp;description=Analyze+pending+Ethereum+blocks+and+mempool+transactions+using+eth_getBlockByNumber+with+the+pending+tag+through+a+Chainstack+node+for+MEV+research.\u0026amp;theme=c53f2fdbd09e71fbd128e481\u0026amp;signature=425bb0c48df0a06ed6af6f71ca8338f56e18ccc5aa541f7b771731a5d22e84c3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Ethereum: How to analyze pending blocks - Chainstack\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chainstack.mintlify.app/_mintlify/api/og/v2?division=Protocols\u0026amp;title=Ethereum%3A+How+to+analyze+pending+blocks\u0026amp;description=Analyze+pending+Ethereum+blocks+and+mempool+transactions+using+eth_getBlockByNumber+with+the+pending+tag+through+a+Chainstack+node+for+MEV+research.\u0026amp;theme=c53f2fdbd09e71fbd128e481\u0026amp;signature=425bb0c48df0a06ed6af6f71ca8338f56e18ccc5aa541f7b771731a5d22e84c3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/chainstack/jo9dYY4MCWk3fHQO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Chainstack\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#007aff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ethereum-how-to-analyze-pending-blocks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.chainstack.com/#organization\",\"name\":\"Chainstack\",\"url\":\"https://docs.chainstack.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/chainstack/4kCLdVG8vhROt3j-/logo/light.svg?fit=max\u0026auto=format\u0026n=4kCLdVG8vhROt3j-\u0026q=85\u0026s=7d2d6d754203b9b3aa553e71ac4d9991\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.chainstack.com#website\",\"name\":\"Chainstack\",\"url\":\"https://docs.chainstack.com\",\"publisher\":{\"@id\":\"https://docs.chainstack.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks#webpage\",\"url\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks\",\"name\":\"Ethereum: How to analyze pending blocks\",\"description\":\"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.\",\"dateModified\":\"2026-06-22T06:42:12.000Z\",\"isPartOf\":{\"@id\":\"https://docs.chainstack.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Web3 [de]coded\",\"item\":\"https://docs.chainstack.com/docs/web3-decoded-introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Protocols\",\"item\":\"https://docs.chainstack.com/docs/protocols-tutorials\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Ethereum: How to analyze pending blocks\",\"item\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks#article\",\"headline\":\"Ethereum: How to analyze pending blocks\",\"name\":\"Ethereum: How to analyze pending blocks\",\"description\":\"Analyze pending Ethereum blocks and mempool transactions using eth_getBlockByNumber with the pending tag through a Chainstack node for MEV research.\",\"url\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.chainstack.com/docs/ethereum-how-to-analyze-pending-blocks#webpage\"},\"dateModified\":\"2026-06-22T06:42:12.000Z\",\"publisher\":{\"@id\":\"https://docs.chainstack.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.chainstack.com#website\"}}]}\u003c/script>","siteName":"Chainstack","nav":{"global":{"anchors":[{"anchor":"MCP","icon":"plug","href":"/docs/chainstack-mcp-server"},{"anchor":"llms-full.txt","icon":"brain","href":"https://docs.chainstack.com/llms-full.txt"},{"anchor":"Status","icon":"signal","href":"https://status.chainstack.com/"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/Cymtg2f7pX"},{"anchor":"Telegram","icon":"telegram","href":"https://t.me/chainstack"},{"anchor":"Blog","icon":"newspaper","href":"https://chainstack.com/blog/"}]},"products":[{"product":"Cloud","icon":"cloud","description":"Managed blockchain infrastructure","tabs":[{"tab":"Guides","groups":[{"group":"Platform","pages":[{"title":"Chainstack platform overview: nodes, APIs, and billing","href":"/docs/platform-introduction"},{"title":"Manage your account","href":"/docs/manage-your-account"},{"title":"Manage your organization","href":"/docs/manage-your-organization"},{"title":"Manage your billing","href":"/docs/manage-your-billing"},{"title":"Billing thresholds","href":"/docs/billing-thresholds"},{"title":"Manage your projects","href":"/docs/manage-your-project"},{"title":"Manage your networks","href":"/docs/manage-your-networks"},{"title":"Manage your nodes","href":"/docs/manage-your-node"},{"title":"Use Multichain API","href":"/docs/multichain-api"},{"title":"Statistics","href":"/docs/see-statistics"},{"title":"Node usage","href":"/docs/node-usage"},{"title":"Faucet","href":"/docs/faucets"},{"title":"RSS feeds","href":"/docs/rss-feeds"}]},{"group":"Pricing","pages":[{"title":"Chainstack pricing: plans, request units, and quotas","href":"/docs/pricing-introduction"},{"title":"Request units (RUs)","href":"/docs/request-units"},{"title":"Features availability","href":"/docs/features-availability-across-subscription-plans"},{"title":"Throughput guidelines","href":"/docs/limits"},{"title":"Requests per second (RPS) plan limits","href":"/docs/rps-plan-limits"},{"title":"Quotas","href":"/docs/quotas"}]},{"group":"Core","pages":[{"title":"Global Node","href":"/docs/global-elastic-node"},{"title":"Unlimited Node","href":"/docs/unlimited-node"},{"title":"Trader Node","href":"/docs/trader-node"},{"title":"Dedicated Node","href":"/docs/dedicated-node"},{"title":"Dedicated Node monitoring","href":"/docs/dedicated-node-monitoring"},{"title":"Hybrid hosting","href":"/docs/hybrid-hosting"}]},{"group":"Add-ons","pages":[{"title":"Chainstack add-ons: marketplace extensions for RPC nodes","href":"/docs/add-ons"},{"title":"MEV protection","href":"/docs/mev-protection"},{"title":"Optimized submission","href":"/docs/optimized-submission"},{"title":"Yellowstone gRPC Geyser plugin","href":"/docs/yellowstone-grpc-geyser-plugin"},{"title":"Unlimited Node add-on","href":"/docs/unlimited-node-add-on"}]},{"group":"Security","pages":[{"title":"Access rules","href":"/docs/access-rules"},{"title":"Authentication methods available on Chainstack","href":"/docs/authentication-methods-for-different-scenarios"}]},{"group":"Migrate to Chainstack","pages":[{"title":"Migrate to Chainstack with AI","sidebarTitle":"Migrate with AI","href":"/docs/migrate-to-chainstack-with-ai"},{"title":"Migrating from Google Cloud Blockchain Node Engine to Chainstack","sidebarTitle":"Google Blockchain Node Engine","href":"/docs/migrating-from-google-cloud-blockchain-node-engine-to-chainstack"},{"title":"Migrating from Syndica to Chainstack","sidebarTitle":"Syndica","href":"/docs/migrating-from-syndica-to-chainstack"},{"title":"Migrating from Grove to Chainstack","sidebarTitle":"Grove","href":"/docs/migrating-from-grove-to-chainstack"},{"title":"Migrate from Helius getTokenAccounts to Solana RPC","sidebarTitle":"Helius getTokenAccounts","href":"/docs/migrating-from-helius-gettokenaccounts-to-standard-solana-rpc-methods"}]},{"group":"Web3 [de]coded","pages":[{"title":"Web3 [De]Coded: tutorials, guides, and best practices","href":"/docs/web3-decoded-introduction"},{"group":"Protocols","pages":[{"title":"Protocols","description":"These tutorials provide a basic introduction to the protocols supported by Chainstack, enabling you to instantly dive into the world of Web3 development.","sidebarTitle":"Overview","href":"/docs/protocols-tutorials"},{"title":"Ethereum: How to analyze pending blocks","href":"/docs/ethereum-how-to-analyze-pending-blocks"},{"title":"Simulate a Uniswap swap before broadcasting","description":"Preview a Uniswap swap's output amount and confirm the trade would succeed before you send it, using eth_call, Uniswap V2 getAmountsOut, V3 QuoterV2, and eth_simulateV1 with ethers.js v6 on a Chainstack Ethereum node.","href":"/docs/ethereum-simulate-a-uniswap-swap"},{"title":"Monitor an Ethereum address for incoming transactions in real time","href":"/docs/ethereum-monitor-address-transactions"},{"title":"Monitor Uniswap swaps in real time over WebSocket","href":"/docs/ethereum-monitor-uniswap-swaps-websocket"},{"title":"Blob transactions the hard way","href":"/docs/blob-transactions-the-hard-way"},{"title":"Ethereum Dencun: Rundown with examples","href":"/docs/ethereum-dencun-rundown-with-examples"},{"title":"EIP-7702: delegate an EOA and batch transactions","href":"/docs/ethereum-eip-7702-tutorial"},{"title":"Ethereum: Academic certificates with Truffle","href":"/docs/ethereum-tutorial-academic-certificates-with-truffle"},{"title":"Ethereum: Asset tokenization with Embark","href":"/docs/ethereum-tutorial-asset-tokenization-with-embark"},{"title":"Ethereum: Trust fund account with Remix","href":"/docs/ethereum-tutorial-trust-fund-account-with-remix"},{"title":"Chainlink: Estimating the price of a call","href":"/docs/chainlink-estimating-the-price-of-a-call"},{"title":"Polygon: Bridging ERC-20 from Ethereum to Polygon","href":"/docs/polygon-tutorial-bridging-erc20-from-ethereum-to-polygon"},{"title":"Polygon: Creating a Polymarket trading OpenClaw skill","href":"/docs/polygon-creating-a-polymarket-trading-openclaw-skill"},{"title":"BNB Smart Chain: BEP-1155 with Truffle \u0026 OpenZeppelin","href":"/docs/bsc-tutorial-bep-1155-contract-with-truffle-and-openzeppelin"},{"title":"BNB Smart Chain: Lorentz hardfork","href":"/docs/bnb-lorentz-hardfork"},{"title":"Base: Deploy an ERC-721 contract with Hardhat","href":"/docs/base-tutorial-deploy-an-erc-721-contract-with-hardhat"},{"title":"Base B20 token standard","href":"/docs/base-b20-token-standard"},{"title":"Base: Deploy a B20 token","href":"/docs/base-tutorial-deploy-a-b20-token"},{"title":"Base: Accept B20 payments","href":"/docs/base-accept-b20-payments"},{"title":"eth_getStorageAt vs debug_storageRangeAt on Reth","href":"/docs/using-eth_getstorageat-instead-of-debug_storagerangeat-on-reth"},{"title":"Avalanche: Aave V3 flash loan with Hardhat","href":"/docs/avalanche-tutorial-aavev3-flash-loans-with-hardhat"},{"title":"Avalanche Granite network upgrade","href":"/docs/avalanche-granite-upgrade"},{"title":"Avalanche Helicon network upgrade","href":"/docs/avalanche-helicon-upgrade"},{"title":"TON: Deploy a smart contract","href":"/docs/getting-started-with-ton-deploy-a-smart-contract"},{"title":"TON: How to develop fungible tokens (Jettons)","href":"/docs/ton-how-to-develop-fungible-tokens-jettons"},{"title":"TON: How to customize fungible tokens (Jettons)","href":"/docs/ton-how-to-customize-fungible-tokens-jettons"},{"title":"TON: How to develop non-fungible tokens (NFT)","href":"/docs/ton-how-to-develop-non-fungible-tokens"},{"title":"TON: Wallet initialization with Tonweb","href":"/docs/ton-wallet-initialization-with-tonweb"},{"title":"TON: How to interact with Jettons","href":"/docs/ton-how-to-interact-with-jettons"},{"title":"TON: Choosing v2, v3, or v4","href":"/docs/ton-choosing-v2-or-v3"},{"title":"Unichain: Collecting Uniswap v4 ETH-USDC trades","href":"/docs/unichain-collecting-uniswapv4-eth-usdc-trades"},{"title":"Arbitrum: L1 to L2 messaging smart contract","href":"/docs/arbitrum-tutorial-l1-to-l2-messaging-smart-contract"},{"title":"zkSync Era: Develop a custom paymaster contract","href":"/docs/zksync-tutorial-develop-a-custom-paymaster-contract"},{"title":"Optimism: Bridge ETH from L1 to L2 with the JS SDK","href":"/docs/optimism-tutorial-bridge-ether-from-ethereum-l1-to-optimism-l2-using-the-optimism-javascript-sdk"},{"title":"Scroll: Deploy Uniswap V3 on Scroll","href":"/docs/scroll-tutorial-deploy-the-uniswap-v3-smart-contracts-on-scroll"},{"title":"Ronin: Make a game's smart contract","href":"/docs/ronin-tutorial-making-a-game-contract"},{"title":"Ronin: on-chain meta racing game","href":"/docs/ronin-on-chain-meta-racing-game"},{"title":"Aptos: Publish a module to save and retrieve messages","href":"/docs/aptos-tutorial-publish-a-module-to-save-and-retrieve-a-message-on-aptos"},{"title":"Plasma: Network setup and configuration","href":"/docs/plasma-tutorial-network-setup-and-configuration"},{"title":"Monitor Plasma USDT flows with web3.py","href":"/docs/plasma-tutorial-monitor-usdt-flows-with-web3py"},{"title":"Plasma: RPC failover with eRPC","href":"/docs/plasma-tutorial-rpc-failover-with-erpc"},{"title":"Plasma: Bridging assets with Symbiosis","href":"/docs/plasma-tutorial-bridging-assets-with-symbiosis"},{"title":"Plasma: Bridging from HyperEVM with deBridge","href":"/docs/plasma-tutorial-bridging-from-hyperevm-with-debridge"},{"title":"Gnosis: Soulbound token with Remix and OpenZeppelin","href":"/docs/gnosis-tutorial-simple-soulbound-token-with-remix-and-openzeppelin"},{"title":"Cronos: Dutch auction smart contract with Hardhat","href":"/docs/cronos-tutorial-dutch-auction-smart-contracts-on-cronos-with-hardhat"},{"title":"Filecoin: Deploy a deal-making contract using Hardhat","href":"/docs/filecoin-tutorial-deploy-a-deal-making-contract-on-filecoin-with-hardhat"},{"title":"TRON: Energy and Bandwidth with Python \u0026 Chainstack","href":"/docs/tron-mastering-energy-bandwidth-with-python-and-chainstack"},{"title":"TRON: Polling for TRC20 transfers in Node.js","href":"/docs/tron-polling-for-trc20-transfers"},{"title":"Sonic: Swap farming for points walkthrough in Python","href":"/docs/sonic-swap-farming-for-points-walkthrough-in-python"},{"title":"Starknet: NFT contract with Nile and L1-L2 messaging","href":"/docs/starknet-tutorial-an-nft-contract-with-nile-and-l1-l2-reputation-messaging"},{"title":"Solana archive nodes: Data availability \u0026 tooling","href":"/docs/solana-archive-nodes-the-backbone-of-solanas-data-availability-and-developer-tooling"},{"title":"Ronin gaming: Overview of Axie \u0026 Pixels","href":"/docs/ronin-gaming-overview-of-axie-pixels"},{"title":"Ronin: Consensus algorithm","href":"/docs/ronin-consensus-algorithm"},{"title":"Kaia (ex. Klaytn): Contract Sizzle 100","href":"/docs/klaytn-contract-sizzle-100"},{"title":"Sui: On-chain validator analytics with pysui","href":"/docs/sui-on-chain-validator-analytics-with-pysui"},{"title":"Berachain: On-chain data quickstart with Python","href":"/docs/berachain-on-chain-data-quickstart-with-python"},{"title":"Linea: Real-time transaction activity monitor with Python","href":"/docs/linea-real-time-transaction-monitor-python"},{"title":"Mantle: Fetching token prices from Merchant Moe","href":"/docs/mantle-fetching-token-prices-from-merchant-moe"},{"title":"Zora: Real-time creator token detection and monitoring","href":"/docs/zora-creator-token-detection-tutorial"},{"title":"Polkadot: Real-time network health monitoring dashboard","href":"/docs/polkadot-network-health-monitoring"},{"title":"Celo: Build a voting dApp with Foundry and Next.js","href":"/docs/celo-build-a-simple-voting-dapp-with-foundry-nextjs-and-web3js"},{"title":"opBNB: How to listen to deposits on the opBNB bridge","href":"/docs/opbnb-how-to-listen-deposits-bridge"},{"title":"Monad: Querying the blockchain with JavaScript","href":"/docs/monad-tutorial-querying-blockchain-javascript"},{"title":"Monad: Querying the blockchain with Python","href":"/docs/monad-tutorial-querying-blockchain-python"},{"title":"Monad: Deploying and verifying smart contracts","href":"/docs/monad-tutorial-deploy-verify-smart-contracts"},{"title":"Monad: Minting and managing NFTs","href":"/docs/monad-tutorial-nft-minting-erc721"},{"title":"Monad: Monitoring events and transactions","href":"/docs/monad-tutorial-event-monitoring"},{"title":"Monad: Fetching token prices from DEXs","href":"/docs/monad-tutorial-dex-price-fetching"},{"title":"Monad: Local fork testing with Foundry","href":"/docs/monad-tutorial-local-fork-testing"},{"title":"Tempo: Building your first payment app","href":"/docs/tempo-tutorial-first-payment-app"},{"title":"Tempo: Basic DEX swap with Foundry","href":"/docs/tempo-tutorial-dex-swap-foundry"},{"title":"Elysium: Trace internal calls and HYPE transfers","href":"/docs/elysium-tutorial-trace-internal-calls"}]},{"group":"Mastering Hyperliquid","pages":[{"title":"Mastering Hyperliquid","sidebarTitle":"Overview","href":"/docs/hyperliquid-development"},{"title":"Building on Hyperliquid with the nktkas TypeScript SDK","href":"/docs/hyperliquid-typescript-sdk-nktkas"},{"title":"Hyperliquid: Bridging USDC between HyperCore and HyperEVM","href":"/docs/hyperliquid-bridging-usdc"},{"title":"Understanding Hyperliquid infrastructure and RPC nodes","href":"/docs/hyperliquid-infrastructure-faq"},{"title":"Hyperliquid: Authentication via signatures overview","href":"/docs/hyperliquid-authentication-guide"},{"title":"Hyperliquid signing overview","href":"/docs/hyperliquid-signing-overview"},{"title":"Hyperliquid: L1 action signing on HyperCore with Python SDK","href":"/docs/hyperliquid-l1-action-signing"},{"title":"Hyperliquid: User-signed actions with Python SDK","href":"/docs/hyperliquid-user-signed-actions"},{"title":"Hyperliquid: Debugging signature errors","href":"/docs/hyperliquid-debugging-signature-errors"},{"title":"Hyperliquid node configuration and system transactions","href":"/docs/hyperliquid-node-configuration"},{"title":"Hyperliquid peering","href":"/docs/hyperliquid-peering"},{"title":"Fork Hyperliquid EVM with Foundry","href":"/docs/hyperliquid-forking-evm-foundry"},{"title":"Write to HyperCore from a contract with CoreWriter","href":"/docs/hyperliquid-corewriter"},{"title":"Building a copy trading bot with spot order mirroring","href":"/docs/hyperliquid-copy-trading-websocket"},{"title":"TWAP order execution and monitoring","href":"/docs/hyperliquid-twap-orders"},{"title":"Handling order precision and market metadata","href":"/docs/hyperliquid-order-precision"},{"title":"Implementing spot-perp funding rate arbitrage","href":"/docs/hyperliquid-funding-rate-arbitrage"},{"title":"Trading HIP-4 outcome markets on Hyperliquid","href":"/docs/hyperliquid-hip4-outcome-markets-trading"}]},{"group":"Mastering Web3 LLMs and AI use","pages":[{"title":"Mastering Web3 LLMs and AI use","sidebarTitle":"Overview","href":"/docs/mastering-web3-llms-and-ai-use"},{"title":"AI trading agent: Stack","href":"/docs/ai-trading-agent-stack"},{"title":"AI trading agent: Pipeline","href":"/docs/ai-trading-agent-pipeline"},{"title":"AI trading agent: Implementation","href":"/docs/ai-trading-agent-implementation"},{"title":"AI trading agent: Stateless agent","href":"/docs/ai-trading-agent-stateless-agent"},{"title":"AI trading agent: Stateful agent","href":"/docs/ai-trading-agent-stateful-agent"},{"title":"AI trading agent: Grok 4 integration with OpenRouter","href":"/docs/ai-trading-agent-grok4-openrouter-integration"},{"title":"AI trading agent: Kimi K2 integration with OpenRouter","href":"/docs/ai-trading-agent-kimi-k2-openrouter-integration"},{"title":"AI trading agent: ERNIE 4.5 local integration with MLX-LM","href":"/docs/ai-trading-agent-ernie-mlx-local-integration"},{"title":"AI trading agent: SmolLM3 local integration with MLX-LM","href":"/docs/ai-trading-agent-smollm3-mlx-local-integration"},{"title":"AI trading agent: Fine-tuning overview","href":"/docs/ai-trading-agent-fine-tuning-overview"},{"title":"AI trading agent: GANs and synthetic data","href":"/docs/ai-trading-agent-gans-and-synthetic-data"},{"title":"AI trading agent: Fusing LoRA adapters for Ollama","href":"/docs/ai-trading-agent-fusing-llm-adapters-and-converting-to-ollama"},{"title":"AI trading agent: Reinforcement learning","href":"/docs/ai-trading-agent-reinforcement-learning"}]},{"group":"Mastering Solana","pages":[{"title":"Mastering Solana","sidebarTitle":"Overview","href":"/docs/solana-development"},{"title":"Solana: Create a stake account and delegate SOL with web3.js","href":"/docs/solana-delegate-sol-staking"},{"title":"Solana: Create and mint an SPL token with web3.js","href":"/docs/solana-mint-spl-tokens"},{"title":"Solana: Alpenglow consensus explained","href":"/docs/solana-alpenglow-consensus"},{"title":"Solana: Transaction v1 explained","href":"/docs/solana-transaction-v1"},{"title":"Solana: Rebuild your programs for sBPFv3","href":"/docs/solana-sbpfv3-program-migration"},{"title":"Solana: Upgrade a program from another program","href":"/docs/solana-upgrade-program-from-program"},{"title":"Solana: Rent reduction and reclaiming excess rent","href":"/docs/solana-rent-reduction-reclaim-excess-rent"},{"title":"Solana: Subscriptions and allowances","href":"/docs/solana-subscriptions-and-allowances"},{"title":"Solana: Indexing subscription events with Geyser","href":"/docs/solana-indexing-subscription-events-geyser"},{"title":"Solana: Capped onchain budgets for AI agents","href":"/docs/solana-agent-allowances-x402"},{"title":"Solana: Creating a trading and sniping pump.fun bot","href":"/docs/solana-creating-a-pumpfun-bot"},{"title":"Solana: Listening to pump.fun migrations to PumpSwap","href":"/docs/solana-listening-to-pumpfun-migrations-to-raydium"},{"title":"Solana: Listen to pump.fun mints via logsSubscribe","href":"/docs/solana-listening-to-pumpfun-token-mint-using-only-logssubscribe"},{"title":"Solana: Priority fees for a Jupiter Swap in Python","href":"/docs/solana-priority-fees-for-a-jupiter-in-python"},{"title":"Solana: Analyzing adjacent transactions for priority fees","href":"/docs/solana-analyzing-adjacent-transactions-for-priority-fees"},{"title":"Solana: How to perform token swaps using Raydium","href":"/docs/solana-how-to-perform-token-swaps-using-the-raydium-sdk"},{"title":"Solana: How to build actions and blinks","href":"/docs/solana-how-to-build-actions-and-blinks"},{"title":"Solana: PDAs and cross-program invocations","href":"/docs/solana-program-derived-addresses-and-cross-program-invocations"},{"title":"Solana: Anchor development","href":"/docs/solana-anchor-development"},{"title":"Solana: Pinocchio vs Quasar program frameworks","href":"/docs/solana-pinocchio-vs-quasar"},{"title":"Solana: The escrow pattern","href":"/docs/solana-escrow-pattern"},{"title":"Solana: Zero-knowledge proofs with Noir and Groth16","href":"/docs/solana-zk-proofs"},{"title":"Solana: Fast unit testing with LiteSVM","href":"/docs/solana-litesvm-testing"},{"title":"Solana: Surfpool quick-start","href":"/docs/solana-surfpool"},{"title":"Solana: Mainnet fork tests with the Surfpool Kit plugin","href":"/docs/solana-surfpool-kit-mainnet-fork-tests"},{"title":"Solana: Token extensions (Token-2022)","href":"/docs/solana-token-extensions"},{"title":"Solana: Create a token and vesting program","href":"/docs/solana-tutorial-creating-a-token-and-vesting-the-token-in-your-program"},{"title":"Solana: Transferring SPL tokens in TypeScript","href":"/docs/transferring-spl-tokens-on-solana-typescript"},{"title":"Solana: Enhancing SPL token transfers with retry logic","href":"/docs/enhancing-solana-spl-token-transfers-with-retry-logic"},{"title":"Solana: pluggable transaction signing with solana-keychain","href":"/docs/solana-keychain-signing"},{"title":"Solana: batching token instructions with p-token","href":"/docs/solana-ptoken-batch-instruction"},{"title":"Solana: getAccountInfo vs getMultipleAccounts","href":"/docs/solana-getaccountinfo-getmultipleaccounts"},{"title":"Solana: Borsh, Bincode, and Wincode serialization","href":"/docs/solana-serialization-borsh-bincode-wincode"},{"title":"Solana: getTokenLargestAccounts for SPL holders","href":"/docs/solana-gettokenlargestaccounts-rpc-method"},{"title":"How to land transactions on Solana","href":"/docs/solana-how-to-land-transactions"},{"title":"Solana: Understanding the compute budget","href":"/docs/solana-compute-budget"},{"title":"Solana: Priority fees for faster transactions","href":"/docs/solana-how-to-priority-fees-faster-transactions"},{"title":"Solana: Estimate priority fees with RPC methods","href":"/docs/solana-estimate-priority-fees-getrecentprioritizationfees"},{"title":"Solana: Multiple RPC endpoints for dApp performance","href":"/docs/solana-how-to-use-multiple-rpc-endpoints-optimize-dapp-performance"},{"title":"Solana: How to handle the transaction expiry error","href":"/docs/solana-how-to-handle-the-transaction-expiry-error"},{"title":"Solana: Durable nonces for offline signing","href":"/docs/solana-durable-nonces"},{"title":"Solana: Address lookup tables","href":"/docs/solana-address-lookup-tables"},{"title":"Solana: MEV protection with Jito","href":"/docs/solana-mev-protection"},{"title":"Solana Agave 2.0 upgrade reference","href":"/docs/solana-agave-20-upgrade-reference"},{"title":"Solana: Blocks vs slots explained","href":"/docs/understanding-the-difference-between-blocks-and-slots-on-solana"},{"title":"Solana: Optimize your getBlock performance","href":"/docs/solana-optimize-your-getblock-performance"},{"title":"Solana: Understanding Block Time","href":"/docs/solana-understanding-block-time"},{"title":"Solana: Associating transactions with block and block time using Yellowstone gRPC","href":"/docs/solana-transactions-block-time-yellowstone-grpc"},{"title":"Solana: Listening to pump.fun token mint using Geyser","href":"/docs/solana-listening-to-pumpfun-token-mint-using-geyser"},{"title":"Solana: Geyser and Yellowstone gRPC in Node.js","href":"/docs/solana-listening-to-programs-using-geyser-and-yellowstone-grpc-node-js"},{"title":"Solana blockSubscribe 1009 error on WebSocket","href":"/docs/solana-blocksubscribe-1009-error-on-websocket"},{"title":"Common errors with @solana/web3.js","href":"/docs/common-errors-with-solana-web3js"}]},{"group":"Best practices handbook","pages":[{"title":"Best practices handbook","sidebarTitle":"Overview","href":"/docs/chainstack-web3-development-best-practices"},{"title":"Chainbench: Benchmark your blockchain RPC endpoints","href":"/docs/chainbench-tutorial-benchmark-your-blockchain-rpc-endpoints"},{"title":"Using eRPC with Chainstack: Quickstart","href":"/docs/using-erpc-with-chainstack-quickstart"},{"title":"Using Chainstack as a Hummingbot Gateway RPC provider","href":"/docs/using-chainstack-with-hummingbot-gateway"},{"title":"Ponder: Blockchain indexing backends with Chainstack","href":"/docs/ponder-tutorial-building-blockchain-application-backends-with-chainstack"},{"title":"HTTP batch request VS multicall contract","href":"/docs/http-batch-request-vs-multicall-contract"},{"title":"Web3 dApp secrets: Environment variables guide","href":"/docs/how-to-store-your-web3-dapp-secrets-guide-to-environment-variables"},{"title":"Introduction to smart contract auditing using Foundry","href":"/docs/introduction-to-smart-contract-manual-auditing-with-foundry-and-slither"},{"title":"Web3 node.js: From zero to a full-fledged project","href":"/docs/web3-nodejs-from-zero-to-a-full-fledged-project"},{"title":"Get the most out of Chainstack platform API","href":"/docs/guide-get-the-most-out-of-the-chainstack-platform-api"},{"title":"Understanding eth_getLogs limitations","href":"/docs/understanding-eth-getlogs-limitations"},{"title":"Monitor transaction propagation to mempool in Python","href":"/docs/monitoring-transaction-propagation-from-node-to-mempool-in-evm-networks-with-python"},{"title":"Handle real-time data with WebSockets in JS \u0026 Python","href":"/docs/handle-real-time-data-using-websockets-with-javascript-and-python"},{"title":"Make your dApp more reliable with Chainstack","href":"/docs/make-your-dapp-more-reliable-with-chainstack"},{"title":"Best practices for error handling in API requests","href":"/docs/best-practices-for-error-handling-in-api-requests"},{"title":"Common SSL issues on Python and how to fix it","href":"/docs/common-ssl-issues-on-python-and-how-to-fix-it"},{"title":"EVM node returns \"Missing trie node\"","href":"/docs/evm-node-returns-missing-trie-node"},{"title":"EVM node connection: HTTP vs WebSocket","href":"/docs/evm-node-connection-http-vs-websocket"},{"title":"EVM transaction pool: pending vs queued","href":"/docs/evm-transaction-pool-pending-vs-queued"},{"title":"Adding a custom network to MetaMask","href":"/docs/adding-a-custom-network-to-metamask"},{"title":"Adding a custom RPC endpoint to Safe","href":"/docs/adding-a-custom-rpc-endpoint-to-safe"},{"title":"Adding a custom RPC endpoint to Rabby","href":"/docs/adding-a-custom-rpc-endpoint-to-rabby"},{"title":"Forking EVM-compatible mainnet with Hardhat","href":"/docs/forking-evm-compatible-mainnet-with-hardhat"},{"title":"Error reference","href":"/docs/error-reference"},{"title":"Only replay-protected (EIP-155) transactions allowed over RPC","href":"/docs/evm-only-replay-protected-eip-155-transactions-error"},{"title":"Checking node latency","href":"/docs/checking-node-latency"},{"title":"Best practices for securing your Chainstack endpoint","href":"/docs/best-practices-for-securing-your-chainstack-endpoint"},{"title":"Multithreading in Python for Web3 requests","href":"/docs/mastering-multithreading-in-python-for-web3-requests-a-comprehensive-guide"},{"title":"Authentication methods available on Chainstack","href":"/docs/authentication-methods-for-different-scenarios"},{"title":"Scaling your dApp with Kubernetes: Comprehensive guide","href":"/docs/tutorial-on-how-to-make-your-dapp-reliable-and-scalable-with-kubernetes"},{"title":"Choose the right blockchain network for your dApp","href":"/docs/navigating-the-web3-landscape-how-to-choose-the-right-blockchain-network-for-your-dapp"},{"title":"Getting started with Foundry","href":"/docs/getting-started-with-foundry"},{"title":"Ethereum: Redundant event listener with ethers/web3.js","href":"/docs/ethereum-redundant-event-llstener-ethers-web3js"},{"title":"Ethereum: Redundant event listener with Python","href":"/docs/ethereum-redundant-event-listener-python-version"}]},{"group":"Blockchain APIs guides","pages":[{"title":"Blockchain APIs guides","sidebarTitle":"Overview","href":"/docs/chainstack-blockchain-apis-guides"},{"title":"Flashblocks on Base: 200ms preconfirmations","href":"/docs/flashblocks-on-base"},{"title":"Stream real-time transactions on Base with Flashblocks","href":"/docs/base-streaming-transactions-flashblocks"},{"title":"Flashblocks on Optimism: 250ms preconfirmations","href":"/docs/flashblocks-on-optimism"},{"title":"Track real-time transactions on Optimism with Flashblocks","href":"/docs/optimism-streaming-transactions-flashblocks"},{"title":"Tracking some Bored Apes: The Ethereum event logs tutorial","href":"/docs/tracking-some-bored-apes-the-ethereum-event-logs-tutorial"},{"title":"Uncovering the power of eth_getBlockReceipts","href":"/docs/uncovering-the-power-of-ethgetblockreceipts"},{"title":"eth_getBlockReceipts emulator for blockchain data","href":"/docs/expanding-your-blockchain-horizons-the-eth_getblockreceipts-emulator"},{"title":"Deep dive into Merkle proofs and eth_getProof","href":"/docs/deep-dive-into-merkle-proofs-and-eth-getproof-ethereum-rpc-method"},{"title":"Geth vs Erigon: RPC method comparison on Ethereum","href":"/docs/geth-vs-erigon-deep-dive-into-rpc-methods-on-ethereum-clients"},{"title":"Ethereum logs tutorial series: Logs and filters","href":"/docs/ethereum-logs-tutorial-series-logs-and-filters"},{"title":"Custom JavaScript tracing for EVM transactions","href":"/docs/mastering-custom-javascript-tracing-for-ethereum-virtual-machine"},{"title":"Ethereum: Battleship game with zero-knowledge proofs","href":"/docs/develop-a-battleship-game-using-zero-knowledge-concepts-on-ethereum"},{"title":"Send Warp transactions with web3.js, ethers.js, web3.py","href":"/docs/sending-warp-transaction-with-web3js-ethersjs-web3py-and-ethclientgo"},{"title":"Chainlink oracles: Fetch real-time crypto prices","href":"/docs/harnessing-chainlink-oracles-with-chainstack-fetching-real-time-crypto-prices-from-ethereum"},{"title":"Fetch BAYC transfer events with web3.js getPastEvents","href":"/docs/fetching-transfer-events-with-getpastevents-for-a-bayc-nft"},{"title":"Fix Ethereum's filter not found error","href":"/docs/understanding-ethereums-filter-not-found-error-and-how-to-fix-it"},{"title":"Introducing Bun: The future of JavaScript runtimes","href":"/docs/introducing-bun-the-future-of-javascript-runtimes"},{"title":"Fetch address transactions with eth_getBlockByNumber","href":"/docs/fetching-transactions-to-and-from-a-specific-address-with-eth_getblockbynumber"},{"title":"cryo: Your gateway to blockchain data","href":"/docs/cryo-your-gateway-to-blockchain-data"},{"title":"cryo with Chainstack: Blockchain data mastery in Python","href":"/docs/cryo-with-chainstack-and-python"},{"title":"Exploring Bitcoin transactions with `getrawtransaction`","href":"/docs/exploring-bitcoin-transactions-with-getrawtransaction"},{"title":"MESC (Multi-Endpoint Shared Configuration) setup","href":"/docs/mesc-and-chainstack"},{"title":"ethers.js FallbackProvider for data reliability","href":"/docs/enhancing-blockchain-data-reliability-with-ethers-fallbackprovider"},{"title":"Web3.js: How to use the Chainstack plugin","href":"/docs/web3js-how-to-use-the-new-chainstack-plugin"},{"title":"ethers.js ChainstackProvider: Multi-chain balance checker","href":"/docs/ethersjs-chainstackprovider-how-to-multi-chain-wallet-balance-aggregator"}]},{"group":"Chainstack Marketplace","pages":[{"title":"Chainstack Marketplace","sidebarTitle":"Overview","href":"/docs/chainstack-marketplace-tutorials"},{"title":"JWT: Implement secure user authentication","href":"/docs/tutorial-mastering-jwt-how-to-implement-secure-user-authentication"},{"title":"JWT validation in Go for Chainstack Marketplace","href":"/docs/implementing-jwt-validation-in-golang-for-chainstack-marketplace-integration"}]},{"group":"Web3pedia","pages":[{"title":"Web3pedia","sidebarTitle":"Overview","href":"/docs/web3pedia-introduction"},{"title":"Web3 Lingo","href":"/docs/web3-language-and-acronyms"},{"title":"Development frameworks and libraries","href":"/docs/web3-development-frameworks-and-libraries-glossary"},{"title":"Smart contracts","href":"/docs/smart-contracts-glossary"},{"title":"Security","href":"/docs/web3-security-glossary"},{"title":"Infrastructure","href":"/docs/web3-infrastructure-glossary"},{"title":"Solana glossary","href":"/docs/solana-glossary"}]}]},{"group":"MCP servers","pages":[{"title":"Chainstack MCP server","href":"/docs/chainstack-mcp-server"},{"title":"Developer Portal MCP server","href":"/docs/developer-portal-mcp-server"},{"title":"EVM MCP server","href":"/docs/evm-mcp-server"},{"title":"Solana MCP server","href":"/docs/solana-mcp-server"}]},{"group":"Marketplace","pages":[{"title":"About Marketplace","href":"/docs/about-marketplace"},{"title":"List your app on marketplace","href":"/docs/list-your-app-on-marketplace"},{"title":"Work with Marketplace","href":"/docs/work-with-chainstack-marketplace"}]},{"group":"Chainstack Compare","pages":[{"title":"Chainstack Compare dashboard","href":"/docs/chainstack-compare-dashboard"}]},{"group":"Chainstack ChatGPT plugin","pages":[{"title":"Chainstack ChatGPT plugin overview","href":"/docs/chainstack-chat-gpt-plugin-introduction"}]},{"group":"Chainstack DLP browser extension","pages":[{"title":"Chainstack DLP tool overview","href":"/docs/chainstack-data-leak-protection-tool-introduction"}]},{"group":"Protocols","pages":[{"title":"Configurations","href":"/docs/protocols-configurations"},{"title":"Networks","href":"/docs/protocols-networks"},{"title":"Modes and types","href":"/docs/protocols-modes-and-types"},{"title":"Extended history","href":"/docs/extended-nodes"},{"title":"Clients","href":"/docs/protocols-clients"},{"title":"Available clouds, regions, \u0026 locations","href":"/docs/nodes-clouds-regions-and-locations"},{"title":"Mempool configurations","href":"/docs/mempool-configuration"},{"group":"Available node methods","pages":[{"title":"Available node methods","sidebarTitle":"Overview","href":"/docs/available-node-methods"},{"title":"Arc methods","href":"/docs/arc-methods"},{"title":"Ethereum methods","href":"/docs/ethereum-methods"},{"title":"Solana methods","href":"/docs/solana-methods"},{"title":"BNB Smart Chain methods","href":"/docs/bnb-smart-chain-methods"},{"title":"Polygon methods","href":"/docs/polygon-methods"},{"title":"Plasma methods","href":"/docs/plasma-methods"},{"title":"Robinhood Chain methods","href":"/docs/robinhood-methods"},{"title":"Elysium methods","href":"/docs/elysium-methods"},{"title":"Arbitrum methods","href":"/docs/arbitrum-methods"},{"title":"Base methods","href":"/docs/base-methods"},{"title":"Hyperliquid methods","href":"/docs/hyperliquid-methods"},{"title":"TRON methods","href":"/docs/tron-methods"},{"title":"Optimism methods","href":"/docs/optimism-methods"},{"title":"Avalanche methods","href":"/docs/avalanche-methods"},{"title":"TON methods","href":"/docs/ton-methods"},{"title":"Ronin methods","href":"/docs/ronin-methods"},{"title":"ZKsync Era methods","href":"/docs/zksync-era-methods"},{"title":"Starknet methods","href":"/docs/starknet-methods"},{"title":"Scroll methods","href":"/docs/scroll-methods"},{"title":"Aptos methods","href":"/docs/aptos-methods"},{"title":"Fantom methods","href":"/docs/fantom-methods"},{"title":"Sonic methods","href":"/docs/sonic-methods"},{"title":"Cronos methods","href":"/docs/cronos-methods"},{"title":"Gnosis Chain","href":"/docs/gnosis-chain"},{"title":"Kaia methods","href":"/docs/kaia-methods"},{"title":"Celo methods","href":"/docs/celo-methods"},{"title":"Bitcoin methods","href":"/docs/bitcoin-methods"},{"title":"Harmony methods","href":"/docs/harmony-methods"},{"title":"MegaETH methods","href":"/docs/megaeth-methods"},{"title":"Tempo methods","href":"/docs/tempo-methods"},{"title":"World Chain methods","href":"/docs/worldchain-methods"},{"title":"Stable methods","href":"/docs/stable-methods"}]}]},{"group":"Advanced APIs","pages":[{"title":"Advanced APIs","href":"/docs/advanced-apis-introduction"},{"group":"Warp transactions","pages":[{"title":"Warp transactions","sidebarTitle":"Overview","href":"/docs/warp-transactions"},{"title":"Solana Trader Nodes with Warp transactions","href":"/docs/solana-trader-nodes"},{"title":"Ethereum Trader Nodes with Warp transactions","href":"/docs/ethereum-trader-nodes"},{"title":"BNB Smart Chain Trader Nodes with Warp transactions","href":"/docs/bnb-trader-nodes"}]},{"title":"Debug \u0026 Trace APIs","href":"/docs/debug-and-trace-apis"},{"title":"Reading EVM traces: callTracer and prestateTracer","href":"/docs/reading-evm-traces-with-calltracer-and-prestatetracer"}]},{"group":"Tooling","pages":[{"title":"Protocols and tooling: Web3 libraries and frameworks","href":"/docs/protocols-tooling-introduction"},{"title":"Ethereum tooling","href":"/docs/ethereum-tooling"},{"title":"Solana tooling","href":"/docs/solana-tooling"},{"title":"BNB Smart Chain tooling","href":"/docs/bsc-tooling"},{"title":"Polygon tooling","href":"/docs/polygon-tooling"},{"title":"Arbitrum tooling","href":"/docs/arbitrum-tooling"},{"title":"Base tooling","href":"/docs/base-tooling"},{"title":"Optimism tooling","href":"/docs/optimism-tooling"},{"title":"Avalanche tooling","href":"/docs/avalanche-tooling"},{"title":"Hyperliquid tooling","href":"/docs/hyperliquid-tooling"},{"title":"TON tooling","href":"/docs/ton-tooling"},{"title":"Unichain tooling","href":"/docs/unichain-tooling"},{"title":"Ronin tooling","href":"/docs/ronin-tooling"},{"title":"Sui tooling","href":"/docs/sui-tooling"},{"title":"Sui gRPC endpoint","href":"/docs/sui-grpc-endpoint"},{"title":"Sui GraphQL endpoint","href":"/docs/sui-graphql-endpoint"},{"title":"Migrate Sui from JSON-RPC to gRPC and GraphQL","href":"/docs/sui-migrate-json-rpc-to-grpc"},{"title":"Berachain tooling","href":"/docs/berachain-tooling"},{"title":"Monad tooling","href":"/docs/monad-tooling"},{"title":"Linea tooling","href":"/docs/linea-tooling"},{"title":"Mantle tooling","href":"/docs/mantle-tooling"},{"title":"MegaETH tooling","href":"/docs/megaeth-tooling"},{"title":"Polkadot tooling","href":"/docs/polkadot-tooling"},{"title":"zkSync Era tooling","href":"/docs/zksync-era-tooling"},{"title":"Zora tooling","href":"/docs/zora-tooling"},{"title":"Starknet tooling","href":"/docs/starknet-tooling"},{"title":"Scroll tooling","href":"/docs/scroll-tooling"},{"title":"Aptos tooling","href":"/docs/aptos-tooling"},{"title":"Sonic tooling","href":"/docs/sonic-tooling"},{"title":"Fantom tooling","href":"/docs/fantom-tooling"},{"title":"TRON tooling","href":"/docs/tron-tooling"},{"title":"Cronos tooling","href":"/docs/cronos-tooling"},{"title":"Gnosis Chain tooling","href":"/docs/gnosis-tooling"},{"title":"Kaia (ex. Klaytn) tooling","href":"/docs/klaytn-tooling"},{"title":"Celo tooling","href":"/docs/celo-tooling"},{"title":"Bitcoin tooling","href":"/docs/bitcoin-tooling"},{"title":"Bitcoin testnets: Testnet, Signet Testnet, and Testnet4","href":"/docs/bitcoin-testnets"},{"title":"Zcash tooling","href":"/docs/zcash-tooling"},{"title":"Harmony tooling","href":"/docs/harmony-tooling"},{"title":"opBNB tooling","href":"/docs/opbnb-tooling"},{"title":"Filecoin tooling","href":"/docs/filecoin-tooling"},{"title":"Plasma tooling","href":"/docs/plasma-tooling"},{"title":"Tempo tooling","href":"/docs/tempo-tooling"},{"title":"Robinhood Chain tooling","href":"/docs/robinhood-tooling"},{"title":"Elysium tooling","href":"/docs/elysium-tooling"},{"title":"Arc tooling","href":"/docs/arc-tooling"},{"title":"World Chain tooling","href":"/docs/worldchain-tooling"},{"title":"Ink tooling","href":"/docs/ink-tooling"},{"title":"X Layer tooling","href":"/docs/xlayer-tooling"},{"title":"Stable tooling","href":"/docs/stable-tooling"},{"title":"XRP Ledger tooling","href":"/docs/xrpl-tooling"},{"title":"Stellar tooling","href":"/docs/stellar-tooling"}]}]},{"tab":"API","pages":[{"title":"API","href":"/reference/blockchain-apis"}]},{"tab":"Release notes","pages":[{"title":"Release notes","href":"/changelog"}]}]},{"product":"Self-Hosted","icon":"server","description":"Deploy on your own infrastructure","pages":[{"title":"Self-Hosted","href":"/docs/self-hosted/introduction"}]}]},"title":"Ethereum: How to analyze pending blocks - Chainstack","buildId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","deploymentId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","dynamics":[],"chunks":[]}