Avoiding count in listaddresstransactions

+3 votes
"listaddresstransactions" takes count as a parameter to display number of transactions. I found max count value accepted is "199000000000". Is there a way to remove this restriction such that it should display all the transaction irrespective of count, as blockchain may have large number of transactions.
asked Aug 1, 2017 by amitsh

1 Answer

+4 votes
If you have that amount of transactions, you shouldnt really be calling a single API method to get them all.
It is far better to get large amounts of data in chunks. JSON-RPC is not an open http or websocket connection.

Usually systems would divide the load by getting blocks, and showing the last set of blocks and their transactions, and then fetching either backwards or forwards in chunks.

If you wish to get hundreds of millions of transactions, you would want to keep them in a database and not repeat the call again, which kind of defeats the point of blockchain. If you want to show all the data on a UI, you would show it in chunks, and fetch with ajax or websockets then next batch.

I am surprised the limit is set to such a high number as199000000000. It seems that this is a point of potential abuse, whether its load/mem/timeouts/ etc
answered Aug 1, 2017 by MaSsv
Indeed, attempting to retrieve that many transactions in a single API call would generate a massive JSON-RPC response that would be too large to fit in memory.