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!: time library #11542

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

feat!: time library #11542

wants to merge 1 commit into from

Conversation

LHerskind
Copy link
Contributor

@LHerskind LHerskind commented Jan 27, 2025

Fixed #11520. Moves the time math back into a library with access to storage. Alters a few getters to make it less leaky around the immutability or the vars (thereby breaking for nodes depending on those):

  • GENESIS_TIME() -> getGenesisTime()
  • SLOT_DURATION() -> getSlotDuration()
  • EPOCH_DURATION() -> getEpochDuration()

Keeps bunch of the time math separate though, mainly the things related to conversion between the types. By moving the genesis into that library storage as well, we can get a more clean api, for example cases where we would previously pass ts - GENESIS_TIME need only pass along ts and GENESIS_TIME is only in that library.

Should make it simpler to deal with #11519 and #11521 now.

Diff looks bigish because a lot of imports are now TimeLib instead of TimeMath.

Copy link
Contributor Author

LHerskind commented Jan 27, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@LHerskind LHerskind marked this pull request as ready for review January 27, 2025 21:57
@AztecBot
Copy link
Collaborator

AztecBot commented Jan 27, 2025

Docs Preview

Hey there! 👋 You can check your preview at https://679d0913468847339beba7f0--aztec-docs-dev.netlify.app

@LHerskind LHerskind marked this pull request as draft January 28, 2025 15:18
@LHerskind LHerskind marked this pull request as ready for review January 29, 2025 13:23
@LHerskind LHerskind force-pushed the lh/11520 branch 2 times, most recently from 0a1c48b to 038f085 Compare January 30, 2025 15:17
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.

feat: time library
2 participants