PSE Distribution Timing#37
Merged
Merged
Conversation
TxCorpi0x
commented
Nov 26, 2025
TxCorpi0x
left a comment
Contributor
Author
There was a problem hiding this comment.
- The start time should be the same day at 12:00 GMT
- The months (no 30 days and no Gregorian calendar) just try do the in the same day in every moth capped to 27th.
@TxCorpi0x reviewed 2 of 2 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh, @miladz68, and @ysv)
ysv
approved these changes
Nov 27, 2025
ysv
left a comment
Contributor
There was a problem hiding this comment.
@ysv reviewed 2 of 2 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh and @miladz68)
miladz68
approved these changes
Nov 28, 2025
miladz68
left a comment
Contributor
There was a problem hiding this comment.
@miladz68 reviewed 2 of 2 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @masihyeganeh)
TxCorpi0x
added a commit
that referenced
this pull request
Dec 2, 2025
* PSE start time on upgrade time day start UTC * Set distribution schedules duration as 30days * Change start time to 12:00 GMT on 28th of month * Rename period to month in PSE init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request updates the distribution schedule logic for PSE allocations to use fixed 30-day intervals for each distribution period instead of calendar months. The changes ensure that all distributions happen exactly every 30 days at midnight UTC, starting from the upgrade date, which improves predictability and consistency across periods. The test suite is also updated to validate the new interval logic and remove assumptions about calendar month boundaries.
Distribution logic changes:
The distribution schedule now uses fixed 30-day periods rather than calendar months, with each period starting at 00:00:00 UTC on the upgrade date. The code calculates each period's timestamp by adding exactly 30 days for each period.
Allocation amounts and error handling are updated to refer to "periods" rather than "months," and each clearing account's total balance is divided evenly across these periods.
Test suite updates:
All tests now validate that distributions occur exactly every 30 days, starting at midnight UTC, and that allocation amounts per period are correct. Month-based checks are replaced with 30-day interval checks.
Edge case tests are updated to verify correct behavior across leap years and month boundaries using fixed 30-day intervals, removing reliance on Gregorian calendar month handling.
Reviewers checklist:
Authors checklist
This change is