2

Is there any way to config my Go-Ethereum node so that it can send my tx directly to a miner node, which makes the transaction faster to be included into a block.

2

which makes the transaction faster to be included into a block.

It would get your transaction to the miner's transaction pool more quickly, but that's no guarantee it would get included in a block any faster.

In the best case, if the miner's transaction pool is completely empty, your transaction might get mined more quickly. However, the block time is ~15 seconds, so even if your transaction is put into a candidate block, you'll still have to wait on average 15 seconds for that block to be mined. (Yes, getting to the transaction pool earlier might mean you make it into the previous block... )

The normal case would be that there are plenty of transactions in the miner's transaction pool. (There are currently 32k pending transactions.) In which case the miner will pick those transactions by gas price. If your transaction isn't competitively priced then it won't get picked, and the speed of reaching the transaction pool is irrelevant. Without being able to quantify such an assertion, I'd speculate that increasing your gas price would be far more likely to get your transaction into a block more quickly.

In the worst case, if the transaction pool/queues of a given miner is full, your transaction will be dropped.

Is there any way to config my Go-Ethereum node so that it can send my tx directly to a miner node

No, the protocol works by flooding any traffic from your node to the neighbouring nodes it knows about. There's no intelligence built in to allow to distinguish between miners and non-miners.

Also, you don't know which miner is going to solve the PoW, so you'd have to find a way to send your transaction to all the miners rather than just a choice few... In which case you may as well just use the current system which sends the transaction to everyone. (And at any point in time, a given node may switch between non-mining and mining anyway.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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