flow-cli icon indicating copy to clipboard operation
flow-cli copied to clipboard

Include more intention revealing & consistent block proposal timestamp, and with additional & easier to parse format?

Open simonhf opened this issue 3 years ago • 0 comments

Instructions

Example block output (taken from [1]):

Block ID		69bf094ced9f1318c2710b224bc40c8541be1b8c0e24f9011f0f9539f5e49089
Parent ID		fd2ebc85655704d382fcfefd4a1445802211b627a2d160c294b1f07489d1c3d4
Timestamp		2021-03-26 11:36:43.417803197 +0000 UTC
Height			13077644
Total Seals		0
Total Collections	3
    Collection 0:	55644f9cef9ef32e9baa329f7a971c1d424788105c1b66bf797db99957437796
         Transaction 0: 6210b35c7c01f04420891d335a327eb8f0668486ca789ced2ef6f51ea4ac1c50
    Collection 1:	d416173af95f2daaf63b52608a52d6f9eece497da337104f19214e4eee76017f
         Transaction 0: 333ad49794eebd11907627536c9407310bdaf64a6b5f0c306d20eabe5275b88b
    Collection 2:	ec3fe970b1455d291a6c686da61a28301c08ffa0d82cafc21ca8d502d3ef12f6
         Transaction 0: 4d49756c3643aa9f11e1137d8a47cc67b7ad223e63c1f3f20beb4458c66fbb95

Issues To Be Solved

When examining blocks with the cli tool, the fractional part of the Timestamp can vary in length, e.g.:

Timestamp		2021-03-26 11:36:43.417803197 +0000 UTC
Timestamp		2021-12-22 22:34:47.848392713 +0000 UTC
Timestamp		2021-12-22 22:35:11.67402412 +0000 UTC
Timestamp		2021-12-22 22:35:29.0370769 +0000 UTC

How about make making the fraction part of the Timestamp consistent in length?

How about renaming Timestamp to Proposal Timestamp in order to make the output more intention revealing?

How about adding an additional line with an easier to parse Unix time [2], e.g.:

Proposal Timestamp 2021-12-22 22:34:47.848392713 +0000 UTC
Proposal Timestamp Unix 1640212487.848392713

[1] https://github.com/onflow/flow-cli/issues/28 [2] https://en.wikipedia.org/wiki/Unix_time

simonhf avatar Dec 22 '21 22:12 simonhf