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: remove monoclock & add tz as chain param #3193

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

MikaelVallenet
Copy link
Member

based on #3016

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests

@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🤖 gnovm Issues or PRs gnovm related labels Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 60.50269% with 220 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
gnovm/tests/file.go 59.70% 191 Missing and 29 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Nov 25, 2024
@MikaelVallenet
Copy link
Member Author

MikaelVallenet commented Nov 28, 2024

Hi @moul,

I see two ways to make a constant parameter as discussed in the last contributor call

  • the first would be to add the chain timezone parameter in the genesis.json file in the same way as a chain-id
  • the second would be to add a const prefix to the genesis_params.toml file, for example const:chain_tz, from which point on this parameter would be treated differently, notably in Setters, where it would not be modifiable.

I see an advantage in the second option, which is that you can easily change a parameter from const to non-const, whereas in the first option the timezone won't be modifiable regardless of the configuration. Now, do we want the tz to be modifiable on certain chains?

If you see a third or more options, don't hesitate.
What do you think?

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Nov 28, 2024

I'm a bot that assists the Gno Core team in maintaining this repository. My role is to ensure that contributors understand and follow our guidelines, helping to streamline the development process.

The following requirements must be fulfilled before a pull request can be merged.
Some requirement checks are automated and can be verified by the CI, while others need manual verification by a staff member.

These requirements are defined in this configuration file.

Automated Checks

🟢 Maintainers must be able to edit this pull request (more info)
🔴 The pull request head branch must be up-to-date with its base (more info)

Manual Checks

No manual checks match this pull request.

Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 The pull request was created from a fork (head branch repo: MikaelVallenet/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

The pull request head branch must be up-to-date with its base (more info)

If

🟢 Condition met
└── 🟢 On every pull request

Then

🔴 Requirement not satisfied
└── 🔴 Head branch (MikaelVallenet:dev/mikaelvallenet/feat/time-remove-mono-add-tz-as-chain-param) is up to date with base (master): behind by 53 / ahead by 16

@moul
Copy link
Member

moul commented Dec 9, 2024

I was also considering adding a global variable to the standard library that is set to a custom value during its func init(). This would allow it to function like a "dynamic" constant within the package, eliminating the need to pass this fixed value everywhere. It would also make the standard library independent of parameters, std, and so on.

What do you think?

@MikaelVallenet
Copy link
Member Author

MikaelVallenet commented Dec 10, 2024

I was also considering adding a global variable to the standard library that is set to a custom value during its func init(). This would allow it to function like a "dynamic" constant within the package, eliminating the need to pass this fixed value everywhere. It would also make the standard library independent of parameters, std, and so on.

What do you think?

Yeah i think it could be a good idea, at least for now and make it easier to implement.
I will update the code to do this in the following days 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in focus Core team is prioritizing this work 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants