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

feat: update system-time rule to not trigger on time.Now().Round(0).UTC() #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

julienrbrt
Copy link

ref: cosmos/cosmos-sdk#18239 (comment)

I am not too familiar with CodeQL expression, so I have used GitHub Copilot to help me.

@calvinaco
Copy link
Contributor

Hello @julienrbrt , thank you for your PR and sorry the late reply.

I read your Cosmos SDK reference and understand the use of time.Now() are at the genesis generation and test cases, which are legit cases.

However, I believe the existence of this rule is for a wider context that inside any state transition there shouldn't be use of time.Now() anywhere to avoid non-determinism.

As a result, I don't think we should loosen this rule or suggest to use UTC time.

Happy to discuss further here.

@julienrbrt
Copy link
Author

That is definitely true. Do you think there is a way to tweak this rule better then?

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