-
Notifications
You must be signed in to change notification settings - Fork 228
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
get_transactions
method not returning results in expected order
#4549
Comments
It seems that when storing data in RocksDB, ascending order( |
it's expected, the result is ordered by script first then block number, since the script code hash are same, it's order by args first:
|
May I ask what is the purpose of ordering the results by script first? My use caseWhen a UDT first appears in a transaction's outputs alongside a Unique Cell, the unique cell defines the UDT's information or metadata. So I expect that the Well, it's ok that the caller can sort the result by himself. |
the default indexer backend is rocksdb, it's difficult to design a secondary index in kv store, which will introduce a lot of complexity and storage size overhead. so we use a simple way to implement this ordering strategy. you may try the rich-inexer ( https://github.com/nervosnetwork/ckb/blob/5233b91a586fbe628f71ea5e42de83110a25eccf/util/rich-indexer/README.md#ckb-rich-indexer ) and implement a more complex ordering strategy based on it. |
The results are ordered by script first and then by block number. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Current Behavior
The following request is not returning results in ascending order.
Result
Despite specifying the order as "asc" in the request parameters, the results returned are not in ascending order.
Expected Behavior:
I expected the transactions to be returned in ascending order based on the specified parameters.
Actual Behavior:
The transactions returned do not appear to be sorted in ascending order, as indicated by the block_number values. This is contrary to the expected behavior
Environment
See the node of https://testnet.ckb.dev
The text was updated successfully, but these errors were encountered: