-
Notifications
You must be signed in to change notification settings - Fork 225
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
Replace chrono with time 0.3 #1030
Commits on Nov 26, 2021
-
pbt-gen: Converted from chrono to time 0.3
chrono has soundness issues (see RUSTSEC-2020-0159) and does not seem to be maintained.
Configuration menu - View commit details
-
Copy full SHA for 7cdafe2 - Browse repository at this point
Copy the full SHA 7cdafe2View commit details -
Replace dependency on chrono with time 0.3
Change Time implementation to crate time: chrono has soundness issues (see RUSTSEC-2020-0159) and does not seem to be actively maintained.
Configuration menu - View commit details
-
Copy full SHA for 41f0aeb - Browse repository at this point
Copy the full SHA 41f0aebView commit details -
Add Time methods checked_add and checked_sub
These should be used instead of the overloaded operators that broke the operator convention by returning a Result.
Configuration menu - View commit details
-
Copy full SHA for a3a1972 - Browse repository at this point
Copy the full SHA a3a1972View commit details -
proto: Don't use formatting methods of time
Drop the "formatting" feature of time, as this brings in std.
Configuration menu - View commit details
-
Copy full SHA for fe61780 - Browse repository at this point
Copy the full SHA fe61780View commit details -
pbt-gen: Add arb_datetime_for_rfc3339
With crate time, the range of supported dates stretches to the ancient past beyond the common era, which is not representable in RFC 3339. Add a generator to produce `OffsetDateTime` values that are within the RFC 3339 spec.
Configuration menu - View commit details
-
Copy full SHA for 15a01b0 - Browse repository at this point
Copy the full SHA 15a01b0View commit details -
Ensure Time can only have values good for RFC 3339
As the time values are meant for human-readable representation in the RFC 3339 format, make it not possible to construct Time with values that fall outside this standard representation. Conversion from time::OffsetDateTime is made fallible with a TryFrom impl replacing the From impl. Conversion from Unix timestamps is also affected.
Configuration menu - View commit details
-
Copy full SHA for eb92f46 - Browse repository at this point
Copy the full SHA eb92f46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 864d7fb - Browse repository at this point
Copy the full SHA 864d7fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69f7512 - Browse repository at this point
Copy the full SHA 69f7512View commit details -
Less allocatey ways of formatting date-times
Provide and use another helper in proto mod serializers::timestamp, one that formats into a provided fmt::Write object rather than allocating a string.
Configuration menu - View commit details
-
Copy full SHA for a56d3be - Browse repository at this point
Copy the full SHA a56d3beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ae78de - Browse repository at this point
Copy the full SHA 2ae78deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d68502 - Browse repository at this point
Copy the full SHA 5d68502View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb9918e - Browse repository at this point
Copy the full SHA fb9918eView commit details -
tendermint: Remove a comment referencing chrono
We use ErrorDetail::DurationOutOfRange without the source error from the time library because that is uninformative in the context. Also move the DateOutOfRange close with DurationOutOfRange since they can occur in the same operations and are generally similar.
Configuration menu - View commit details
-
Copy full SHA for f0cd9b7 - Browse repository at this point
Copy the full SHA f0cd9b7View commit details -
light-client: add std feature for time
The clock needs OffsetDateTime::now_utc().
Configuration menu - View commit details
-
Copy full SHA for 3e6e2ab - Browse repository at this point
Copy the full SHA 3e6e2abView commit details -
Configuration menu - View commit details
-
Copy full SHA for baaf513 - Browse repository at this point
Copy the full SHA baaf513View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd4667e - Browse repository at this point
Copy the full SHA bd4667eView commit details
Commits on Nov 29, 2021
-
Restrict valid Time years to 1-9999
Exclude year 0 because the spec on Google protobuf Timestamp forbids it. Add more helpers in pbt-gen to produce protobuf-safe values in both OffsetDateTime and RFC 3339 strings. Restrict the property tests to only use the protobuf-safe values where expected.
Configuration menu - View commit details
-
Copy full SHA for 71644b1 - Browse repository at this point
Copy the full SHA 71644b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9d1a13 - Browse repository at this point
Copy the full SHA c9d1a13View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0e2392 - Browse repository at this point
Copy the full SHA d0e2392View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fbe8b7 - Browse repository at this point
Copy the full SHA 0fbe8b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e26ed13 - Browse repository at this point
Copy the full SHA e26ed13View commit details -
proto: remove the chrono type conversions
The From impls are panicky and do not enforce compliance with protobuf message value restrictions.
Configuration menu - View commit details
-
Copy full SHA for f5c5f8b - Browse repository at this point
Copy the full SHA f5c5f8bView commit details
Commits on Nov 30, 2021
-
tendermint: remove direct uses of chrono types
Replace with tendermint::Time.
Configuration menu - View commit details
-
Copy full SHA for 1187ea9 - Browse repository at this point
Copy the full SHA 1187ea9View commit details -
Harden Timestamp conversions and serde
Require the timestamp to be in the validity range (years 1-9999 in UTC) and the nanosecond member value to not exceed 999_999_999. Rename ErrorDetail::TimestampOverflow to TimestampNanosOutOfRange, because the old variant was not very informative (the chained TryFromIntError did not help) and we also use it for the above-range case now which is not an overflow.
Configuration menu - View commit details
-
Copy full SHA for 3187803 - Browse repository at this point
Copy the full SHA 3187803View commit details -
Configuration menu - View commit details
-
Copy full SHA for d36f166 - Browse repository at this point
Copy the full SHA d36f166View commit details
Commits on Dec 2, 2021
-
Restore nanosecond range check in Time::from_unix_timestamp
Add a unit test to exercise the check.
Configuration menu - View commit details
-
Copy full SHA for 135e062 - Browse repository at this point
Copy the full SHA 135e062View commit details -
proto: Improve timestamp::fmt_as_rfc3339_nanos
- More ergonomic signature - A non-allocating implementation
Configuration menu - View commit details
-
Copy full SHA for 2bbc9f4 - Browse repository at this point
Copy the full SHA 2bbc9f4View commit details
Commits on Dec 7, 2021
-
Fix component name in changelog for 1030-remove-chrono
Co-authored-by: Thane Thomson <thane@informal.systems>
Configuration menu - View commit details
-
Copy full SHA for 0799aa1 - Browse repository at this point
Copy the full SHA 0799aa1View commit details -
time: Use Self instead of the type name in methods
Co-authored-by: Thane Thomson <thane@informal.systems>
Configuration menu - View commit details
-
Copy full SHA for a7f1b20 - Browse repository at this point
Copy the full SHA a7f1b20View commit details -
Configuration menu - View commit details
-
Copy full SHA for a091b0f - Browse repository at this point
Copy the full SHA a091b0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d87e926 - Browse repository at this point
Copy the full SHA d87e926View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5e6244 - Browse repository at this point
Copy the full SHA f5e6244View commit details