0

I have not been able to find specific details about how the Transaction / Memory Pool was implemented in any of the Ethereum White / Yellow papers.

I am wondering if there is somewhere I can read about the specific implementation details of this mechanic.

2

It's unlikely that the implementation details of something like the memory pool are part of the specification. It might mention "there's a pool of transactions", but implementation would likely be left as an exercise for the implementer.

The important parts of the Geth implementation are in tx_pool.go (and for Parity it looks like the files in parity/miner/src/pool/). Your best bet would likely be to read the code and, if you're lucky, the associated comments.

  • 1
    Just to clarify, you are saying it is up to the Ethereum client to determine how they want to handle the txpool? As in different Ethereum clients may allow more or less tx to live in the pool for a given amount of time? – Shawn Tabrizi May 21 '18 at 7:32
  • 1
    Correct. It's up to the implementer. Which could be anyone. You're free to write your own client that handles the pool in a different way. – Richard Horrocks May 21 '18 at 8:01
  • 1
    In the past, the different handling of pending transactions in the clients has lead to funny error. From my logs: "With reference to geth even if you do a new transaction and broadcast it, if I recall correctly you need to increase the gasprice by at least 10%. It’s part of the spam protection. The tricky part is that parity has a different way of handling these. So in the last 1-2 weeks, I feel what is happening is some of these pending txns are getting dropped by one client but then picked up by the other and then re-broadcasted like in a loop" – Mikko Ohtamaa May 21 '18 at 8:32
  • 1
    Yes, I remember something similar. Perhaps it would make sense for the behaviour of the different clients to be described somewhere, but then anyone could write their own implementation with their own rules and not tell anyone. Perhaps I'm a miner and I don't want to include certain transactions in the blocks I mine. In which case I could either allow them into my pool, but not add them to my blocks, or I could just not add them to my pool in the first place, which would perhaps lead to errors similar to the ones @MikkoOhtamaa mentions. Perhaps there isn't an easy solution. – Richard Horrocks May 21 '18 at 9:15

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.