7Block Labs
Blockchain Technology

ByAUJay

Summary: Infura is Consensys’ battle-tested gateway for Ethereum and major L2s, exposing HTTPS and WebSocket JSON‑RPC plus higher‑level APIs like Gas and Trace. This post unpacks exactly how Infura connects your apps to Ethereum, what’s new since Dencun/EIP‑4844, and concrete patterns to ship reliable, cost‑efficient web3 backends at startup and enterprise scale.

Infura Blockchain APIs Key Features: What Is Infura and How Does It Connect to Ethereum?

Decision‑makers evaluating blockchain infrastructure generally have the same mandate: ship faster, fail less, and keep costs predictable while the stack evolves under your feet. Infura delivers this by abstracting node operations into stable, high‑throughput APIs for Ethereum and a growing set of L2s and alt‑L1s, plus value‑add services like Gas estimation, traces, and account‑abstraction bundling. Below is a practical, up‑to‑date field guide from 7Block Labs on what Infura actually is, how it talks to Ethereum, and how to use it well in 2026.


What Infura is (in practice)

At its core, Infura is a managed access layer to Ethereum execution clients and companion services. Your app talks to Infura via standard JSON‑RPC over HTTPS or WebSockets; Infura handles clustering, client diversity, scaling, archive data, and failover. For many methods, you get the exact same wire‑format you would from a self‑hosted node—without running one. Infura now also exposes higher‑level APIs like:

  • Gas API (the same estimator powering MetaMask) for reliable EIP‑1559 fee suggestions across multiple chains. (infura.io)
  • Trace API (open beta) to debug and analyze transactions and contracts. (infura.io)

And under the hood, Infura is progressively decentralizing request routing and supply via the Decentralized Infrastructure Network (DIN), which recently launched as an EigenLayer AVS to bring crypto‑economic security and permissionless provider participation to RPC. (theblock.co)


How Infura connects to Ethereum

1) Transport and endpoints

Your app connects through per‑network endpoints:

  • HTTPS: for stateless requests like eth_call, eth_getLogs, eth_getBlockByNumber.
  • WSS: for bidirectional subscriptions (eth_subscribe: newHeads, logs, newPendingTransactions—availability varies by network). (docs.metamask.io)

Representative endpoints (replace with your API key):

  • Ethereum Mainnet: https://mainnet.infura.io/v3/<YOUR-API-KEY> and wss://mainnet.infura.io/ws/v3/<YOUR-API-KEY>
  • L2s like Base, Optimism, Arbitrum, Linea, Polygon, Scroll, etc., each with their own hostname, for both HTTPS and WSS. Full lists and formats are maintained in the MetaMask Developer Services docs. (docs.metamask.io)

Notes that matter in 2026:

  • Goerli has been deprecated broadly across the ecosystem; prioritize Sepolia/Holesky for testing. Infura has guided migrations away from Goerli. (infura.ghost.io)
  • IPFS: new key creation is disabled for new users since late 2024; existing keys retain access. (docs.metamask.io)
  • Solana access is limited to select customers. (docs.metamask.io)

2) Authentication and security controls

  • API keys identify usage; you can optionally require an API key secret for server‑to‑server Basic Auth.
  • Allowlists let you restrict by address, JSON‑RPC method, Origin, and User‑Agent; add granular rules per key. Use a secret to override allowlists for backend traffic while keeping client keys tightly scoped. (docs.metamask.io)
  • Don’t send the API key secret from browsers—CORS will block authenticated requests; route sensitive calls via your backend. (support.infura.io)
  • On free vs. paid tiers: free allows one key; paid plans increase keys and controls. (docs.metamask.io)

3) Throughput and quotas

Infura enforces a credit‑based model with both daily and per‑second caps by plan (as of Nov–Dec 2025 help‑center data):

  • Core (Free): 6,000,000 credits/day; 2,000 credits/second
  • Developer: 15,000,000 credits/day; 4,000 credits/second
  • Team: 75,000,000 requests/day; 40,000 credits/second (support.infura.io)

Operational transparency: Infura’s public status page shows component uptimes and incidents; integrate it into your on‑call runbook. (infura.statuspage.io)


