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

The nakamoto block time is undefined in the blocks by burn block query but defined in the data return from the get blocks web socket connection #1918

Closed
BLuEScioN opened this issue Apr 1, 2024 · 1 comment · Fixed by #1921
Assignees
Milestone

Comments

@BLuEScioN
Copy link
Collaborator

BLuEScioN commented Apr 1, 2024

In the payload from the web socket I see this response:


{
    "canonical": true,
    "height": 21631,
    "hash": "0xc5a17ebc813d2d84439b9b96ab51b3959e366dcb78b91cc1b7819e8c7067b489",
    "block_time": 1712012187,
    "block_time_iso": "2024-04-01T22:56:27.000Z",
    "index_block_hash": "0xa933580fb10151a99810bd9ffd15e1ab6580d998bf83b3135a497b2dc0cee80d",
    "parent_block_hash": "0x6ee1bbd45e115f08cd3f55147811e52f4769ce5f41881f98cafbd9f7daab97de",
    "burn_block_time": 1712012187,
    "burn_block_time_iso": "2024-04-01T22:56:27.000Z",
    "burn_block_hash": "0x6baff5b16361ea055f678ccae1d667593b5f929ae21625fa311b074e49c2e256",
    "burn_block_height": 1099,
    "miner_txid": "0xe1401637b195f4e71784e24d1fe0bcd31ce6b65627375149e891861ef58bfaf0",
    "parent_microblock_hash": "",
    "parent_microblock_sequence": -1,
    "txs": [
        "0xec9618366efbd149c26f146b2bf5c9a5c62143b3ab885110975ca102c303ab18"
    ],
    "microblocks_accepted": [],
    "microblocks_streamed": [],
    "execution_cost_read_count": 0,
    "execution_cost_read_length": 0,
    "execution_cost_runtime": 0,
    "execution_cost_write_count": 0,
    "execution_cost_write_length": 0,
    "microblock_tx_count": {}
}

And in the response fromm the blocks by burn block query I get:

api.blocksApi.getBlocksByBurnBlock({
heightOrHash,
limit,
offset: pageParam,
}),

{
     "canonical": true,
     "height": 21609,
     "hash": "0x1e7b282176a81e39e290675f5fb004c047692dcda00450cd150f385a9a31232a",
     "index_block_hash": "0xa5bbf5663e8bbbb483d89ab5c4b7046619ae140023c8d901ccd7b93fe49e1f0f",
     "parent_block_hash": "0xce9adf15f548d36f442e575047c50225f3ca7b47ef0f9ef48aa69bbba6b67d35",
     "parent_index_block_hash": "0x13768e28cd1f7d24bb2da6558e7d96e4b67d63478b3d2778d6c044988ffe6e13",
     "burn_block_time": 1712012187,
     "burn_block_time_iso": "2024-04-01T22:56:27.000Z",
     "burn_block_hash": "0x6baff5b16361ea055f678ccae1d667593b5f929ae21625fa311b074e49c2e256",
     "burn_block_height": 1099,
     "miner_txid": "0xe1401637b195f4e71784e24d1fe0bcd31ce6b65627375149e891861ef58bfaf0",
     "tx_count": 1,
     "execution_cost_read_count": 0,
     "execution_cost_read_length": 0,
     "execution_cost_runtime": 0,
     "execution_cost_write_count": 0,
     "execution_cost_write_length": 0
   },

My issue is I am unable to render the stx block block time correctly using the response from the blocks by burn block query.

I would also like to note that I think it would be helpful and it would make sense if the responses from these two api sources lined up better.

For example, the blocks by burn block query returns tx_count: number whereas the web socket returns txs: [txid]

@BLuEScioN BLuEScioN converted this from a draft issue Apr 1, 2024
@BLuEScioN BLuEScioN changed the title The nakamoto block time seems inaccurate. It's showing way in the past from the burn block time that its in The nakamoto block time is undefined in the blocks by burn block query but defined in the data return from the get blocks web socket connection Apr 1, 2024
@zone117x zone117x assigned zone117x and unassigned rafaelcr Apr 3, 2024
@zone117x zone117x linked a pull request Apr 3, 2024 that will close this issue
@zone117x zone117x moved this from 🆕 New to 👀 In Review in API Board Apr 3, 2024
@zone117x zone117x added this to the Q2-2024 milestone Apr 3, 2024
@zone117x
Copy link
Member

Fixed

@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in API Board Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants