-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support querying for blocks and transactions #2103
Comments
|
@QuentinI If you're looking for something new to implement, seems like a good place to start |
Does block stream not work for it? |
Regarding |
@0x009922 You're probably the best person to explain what's missing in the block streaming API. |
* [feature] add FindAllTransactions query Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp> * [feature] add FindAllBlocks query Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp> * split valid and rejected txns in BlockValue Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp> * fix suggestions Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
…ons (hyperledger#2210) * [feature] add FindAllTransactions query Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp> * [feature] add FindAllBlocks query Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp> * split valid and rejected txns in BlockValue Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp> * fix suggestions Signed-off-by: Artemii Gerasimovich <gerasimovich@soramitsu.co.jp>
In Iroha Block Explorer, we need to show up to a user the list of latest blocks and transactions. Also it would be useful to query for some specific block/transaction by its id, height and hash relatively.
Thus, it would be nice to extend Query API with the following:
FindAllBlocks
, that returns a list of blocks. With pagination, of course. Ordered by height desc.There are several life stages of a block:
AFAIK in explorer we only need pending and committed blocks, and we need to distinguish them from each other.
FindBlockByHeight
, that returns a single block if it has been found. I think we need to know the block status here as well.FindAllTransactions
, that returns a list of latest transactions, ordered by timestamp desc. The most debatable query.I am not sure that this query is a good idea, because actually transactions are always contained within blocks, and its enough to query for blocks only to get transactions as well. But if we want to show the list of transactions decoupled from their blocks, how to paginate this data independently from blocks? Maybe we should drop the idea of "transactions list" decoupled from blocks.
FindTransactionByHash
, that returns a single transaction if it has been found. This is not as debatable asFindAllTransactions
is, but I think it might be really hard to query for it in an efficient way. Am I right?The text was updated successfully, but these errors were encountered: