You are reading content from Scuttlebutt
@aljoscha %8DzQ9ev1SBo6l0NAPfgquz3ETaXUo90b5B4Mrd4FEcQ=.sha256
Re: %mGIrR2DWX

@Aljoscha the timestamps come from https://github.com/dominictarr/monotonic-timestamp.

@dinosaur The problem is this: I don't care at all how @Dominic computes his timestamps. Ssb is a distributed system, anyone can throw anything at you. In fact, all users who replicate @Vendan have timestamps in their database that were not generated by the code you linked to. There simply is no place where "timestamps come from".

So when I ask for their type, I really want to know which kind of data has to be rejected, and which data has to be processed, as mandated by the non-documented protocol. Here are some fun cases that come to mind:

0
42
001
0.0
1.0
0.1
0x1B
0x1K
-1
-1.1
1.2e-37
1.2E4
1.2E+4
""
'single-quotes'
"cookies?"
":clock4:"
"2018-06-09T02:03:18.707Z"
undefined
null
NaN
Infinity
+Infinity
-Infinity
[]
[0, 1]
[0,]
{}
{"a": 0}
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

And then there is the question of how valid timestamps should be treated. Parse into a float (how many bytes?)? Parse into integer? How do comparisions work? As floats, or lexicographically? How do I compare 01 and 1?

Yet another question: How should invalid timestamps be treated? Ignore the message? Block the complete feed?

This is the stuff that matters. I'm not asking these questions because I want to know the answers (honestly, I'm afraid of them), I'm just stating them, because they matter more than any piece of code you could link to (or I could search for).

Join Scuttlebutt now