0
This link mentions that
"[getdata] can be used to retrieve transactions, but only if they are in the memory pool or relay set - arbitrary access to transactions in the chain is not allowed..."
But can't an SPV node do the following to have the arbitrary access to a transaction T (I am assuming that the SPV node knows the block hash H of the block B containing T):
- set a bloom filter using filterload for T at some full node
- send getdata request with type MSG_FILTERED_BLOCK and block hash H
- then in response, the full node will generate two messages for the SPV node: first, a merkleblock of B; and second, the transaction T (as mentioned here and here)
Doesn't this mechanism actually gives arbitrary access to transactions?
That only works for a node which has transaction-index activated. If it doesn’t, it would not offer this service during the p2p handshake (version message indicates available services), and it would not be possible with this peer. – James C. – 2018-11-30T07:43:13.503