Skip to content

fix!: use millisecond resolution of block time - #650

Merged
lklimek merged 7 commits into
v0.13-devfrom
block-time-millis
Jun 28, 2023
Merged

lklimek merged 7 commits into
v0.13-devfrom
block-time-millis

Conversation

@lklimek

@lklimek lklimek commented Jun 28, 2023 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Dash Platform uses timestamps with millisecond resolution. Tenderdash uses nanosecond resolution.

It means Dash Platform cannot correctly pass block timestamp to its clients. As it is required to verify proofs, we need to adjust time formats.

What was done?

We decided to decrease resolution of timestamp in Tenderdash.

Block time, in tmtime.Now(), is truncated (rounded down) to near millisecond.

How Has This Been Tested?

Unit tests and e2e tests

Breaking Changes

Block time is truncated down to the nearest millisecond.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek
lklimek changed the base branch from v0.12-dev to v0.13-dev June 28, 2023 09:53
@lklimek
lklimek marked this pull request as ready for review June 28, 2023 11:52

@shotonoff shotonoff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lklimek
lklimek merged commit fdbf643 into v0.13-dev Jun 28, 2023
@lklimek
lklimek deleted the block-time-millis branch June 28, 2023 12:05
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

Successfully merging this pull request may close these issues.

2 participants