sui icon indicating copy to clipboard operation
sui copied to clipboard

Add batch read txn API

Open qiaokan opened this issue 2 years ago • 5 comments

Currently, there is an API to get checkpoint

https://docs.sui.io/sui-jsonrpc#sui_getCheckpointContents

it gives you a list of transaction digests

however, there is no batch get transactions API such that I can get the list of full transactions by digests.

Can you add a batch read API?

qiaokan avatar Feb 13 '23 06:02 qiaokan

I believe @qiaokan is building a service that needs to subscribe to a stream of transactions. Does it make sense to build it with getCheckpointContents + batch getting transactions by digests? cc @patrickkuo @longbowlu for fullnode api.

mwtian avatar Feb 13 '23 06:02 mwtian

you should be able to use batched jsonrpc calls to get that. cc @666lcz if we have any sdk support around that

longbowlu avatar Feb 14 '23 08:02 longbowlu

do you have a plan to support native batch API?

qiaokan avatar Feb 14 '23 08:02 qiaokan

we have plan to support batch/multi get api using rocks db's multi get feature, @siomari is working on it

patrickkuo avatar Feb 14 '23 11:02 patrickkuo

cool. Thanks!

qiaokan avatar Feb 14 '23 18:02 qiaokan