eth_getUncleByBlockNumberAndIndex
JSON-RPC method returns information about an uncle block by block number and uncle index position. Uncle blocks are valid blocks that were not included in the main chain but are referenced by the main chain blocks for network security.
Get your own node endpoint todayStart 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.
Parameters
- block_number (string) — The block number as a hexadecimal string, or one of the string tags: “latest”, “earliest”, or “pending”
- uncle_index (string) — The uncle index position as a hexadecimal string (e.g., “0x0” for the first uncle)
Response
The method returns uncle block information ornull
if no uncle exists at the specified index.
Response structure
Uncle block information:- Returns uncle block object with header information if found
- Returns
null
if no uncle exists at the specified index - Uncle blocks contain header information but no transaction data
Block number tags
Available tags:"latest"
— The most recent block in the chain"earliest"
— The genesis block (block 0)"pending"
— The pending state/transactions
- Block numbers can be specified as hexadecimal strings with “0x” prefix
- Example: “0x1b4” represents block 436 in decimal
Usage example
Basic implementation
Example request
Shell
Use cases
Theeth_getUncleByBlockNumberAndIndex
method is useful for applications that need to:
- Real-time monitoring: Monitor uncle blocks in the latest blocks
- Mining analytics: Analyze mining performance and uncle rates
- Network health monitoring: Track network consensus and chain quality
- Block explorer development: Build block explorers with uncle block support
- Mining pool operations: Monitor mining pool uncle block statistics
- Blockchain research: Study consensus mechanisms and network behavior
- Network statistics: Generate uncle block statistics and trends
- Performance analysis: Analyze blockchain performance and efficiency
- Educational platforms: Create educational content about blockchain consensus
- Mining reward calculation: Calculate mining rewards including uncle rewards
- Chain analysis tools: Build tools for detailed blockchain analysis
- Monitoring dashboards: Create dashboards for blockchain metrics
- Academic research: Support research on blockchain consensus algorithms
- Network optimization: Optimize network parameters based on uncle patterns
- Historical data analysis: Analyze uncle block trends over time
Body
application/json
JSON-RPC version
Available options:
2.0
The RPC method name
Available options:
eth_getUncleByBlockNumberAndIndex
Parameters: [block_number, uncle_index]
Request identifier