Looking at the Status ICO from the sideline I noticed that once the transactions with more than 50 Gwei as gas price were cleared, the transaction being approved by the contract all had a hash starting by 0x00... and the hex value was slowly increasing.

Here is one example : https://etherscan.io/tx/0x00785cad03de2e353f16f7efcc5a06c356dced3807fa52d293886cba3bc8214f

I also noticed that people are saying they're able to get transactions through by changing price and gas limit to generate a new raw transactions. They are reporting it to be "working" after 10 or 15 attempts. It sounds like that's what it takes to get a zero at the start of the hash.

I wrote a quick python script to confirm my theory, I generated a tx with a hash starting by 0x000 and it was mined in less than a minute with a 50Gwei gas price.

Can someone confirm my theory that the tx hash is the next criteria after the gas price ?

2 Answers 2


In Parity the hash is the an item for the ordering criteria, as you can see here: https://github.com/paritytech/parity/blob/1aaafa2d11b42af6be97754f4bc06e2856904464/ethcore/src/miner/transaction_queue.rs#L179

So in theory, the hash can decide the order, if the previous ordering compared to "equal". However miners can, and probably do, run custom algorithms for ordering transactions.

To benefit themselves or their clients, during high demand, miners have been reported to have byzantine behaviour in transactions ordering.


You don't say which client you're using, and the case for Parity has already been mentioned. Note also that the Parity ordering can be changed on the command line using the following option:

--tx-queue-strategy S          Prioritization strategy used to order transactions
                                 in the queue. S may be:
                                 gas - Prioritize txs with low gas limit;
                                 gas_price - Prioritize txs with high gas price;
                                 gas_factor - Prioritize txs using gas price
                                 and gas limit ratio (default: gas_price).

For Geth, the ordering is explained in the following previous question:

What is the default ordering of transactions during mining, in e.g. geth?

In short, the Geth client sorts using the following method:

// This method first sorts and separates the list of transactions into individual
// sender accounts and sorts them by nonce. After the account nonce ordering is
// satisfied, the results are merged back together by price, always comparing only
// the head transaction from each account. This is done via a heap to keep it fast

I can't immediately see in the code that the hash is involved, but you might want to use the code pointers in that previous thread to poke around further.

But to echo the previous answer, you've no actual way of knowing how the miners are doing it, because they can tweak their algorithms in any way they like.

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.