2

By default, miners select transactions with high fees from the mempool. So, transactions which are dependent and have a specific order can be selected randomly without respecting this order. Will I be able to insert my own algorithm of pending transaction selection in the Ethereum private net? and how to do this insertion? Thank you.

2

Sure, you can implement your own algorithm to order the txpool. Currently, they order by gas price that make sense for mining incentive

https://github.com/ethereum/go-ethereum/blob/6bd896a97f0c86fdb6d0538f5f839d7ea104e888/core/tx_list.go#L374

  • Thank you for your answer. Is there an algorithm (source code) that is already done which selects transactions by order or priority? I can't find something that helps me to begin. – AA05 Jul 17 at 10:05
  • you can find here, we introduce some new factor for ordering the tnx github.com/nextyio/gonex/blob/… – Ha ĐANG Jul 17 at 10:08
  • Thank you for your help. – AA05 Jul 17 at 10:25

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.