-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[sui system] SIP-39 (reroll) #21303
base: main
Are you sure you want to change the base?
[sui system] SIP-39 (reroll) #21303
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is our test plan for this? I see new unit tests but do we have end to end test coverage?
@@ -139,3 +143,9 @@ public fun increment_epoch_number(self: &mut TxContext) { | |||
public fun increment_epoch_timestamp(self: &mut TxContext, delta_ms: u64) { | |||
self.epoch_timestamp_ms = self.epoch_timestamp_ms + delta_ms | |||
} | |||
|
|||
#[test_only] | |||
public fun set_epoch(self: &mut TxContext, epoch: u64) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call this advance_epoch
? since it can't go backwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have APIs that should help address this already in test_scenario
. I would vote we continue to use those and not build out competing APIs
if (epoch < start_epoch + phase_length) { // phase 1 | ||
(12, 8, 4) | ||
} else if (epoch < start_epoch + (2 * phase_length)) { // phase 2 | ||
(6, 4, 2) | ||
} else { // phase 3 | ||
(3, 2, 1) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, do we want {}
on the if-else bodies here?
if (!self.extra_fields.contains(key)) { | ||
self.extra_fields.add(key, ctx.epoch()); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider
if (!self.extra_fields.contains(key)) { | |
self.extra_fields.add(key, ctx.epoch()); | |
}; | |
if (!self.extra_fields.contains(key)) self.extra_fields.add(key, ctx.epoch()); |
Description
Test plan
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.