Skip to main content

Pending State

When a transaction is transmitted to the Ethereum network, it initially enters a provisional state, awaiting execution by the network's nodes. If the gas price specified in the transaction is set too low, it may linger in this state for an extended period, as nodes prioritize processing transactions with higher gas prices.

During this provisional phase, the entity that initiated the transaction has the ability to modify the transaction details at will. They can achieve this by transmitting a new transaction bearing the same nonce.

Prerequisite Readings

Humans.ai vs Ethereum

In Ethereum, unconfirmed blocks are generated and held in a queue awaiting miners' processing. These unconfirmed blocks contain transactions that miners select based on the highest gas reward. This system is necessary because Ethereum lacks definitive block confirmation. Instead, blocks are considered probable, becoming increasingly unlikely to be reversed as time passes and more blocks are added.

Humans.ai, on the other hand, operates differently. It has no concept of an unconfirmed state. Humans.ai uses Tendermint Core BFT consensus, which ensures that transactions are immediately finalized. As a result, Ethermint doesn't require an unconfirmed state mechanism since most transactions will be included in the next block (average block time on Cosmos chains is ~8 seconds). However, this creates some issues for Ethereum Web3-compatible queries that rely on the unconfirmed state.

Another key difference is that Humans.ai validators or block producers create blocks by adding transactions from their local memory pool in a first-in-first-out (FIFO) order. On Humans.ai, transactions cannot be hand-picked or reordered from the Tendermint node mempool, unlike in Ethereum.

Pending State Queries

Humans.ai performs queries that take into account any outstanding transactions residing in a node's transaction memory pool. A query regarding the pending state will be subjective and made relative to the target node's memory pool. Consequently, the pending state may differ for the same query when directed to two distinct nodes.

JSON-RPC Calls on Pending Transactions