-
Notifications
You must be signed in to change notification settings - Fork 122
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
Feature: Seconds Precision Timestamp Update #1672
Conversation
Benchmark for e07bf32Click to view benchmark
|
c0d6b57
to
869f37e
Compare
@@ -40,7 +40,7 @@ impl ShowLedger { | |||
) | |||
.map_err(Error::IOError)?; | |||
|
|||
let instant = Self::get_current_time(out, TimePrecision::Minute)?; | |||
let instant = Self::get_current_time(out, TimePrecisionV1::Minute)?; |
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.
How about we make committing the state changes from generate_seconds_precision_state_updates
part of the simulator's bootstrap process? This is not just important for people running the show-ledger
command but for users who're relying on second precision and running their blueprints in the simulator.
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.
Hrm, was thinking of updating resim at a later PR so that users don't build against interfaces which don't exist on ledger yet but I think that might be fine so will implement your updates
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.
I think that if we plan on releasing a new version of Scrypto on the day of the protocol update then it would be fine if resim was updated.
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.
Running into some issues right now with getting this implemented. As discussed with @0xOmarA , he will create a follow-up PR fixing resim.
@@ -222,7 +239,14 @@ pub const CONSENSUS_MANAGER_COMPARE_CURRENT_TIME_IDENT: &str = "compare_current_ | |||
#[derive(Debug, Clone, Eq, PartialEq, ScryptoSbor)] | |||
pub struct ConsensusManagerCompareCurrentTimeInput { |
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.
For consistency, can this be ConsensusManagerCompareCurrentTimeInputV1
?
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.
Good catch
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.
Tried to use ConsensusManagerCompareCurrentTimeInputV1
but it's failing tests for some reason. Will come back to this in another PR.
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.
No worries, sounds good.
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.
Also, as discussed with @0xOmarA , he will follow up with a cleanup PR on this.
98f42d0
to
f92f643
Compare
Updated logic of consensus manager methods to include seconds precision.
Added StateUpdates generator for substate flashing of the Seconds Precision Timestamp Update to be used with flash transactions.