Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Block.timestamp in UNIX nanoseconds outputBlockFormatter in 1.2.6 (quorum, RAFT) #3442

Closed
@VladoDemcak

Description

@VladoDemcak

We are using quorum with RAFT consensus. Once a block is mined the blockchain returns the block with timestamp in UNIX format with nanoseconds.

Example:
block.timestamp is "0x16015c8446c19c16" (decimal: "1585650267003657238", GMT: Tuesday, March 31, 2020 10:24:27.003 AM**)

#2791 has the fix for the problem and it has been merged into 1.0.

However in 1.x (as well as in the latest release 1.2.6) there is still utils.hexToNumber(block.timestamp); which fails for our setup.
https://github.com/ethereum/web3.js/blob/f9344d894866cbf64d67b49106b9b80562835af2/packages/web3-core-helpers/src/formatters.js#L295-L301

The #3070 (also referenced in #2791) has "Lower priority" issues - especially #1905 which is sadly still unchecked and still not merged in 1.2.6 (and 1.x).

image

My questions:

  • Is there any chance to get the fix for block.timestamp in 1.2.6 in near future?
  • Web3.js - 1.3.0 looks promising with lot of fixes including block.timestamp fix. Do you have any date when you will release 1.3.0?
  • 2.0.0-alpha.1 has been released 8 months ago. Are there any plans for release of stable version 2.x?

(if needed I can prepare steps to reproduce but it looks like the issue is well know but with low priority)

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.x1.0 related issuesDiscussionStaleHas not received enough activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions