question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Misleading transaction time when in micro block

See original GitHub issue

Describe the bug A time in the past is shown for transactions in micro blocks

The time does not makes sense as it looks like that the tx is executed at the already confirmed block, more precisely, that the clarity variable block_height is the height of the confirmed block. This is not true.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://explorer.stacks.co/transactions?chain=testnet
  2. See timestamp on microblock

Expected behavior Do not show a transaction time until the block with the block_height used during processing the transaction is confirmed on Bitcoin.

Screenshots image

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
JackNapolitanocommented, Dec 13, 2022

Follow up. I see that in the API code, is unanchored is being set to !dbTx.block_hash in db-controller.ts. But as we see in the response, the block_hash is not null, rather, it is "block_hash": "0x",

function parseDbAbstractTx(dbTx: DbTx, baseTx: BaseTransaction): AbstractTransaction {
  const abstractTx: AbstractTransaction = {
    ...baseTx,
    is_unanchored: !dbTx.block_hash,
    block_hash: dbTx.block_hash,
2reactions
rafaelcrcommented, Dec 13, 2022

@JackNapolitano you’re right, thanks for digging! I’ll get on it ASAP

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microblocks Reduce Transaction Processing Times to Seconds
The Stacks blockchain settles blocks on the Bitcoin blockchain, which averages one block every ten minutes. In order to provide users and ...
Read more >
txpool - What is the relationship between block time and the ...
Block time is the time it took for the block to be mined and added to the blockchain. However, the list of transactions...
Read more >
What happens to a mined block that contains an invalid ...
A Bitcoin transaction generally needs 6 confirmations from miners before it's processed. The average time it takes to mine a block is 10...
Read more >
On Slow and Fast Block Times | Ethereum Foundation Blog
ten minutes, for those ten minutes, and allowing the dictator to produce blocks very quickly.
Read more >
Real transaction speed - Protocol Development - Aeternity forum
it is clear to me that aeternity has times as fast as the dash ... I have seen orphan blocks and transactions moving...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found