Block height

Last updated:

The RPC methods

getBlockHeight: Returns the current block height of a Solana node at the requested commitment level, as a number. It is lower than the slot getSlot returns, because skipped slots produce no block. getBlockHeight reference →

eth_blockNumber: Returns the number of the most recent block on Ethereum and other EVM chains, as a hex quantity; on these chains the block number is the block height. eth_blockNumber reference →

Applies to: All chains

In more detail

On EVM chains every block height is used, so the block number returned by eth_blockNumber is the block height. On Solana, blocks are produced in slots and some slots are skipped, so block height (getBlockHeight) is lower than the current slot (getSlot); the two numbers are not interchangeable.

Solana also uses block height for transaction expiry: a transaction's recent blockhash is valid until a lastValidBlockHeight returned alongside it, so expiry is checked against block height, not against slots.

See also

Sources

All terms in the RPC and blockchain glossary