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.

1 Answer 1

4

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

2
  • 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, 2019 at 10:05
  • 1
    you can find here, we introduce some new factor for ordering the tnx github.com/nextyio/gonex/blob/…
    – Tony Dang
    Jul 17, 2019 at 10:08

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.