Features decision‑makers care about in 2026

Multichain coverage, maintained endpoints

Infura provides production endpoints for Ethereum, major L2s (Base, Optimism, Arbitrum, Linea, Polygon), plus networks like Blast, BSC/opBNB, Avalanche, Starknet, Scroll, and more, all documented with canonical URLs (HTTPS/WSS). This reduces integration drift when networks rename or deprecate testnets. (docs.metamask.io)

Real‑time subscriptions (WSS)

Use eth_subscribe over WSS for:

  • newHeads: chain progress (and reorg awareness)
  • logs: event streams with address/topic filters (recommended)
  • newPendingTransactions: pending pool firehose (not on all networks) (docs.metamask.io)

Infura recommends filtering logs subscriptions to lower noise and cost. Implement reconnection and backoff on long‑lived sockets. (support.infura.io)

Archive and Trace data

  • Archive data: Infura supports historical state reads beyond 128 blocks on key networks—required for past‑state eth_call, eth_getBalance at old heights, and so on. (docs.metamask.io)
  • Trace API (open beta for paying customers): trace_block, trace_call, trace_filter, trace_transaction unlock step‑by‑step EVM traces, internal calls, and state diffs for analytics, forensics, and debugging. (docs.metamask.io)

Gas API (MetaMask‑grade fee estimation)

The Gas REST API exposes current and historical EIP‑1559 estimates across chains (e.g., Ethereum, Linea, Base, Optimism). It powers MetaMask’s own estimator and is now broadly available via Infura. This materially reduces under/over‑pricing and supports “consecutive increases control” in volatile blocks. (infura.io)

Account Abstraction (ERC‑4337) bundler integration

Infura integrates with Pimlico’s bundler, exposing standard 4337 JSON‑RPC methods on Ethereum Mainnet and Sepolia, such as eth_sendUserOperation, eth_estimateUserOperationGas, eth_getUserOperationReceipt, and pimlico_* helper methods. If you’re building smart‑account UX (gas sponsorship, batched actions, session keys), you can use these endpoints today. (docs.metamask.io)

EIP‑4844 (Dencun) support: blob transactions and fees

Post‑Dencun, Ethereum added “blob‑carrying” transactions (type‑3) with new fields: max_fee_per_blob_gas plus blob_versioned_hashes. Infura supports the corresponding methods (e.g., eth_blobBaseFee), enabling L2s to post data cheaply to L1 and opening new design space for data availability. Blobs are short‑lived (~18 days) and priced via a separate EIP‑1559‑style “blob gas” market. (eips.ethereum.org)

Why it matters to you:

  • Massive L2 fee reductions (often sub‑cent) and predictable DA costs.
  • If you ship rollup or data‑heavy features: update clients and SDKs to handle type‑3 tx, blob fee logic, and KZG commitments where you craft blobs client‑side. Libraries like ethers v6 expose blob fields and KZG hooks. (docs.ethers.org)

Resilience and decentralization via DIN

DIN’s EigenLayer AVS launch turns RPC into a verifiable, economically secured marketplace. Practically, that means:

  • Permissionless onboarding of node operators/watcher roles
  • Performance incentives and slashing over time
  • Smart routing and failover integrated with Infura/MetaMask pathways

This reduces systemic risk from single‑provider outages and improves SLOs at scale. (theblock.co)

Optional MEV protection path

As of March 11, 2025, Infura added MEV protection for Ethereum transactions sent via eth_sendRawTransaction—shielding free‑tier developers’ txs from common sandwich/frontrun vectors by using private routing to trusted builders. This is especially helpful for consumer wallets and retail flows. (metamask.io)


Practical integration patterns with code

Below are battle‑tested snippets your teams can adapt.

Connect with ethers v6 (HTTPS) and get the latest block

import { JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider(
  `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`
);

const n = await provider.getBlockNumber();
console.log("L1 block:", n);

Endpoints for other networks follow the docs’ hostnames (for example base-mainnet.infura.io or optimism-mainnet.infura.io). (docs.metamask.io)

Subscribe to new blocks and filtered logs (WSS) with auto‑reconnect

import WebSocket from "ws";
import ReconnectingWebSocket from "reconnecting-websocket";

const url = `wss://mainnet.infura.io/ws/v3/${process.env.INFURA_API_KEY}`;

const ws = new ReconnectingWebSocket(url, [], { WebSocket, maxRetries: 1e9 });

ws.addEventListener("open", () => {
  // newHeads (new blocks)
  ws.send(JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "eth_subscribe", params: ["newHeads"]
  }));
  // logs (filtered)
  ws.send(JSON.stringify({
    jsonrpc: "2.0", id: 2, method: "eth_subscribe",
    params: ["logs", { address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
                       topics: ["0xddf252ad..."] /* Transfer() */ }]
  }));
});
ws.addEventListener("message", (m) => console.log("event", m.data));

Use address/topic filters for logs and expect possible “removed: true” on reorgs. (docs.metamask.io)

Page through event history safely (eth_getLogs)

Large log pulls must be paged—aim for 2k–5k blocks per request and handle the 10k‑result ceiling common across providers. This avoids timeouts and oversized responses.

async function getLogsPaged(provider, filter, step = 2000) {
  const latest = BigInt(await provider.send("eth_blockNumber", []));
  const from = BigInt(filter.fromBlock || "0x0");
  const to = filter.toBlock === "latest" ? latest : BigInt(filter.toBlock);
  const all = [];
  for (let i = from; i <= to; i += BigInt(step)) {
    const pageTo = i + BigInt(step) - 1n > to ? to : i + BigInt(step) - 1n;
    const logs = await provider.send("eth_getLogs", [{
      ...filter,
      fromBlock: "0x" + i.toString(16),
      toBlock: "0x" + pageTo.toString(16),
    }]);
    all.push(...logs);
  }
  return all;
}

Most providers enforce result or block‑range limits for eth_getLogs; paging is best practice. (therpc.io)

Fetch live EIP‑1559 suggestions via Gas API (REST)

import axios from "axios";

const chainId = 1; // Ethereum Mainnet
const { data } = await axios.get(
  `https://gas.api.infura.io/v3/${process.env.INFURA_API_KEY}/networks/${chainId}/suggestedGasFees`
);
console.log(data); // { low: {...}, medium: {...}, high: {...}, ... }

Use this over naive eth_gasPrice; it’s MetaMask’s production estimator surfaced as an API. (docs.metamask.io)

Run a transaction trace (open beta)

curl -X POST https://mainnet.infura.io/v3/$INFURA_API_KEY \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "trace_transaction",
    "params": ["0x<txHash>"]
  }'

Traces return internal calls and state changes useful for audits, fraud detection, and analytics. (docs.metamask.io)

Submit an ERC‑4337 UserOperation to Infura’s bundler

# Example: send a UserOperation to an ERC-4337 bundler (Mainnet/Sepolia)
curl -X POST https://mainnet.infura.io/v3/$INFURA_API_KEY \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc":"2.0","id":1,"method":"eth_sendUserOperation",
    "params":[ { "sender": "0x...", "nonce": "0x0", "initCode": "0x", "callData": "0x",
                 "callGasLimit":"0x...", "verificationGasLimit":"0x...",
                 "preVerificationGas":"0x...", "maxFeePerGas":"0x...",
                 "maxPriorityFeePerGas":"0x...", "paymasterAndData":"0x", "signature":"0x" },
               "0x0000000071727De22E5E9d8BAf0edAc6f37da032" ] }'

Infura proxies to Pimlico’s infrastructure and supports helper methods such as pimlico_getUserOperationStatus. Keep your EntryPoint addresses in sync (e.g., 0x…7032 for v0.7). (docs.metamask.io)

Account for Dencun/EIP‑4844 blob fees

When crafting type‑3 transactions, read the blob base fee and set max_fee_per_blob_gas accordingly. Libraries like ethers v6 expose transaction.blobVersionedHashes and kzg hooks for commitments/proofs.

const blobBaseFee = await provider.send("eth_blobBaseFee", []);
// Set tx.maxFeePerBlobGas relative to blobBaseFee

