New P2P commands for diagnostics, SPV clients



Summary:

The discussion is about the format of a project and potential user input to determine what information is necessary. Matt's point is that a branch-per-transaction could create duplicate data and suggests that a format to solve this issue would be more complex. The proposal for a three-part change includes adding the mempool command, syncing up nodes' mempools on startup, and changing the "block" message to consist of a header + num transactions + vector instead of full transactions for protocol version >= X. Upon receiving such a block, the missing transactions from the mempool are requested with getdata. After receiving the tx message, it checks if it was one that was missing from a block. Once all transactions in the block message are in memory, the block is assembled and verified as usual. This should speed up the block propagation process, and miners have an incentive to upgrade because it reduces wasted work.The third step involves a new message, getmerkletx, which takes a vector and returns a merkletx message: "merkle branch missing the root + transaction data itself" for each requested transaction. The filtering commands are added so that the block message only lists transaction hashes that match the filter, which can then be requested with getmerkletx.


Updated on: 2023-06-06T05:00:45.327822+00:00