-
Notifications
You must be signed in to change notification settings - Fork 54
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
Refactoring timestamps #842
Conversation
✔️ nim-waku/prs/linux/PR-842#3 🔹 ~16 min 🔹 e01f870 🔹 📦 linux package |
✔️ nim-waku/prs/macos/PR-842#3 🔹 ~23 min 🔹 e01f870 🔹 📦 macos package |
✔️ nim-waku/prs/windows/PR-842#3 🔹 ~32 min 🔹 e01f870 🔹 📦 windows package |
✔️ nim-waku/prs/linux/PR-842#6 🔹 ~16 min 🔹 5371541 🔹 📦 linux package |
✔️ nim-waku/prs/macos/PR-842#6 🔹 ~16 min 🔹 5371541 🔹 📦 macos package |
✔️ nim-waku/prs/linux/PR-842#5 🔹 ~19 min 🔹 c0249d9 🔹 📦 linux package |
✔️ nim-waku/prs/windows/PR-842#4 🔹 ~32 min 🔹 9300fd4 🔹 📦 windows package |
✔️ nim-waku/prs/windows/PR-842#8 🔹 ~30 min 🔹 5371541 🔹 📦 windows package |
✔️ nim-waku/prs/linux/PR-842#8 🔹 ~16 min 🔹 00adea6 🔹 📦 linux package |
✔️ nim-waku/prs/macos/PR-842#8 🔹 ~16 min 🔹 00adea6 🔹 📦 macos package |
✔️ nim-waku/prs/windows/PR-842#10 🔹 ~33 min 🔹 00adea6 🔹 📦 windows package |
As a general recommendation, going with nanoseconds-since-epoch for timestamps is the "standard" these days, and has few downsides (except perhaps that you need to copypaste a bigger number). |
✔️ nim-waku/prs/linux/PR-842#29 🔹 ~16 min 🔹 a21de43 🔹 📦 linux package |
✔️ nim-waku/prs/macos/PR-842#29 🔹 ~23 min 🔹 a21de43 🔹 📦 macos package |
var ms = Timestamp(timeInSeconds*1000) | ||
return ms | ||
|
||
proc column_timestamp*(a1: ptr sqlite3_stmt, iCol: cint): int64 = |
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.
Thanks for defining this proc, though I think it is also ok to use the sqlite3_column_int64
directly in the code. I'd like to hear @jm-clius opinion as well
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.
Here a related comment to this.
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.
Fair enough, I cannot see any issue with having a separate proc column_timestamp
Good point, agree! |
✔️ nim-waku/prs/windows/PR-842#31 🔹 ~34 min 🔹 a21de43 🔹 📦 windows package |
@s1fr0 The PR looks good to me! just awaiting the result of the decision about the protocol id #842 (comment) (after that I'll approve :) ). |
Temporarily blocked, see vacp2p/rfc#483 (comment) |
✔️ nim-waku/prs/linux/PR-842#32 🔹 ~17 min 🔹 fe09c2a 🔹 📦 linux package |
✔️ nim-waku/prs/macos/PR-842#32 🔹 ~22 min 🔹 fe09c2a 🔹 📦 macos package |
✔️ nim-waku/prs/windows/PR-842#36 🔹 ~35 min 🔹 fe09c2a 🔹 📦 windows package |
I can't see the change of the waku store codec string from beta3 to beta4 in this PR, is this expected? @s1fr0 |
We introduces a new type
Timestamp
for all timestamps in waku v2. The typeTimestamp
is currently set to be an alias forint64
(see utils/time) and all times have now nanosecond resolution.In particular this PR addresses the following items of #834:
Message
table