Blobs are stored on the consensus layer and pruned after ~18 days; design retrieval and audits with that window in mind. (eips.ethereum.org)


Emerging best practices (what’s new since 2024)

  • Build for EIP‑4844 by default. If you run a rollup or post data to L1, update clients and monitoring to understand blob fee dynamics and short retention. Budget with blob gas, not calldata. (eips.ethereum.org)
  • Use the Gas API before signing. Set floor/ceiling logic and consecutive‑increase guards; fall back to eth_feeHistory if the Gas API is unreachable. (docs.metamask.io)
  • Prefer WSS subscriptions for UX, but keep a polling fallback for resilience. Expect disconnects and reorgs; implement reconnection and idempotent handlers. (docs.metamask.io)
  • Page all log history queries. Split by block ranges and tighten address/topics; this is faster, cheaper, and avoids result ceilings/timeouts. (therpc.io)
  • Adopt Trace API for fraud, analytics, and support. It reduces ops time when debugging complex failures or false positives. (docs.metamask.io)
  • Turn on MEV protection for retail‑facing tx flow. Route eth_sendRawTransaction via Infura’s protected path; fall back only on SLO breach. (metamask.io)
  • Harden keys with allowlists and secrets. Use per‑env keys (dev/stage/prod), restrict methods and origins, and keep secrets server‑side to avoid CORS issues. (docs.metamask.io)
  • Design for decentralized RPC. With DIN live on EigenLayer as an AVS, align your SLAs and incident playbooks to take advantage of multi‑provider failover and crypto‑economic accountability. (theblock.co)

Compliance and governance: rate limits and monitoring

  • Understand plan quotas early (per‑second and daily). Size your ingestion, indexing, and alerting jobs to stay under budget and avoid bursts that trigger throttles. (support.infura.io)
  • Wire the Infura status page into ops workflows; alert on endpoint degradation and fail over via DIN‑supported partners when possible. (infura.statuspage.io)

Quick start checklist for CTOs

  • Choose endpoints: main L1 + your target L2s from the maintained endpoints catalog. (docs.metamask.io)
  • Provision API keys: one per environment; enable only needed networks/services and configure allowlists. (docs.metamask.io)
  • Integrate Gas API and set policy for fee bumps and timeouts. (docs.metamask.io)
  • Use WSS for UX‑critical flows with reconnection logic; poll as safety net. (docs.metamask.io)
  • Add Trace API to your investigation toolkit (paid). (docs.metamask.io)
  • If building with smart accounts, wire up the ERC‑4337 bundler. (docs.metamask.io)
  • If posting DA to L1 or integrating L2s closely, test type‑3 transactions and blob fee handling. (eips.ethereum.org)
  • Document quotas and SLOs; subscribe to status updates. (infura.statuspage.io)

Why teams choose Infura now

  • Velocity: standard JSON‑RPC + familiar SDKs with higher‑level APIs where it counts (Gas, Trace).
  • Reliability: operational maturity plus DIN‑backed decentralization and failover. (metamask.io)
  • Future‑proofing: first‑class support for Dencun blobs, ERC‑4337 bundling, and evolving testnets. (docs.metamask.io)

At 7Block Labs, we pair these primitives with delivery patterns—gas policies, event ingestion pipelines, AA wallet UX—that compress your time‑to‑value and de‑risk production cutovers. If you’re evaluating an Infura‑based reference architecture, we can benchmark it against alternatives or hybrid (self‑hosted + provider) designs for compliance‑heavy workloads.


References and footnotes


7Block Labs helps startups and enterprises design, build, and run production‑grade web3 systems. Want a second set of eyes on your Infura rollout or a migration plan for Dencun‑aware infrastructure? Let’s talk.

Like what you're reading? Let's build together.

Get a free 30‑minute consultation with our engineering team.

Related Posts

7BlockLabs

Full-stack blockchain product studio: DeFi, dApps, audits, integrations.

7Block Labs is a trading name of JAYANTH TECHNOLOGIES LIMITED.

Registered in England and Wales (Company No. 16589283).

Registered Office address: Office 13536, 182-184 High Street North, East Ham, London, E6 2JA.

© 2025 7BlockLabs. All rights reserved.