-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 sequence and account number in tx #4713
Comments
Thanks for opening an issue @ggomma. But we intentionally removed the sequence and account numbers from the However, perhaps we can inject the account and sequence numbers when they're queried for. But this won't work when nodes are pruning. |
I'm working on a multi-chain TypeScript library and trying to add support for Cosmos. This is really an issue for us. It doesn't matter whether these numbers are coming directly from the database or being injected, but if we don't get them when we query for a transaction we can't verify the signature. Pruning nodes are not really a consideration for us. |
@willclarktech we'd have to inject it by doing a query for the signing account(s). Adding it back to That being said, the work required to inject can easily be done by your library/app. In other words, the way the SDK would do this would be the exact same way an app/library would: for every tx signer s, query for account s at tx height h. This isn't to say the SDK won't do this, but just not likely anytime soon. Would be happy to review and merged a PR though! |
@alexanderbez I didn't realise you could query an account relative to a tx height, thanks! Is this possible via e.g the Gaia-Lite REST API or only via RPC? EDIT: I found it by experimenting: |
Yes, you can. Just append the |
Thanks for your comment. @alexanderbez |
Currently the transaction stored in blockchain doesn't contain sequence and account number.
So when user retrieve the transaction from blockchain or DB, user can check that the signature and hash match. But user can not verify whether the hash is correctly calculated from the transaction.
I know that there's no critical issue event if the transaction in the DB does not contain those number. But it would be much better that response(tx in DB) holds sequence and account number.
The text was updated successfully, but these errors were encountered: