2

Sorry for jumping on a very old post how ever came across it looking for something else. For those interested, the 24 confirmation events are being emitted due in fact to 24 being the default internal Web3 setting for number of acceptable confirmations. This setting can be set to a lower or higher confirmation count. To read the current setting: web3.eth....


1

The issue you raise is the problem of finality in blockchain consensus. While highly unlikely, it is possible for a transaction to be dropped even after 5 confirmations. This would only happen if there is a temporary fork in the blockchain and the chain with your transaction gets dropped in favour of an alternate, "longer" chain. If that happens ...


1

A transaction cannot be removed from the blockchain: once it is saved in a block it is there forever(*). A transaction could be rejected, should this happen it will not be present in a block. (*) A whole block could be rejected AFTER the first confirmations , but this is a sort of catastrophic event that means a lot of bad things happened; ALL the following ...


1

Is it enough to request the current block number Yes Can the block become an uncle It doesn't become an uncle. It is or it isn't. The problem is your node may or may not be following the chain that will eventually become the canonical chain. With each block confirmation, you reduce the odds of this exponentially. So, if you are not happy with the risk at ...


1

Yes it is still possible. Miners choose what transactions they wish to mine. Usually they choose to mine transactions that have the higher gas price in order to earn the most out of fees but they have no obligation to.


1

If you are waiting for many transaction receipts, then it is more efficient to listen for newBlockHeaders event and search for pending transactions, e.g. web3.eth.subscribe('newBlockHeaders', async (error, event) => { const blockTxHashes = (await web3.eth.getBlock(event.hash)).transactions; for (const pendingTxHash of pendingTxHashes) { if (...


Only top voted, non community-wiki answers of a minimum length are eligible