> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# zkevm_consolidatedBlockNumber | zkEVM

> Polygon zkEVM API method that returns the latest consolidated block number. zkevm_consolidatedBlockNumber on zkEVM via Chainstack.

Polygon zkEVM API method that returns the latest consolidated block number.

The Polygon zkEVM chain uses batch verification to improve scalability and reduce gas fees. This means that multiple transactions are grouped together and verified as a single batch using zero-knowledge proofs. Once a batch is verified, it is connected to the blockchain, and the block number of the most recent block in that batch becomes the "consolidated block number.”

## Parameters

* `none`

## Response

* `result` — the hexadecimal value of the node's latest consolidated block number. The block number is used to identify the block's position in the blockchain and is updated every time a new batch of transactions is added to the chain.

## `zkevm_consolidatedBlockNumber` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "YOUR_CHAINSTACK_ENDPOINT";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  const consolidatedBlockNumber = async () => {

      // This will return the value in Hex
      const consolidatedBlockNumber = await provider.send("zkevm_consolidatedBlockNumber");
      console.log(`Consolidated Block Number: ${consolidatedBlockNumber}`);
    };

  consolidatedBlockNumber();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3
  node_url = "YOUR_CHAINSTACK_ENDPOINT"
  web3 = Web3(Web3.HTTPProvider(node_url))
  output = web3.provider.make_request('zkevm_consolidatedBlockNumber', [])
  print(output)
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/polygon_zkevm_node_api/zkevm_methods/zkevm_consolidatedBlockNumber.json POST /942aad90bb6a082676497030b81e40ba
openapi: 3.0.0
info:
  title: Polygon ZKEVM Node API
  version: 1.0.0
  description: This is an API for interacting with a Polygon zkEVM node.
servers:
  - url: https://nd-363-550-219.p2pify.com
security: []
paths:
  /942aad90bb6a082676497030b81e40ba:
    post:
      tags:
        - upload
      summary: zkevm_consolidatedBlockNumber
      operationId: zkevm_consolidatedBlockNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: zkevm_consolidatedBlockNumber
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: The latest consolidated block number.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object

````