If a tx is sent to miners directly (e.g.: using flashbots) instead of the public mempool, etherscan lists these transactions as 'private transaction'.

How would I check if a tx is private using web3.eth.getTransaction or similar?

  • 1
    You can't do it by querying a node. Etherscan is able to do it cause it checks if the transaction was present in his mempool, but a normal node doesn't keep track of that.
    – 0xSanson
    Aug 23, 2022 at 14:01
  • Check if the to field of the transaction is not the recipient, but the address of the miner or any intermediary contract to allow privacy. Aug 23, 2022 at 16:20

1 Answer 1


You can't.

Etherscan achieves this by ordering all the transactions within that block by the gas price, if the order of the transaction (by index) does not match the order by the gas price (descending), the block contains private transactions.

And you could know the transactions that do not match the order are sent from private RPCs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.