Author: Pieter Wuille 2012-08-17 13:40:01
Published on: 2012-08-17T13:40:01+00:00
In an email thread, Jeff Garzik wrote about the higher Just Works value of the current version of MSG_MEMTX and suggested that it is generally better to do something unconditionally than generate a response under certain conditions. However, Pieter argued that returning an empty "inv" message is an unusual way of replying to an empty mempool. He explained that Bitcoin P2P is not a request-response protocol, and "inv" messages are only sent where there are inventory items to send. Therefore, special-casing an empty "inv" to mean empty mempool is trying to hack a request-response system on top of the asynchronous system. Pieter further stated that if there is a need for confirming the transmission of the mempool is complete, using a MSG_MEMTX message sounds like a good idea. No client would ever receive such an inv without requesting the mempool, and implementing handling MSG_MEMTX is trivial. Alan also noted that unknown messages are ignored intentionally for expansion purposes. Nonetheless, returning a response unconditionally has little to do with feature probing or discovery but serves merely as a clear, deterministic indication that processing is complete for each invocation.
Updated on: 2023-05-19T04:07:49.314632+00:00