Skip to content
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

With the rosetta queries for the block at a particular blockheight, one extra transactions i am getting? #56

Open
shassal opened this issue Nov 3, 2022 · 1 comment

Comments

@shassal
Copy link

shassal commented Nov 3, 2022

With the rosetta queries for the block at a particular blockheight, one extra transactions i am getting at the 0th index but that is not present in the explorer?
Is that a garbage transaction?
And is there any more explorer for kava present other than mintscan?

@nddeluca
Copy link
Member

nddeluca commented Nov 3, 2022

There can be up to two "extra" transactions in a block returned by rosetta. Cosmos blockchains support begin and end block functionalities, which allows balances to change before and after transactions are processed in a block.

Rosetta on the other hand has no concept of balance tracking outside of transactions.

Therefore this rosetta implementation, as well as the one included in cosmos-sdk, adds a transaction to represent balance changes in the begin block and another transaction to represent balances in an end block.

If we look at a block like 2208900, it has no transactions but rosetta reports a single transaction to represent the balance changes in the begin block.

These extra transactions are prefixed with either 0x00 (begin block) or 0x01 (end block) and use the block hash as the suffix.

The hash of block 2208900 is 7AFC8ACE45FE7872944F92C17A160ACB7589C3DDDDA0E15943009DA014340D0A and the transaction hash representing the begin blocker is 007AFC8ACE45FE7872944F92C17A160ACB7589C3DDDDA0E15943009DA014340D0A. If the block had any end block balance changes, a transaction with hash ``017AFC8ACE45FE7872944F92C17A160ACB7589C3DDDDA0E15943009DA014340D0A` would have been included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants