When navigating transactions using the block explorer, the order in which we visit / link transactions is reversed.
We identify an individual transaction via its block height and its transaction offset. This transaction offset is always meant to be in ascending order, such that the 0 offset is the first transaction within the block.
This gets a little weird when it comes to retrieving the list of "Latest Transactions" as we want that list to be descending overall, but still return the appropriate offset number correctly.
Where this gets odd is in retrieving the Transaction Detail for a given (height, offset) pair. Instead of returning the transaction that corresponds to the given (height, offset) we instead end up returning the transaction that corresponds to (height, N - offset) where N is the total number of transactions within the block at height.
When navigating transactions using the block explorer, the order in which we visit / link transactions is reversed.
We identify an individual transaction via its
block height
and itstransaction offset
. This transaction offset is always meant to be in ascending order, such that the0
offset is the first transaction within the block.This gets a little weird when it comes to retrieving the list of "Latest Transactions" as we want that list to be descending overall, but still return the appropriate offset number correctly.
Where this gets odd is in retrieving the
Transaction Detail
for a given(height, offset)
pair. Instead of returning the transaction that corresponds to the given(height, offset)
we instead end up returning the transaction that corresponds to(height, N - offset)
whereN
is the total number of transactions within the block atheight
.Example: https://explorer.decaf.testnet.espresso.network/block/315286
This block has two transactions within it. If we look at its transaction page: https://explorer.decaf.testnet.espresso.network/transactions?block=315286
We can see both of these transactions. We can even see that they list links to these pages:
But notice that the hashes of each of the clicked links doesn't match the initially listed hash.
TX~v_HZvxLYwnnqkSqr56edsFVuXdnXs5nJM3JkS1TAwg1N
indicates that it links to https://explorer.decaf.testnet.espresso.network/transaction/315286-1, but that page showsTX~Nev36VRr3zOQ-BFRZICxG-aLzDQoe1nlS24G4PxWBA8R
instead.This is also true for the other.