-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add transaction time in gaia lite #3238
Comments
What you're asking for is to include metadata in each tx via this endpoint? Do we need to perform any additional queries for this data? If so, is it worth the overhead? If not, great! |
If we have the meta data for each block locally we don't need to query anything else I think. |
We (and likely a lot of third party wallet developers) will absolutely love this! |
Looking through Tendermint RPC, looks like this will require an additional query. The thing is, this endpoint queries a series of paginated txs by tags, correct? Thus, the included txs can have varying block times? If so, then we'd have to perform a block query for each unique block height. |
I think time should be left to the wallet (query by height and cache it) or browser (record time for each tx when scan block) to handle, the blockchain should be as simple as possible. |
This is not about adding it to chain but letting the REST interface handle the caching and tx enriching to prevent the caching to be duplicated by every wallet. |
@faboweb there is absolutely zero caching in the REST client right now. imho, this will a very unclean implementation and I second the suggestion by @yangyanqing. |
I disagree. And maybe I was miss understood when I said |
I get that. Thing is the REST client will be doing the exact same work you're client would have to do here -- make a block query for every unique tx height. If paginated results contain n txs, the worst case total # of requests will be O(n) + 1. I don't mind doing this @faboweb just I want us to come to an agreement that the REST client will no longer be just a simple proxy between the app and the RPC, but rather data aggregation as well 👍 |
Summary
Transactions queried via
/txs
don't hold the time. They only hold the block height and then the client can query the block meta information to enrich the transaction. It would be nicer to push this enrichment into gaia lite as this is a procedure probably most of the clients will do.Problem Definition
Proposal
For Admin Use
The text was updated successfully, but these errors were encountered: