-
Notifications
You must be signed in to change notification settings - Fork 80
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
imp(ibc)!: refactor Timestamp
type and distinguish timeout timestamp
#1307
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1307 +/- ##
==========================================
- Coverage 67.08% 67.07% -0.01%
==========================================
Files 226 227 +1
Lines 23336 23383 +47
==========================================
+ Hits 15654 15685 +31
- Misses 7682 7698 +16 ☔ View full report in Codecov by Sentry. |
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.
Looks good to me. Awesome job putting this PR together 🙌
#1307) * imp: refactor Timestamp type and distinguish timeout timestamp * fix: timestamp tests * fix: correct serde impls + tests * imp: From<u64> nevel fails + tests * fix: From<u64> for TimeoutTimestamp never fails * fix: correct from_unix_timestamp to reject large seconds + remove From<u64> for Timestamp * chore: apply review comments * fix: cargo doc * Fix typo in doc comment * fix: remove redundant negative check in Sub impl * tests: add timout arithmetic tests * docs: add a comment for From<u64> for TimeoutTimestamp * fix: revert client_processed_times signature * chore: add changelog --------- Co-authored-by: Sean Chen <[email protected]>
Closes: #180
Closes: #1296
Closes: #1306
Description
This PR introduces following improvements:
Timestamp
definitions used by the host from those used for timeout purposes. The host timestamp is mandatory, while aNone
value for the timeout timestamp indicates the absence of a timeout.tendermint::Time
, which was also intended fortendermint_proto::google::Timestamp
instead ofibc_proto::google::Timestamp
.tendermint::Time
, laying the groundwork for fully decouplingibc_primitive
from thetendermint
dependency, making it chain-agnostic.tendermint::Time
could produce negative UNIX timestamps, causing a panic when callingTimestamp::nanoseconds()
.TimestampError
typeTimestamp::from_nanoseconds
, as it never fails.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.