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

EVM-440-Using-UTC-time #1304

Merged
merged 6 commits into from
Mar 21, 2023
Merged

EVM-440-Using-UTC-time #1304

merged 6 commits into from
Mar 21, 2023

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Mar 16, 2023

Description

Using local validators’ time zones may result in chain fork. So through this PR, we are using the UTC time throughout the code.

PR also introduces a lint rule that checks if time.Now variations are being used in code without calling the UTC function as well.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@goran-ethernal goran-ethernal self-assigned this Mar 16, 2023
@goran-ethernal goran-ethernal added the feature New update to Polygon Edge label Mar 16, 2023
@goran-ethernal goran-ethernal marked this pull request as ready for review March 16, 2023 15:22
Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

I don't find it necessary to create a package out of the stdlib for wrapping the same calls to the stdlib, it creates unnecessary roundtrip for the reader, the value provided is very limited and it's very prone to be skipped in new code.

I vote for just using stdlib

@goran-ethernal
Copy link
Collaborator Author

goran-ethernal commented Mar 20, 2023

@vcastellm Those were my initial thoughts as well, but I've gone with Evgeny's proposal on that task, to have it wrapped for easier usage. I am down whatever we find more comfortable.

Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

🚀

@goran-ethernal goran-ethernal merged commit c615d0c into develop Mar 21, 2023
@goran-ethernal goran-ethernal deleted the EVM-440-Using-UTC-time branch March 21, 2023 10:09
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants