I would like to continuously get the transactions sended to a specific address while using a light client. I underscore that I am talking about regular transactions, not the contract invocations.
As far as I understood, there is no elegant way to do that in Ethereum. The only two options that I see is to get the whole block and parse the transactions in JS ( as was suggested through eth_getBlockByNumber Common useful JavaScript snippets for geth ). Or to first get the transaction hashes and request the transaction receipts for each of them through eth_getTransactionReceipt.
But what exactly will light client will do in the second case? Will it issue a separate TCP packet for EACH transaction receipt? Will the overhead in such a case be more than that of the first above described option? So, what do you think is the most viable option?
Also, it was suggested here ( https://ethereum.stackexchange.com/a/45957/49595 ) to use getBalance (i.e. eth_getBalance) first to make sure that the balance has changed (so that some transaction appeared within the block). Hm. Pretty cool, but still - what is the best way to to get the sender's address if no transaction hash is known beforehand?
Edit: At the same time I don't quite understand how eth_getBalance will work on the light client. According to the LES specification, it has to download the whole block even if only the balance from one certain transaction is required. Right?
Edit2: I am just testing out JSON RPC on my private blockchain. I made two transactions by transfer of 1 Wei from one account to another. Then I outputted the pending block header. The sad part is that logsBloom is all zeroes - so there is definitely no information is kept about regular transactions.
Edit3: I looked at LES specification once more. It has a GetReceipts function which accepts the hash of the block. And at the same time eth_getTransactionReceipt accepts the hash of the transaction instead. It is confusing, but it probably ultimately means that once any receipt is requested, the light client will call GetReceipts for the whole block. Which is a good idea in my case, since I have to pull all the receipts anyway.