Open AnnaShaleva opened 2 weeks ago
Rename Timestamp to TimestampMilli, remove Timestamp attribute at all.
We will have more duplicates if the Timestamp won't block creation time. (we won't be afraid only after https://github.com/nspcc-dev/neo-go/issues/3652 )
We will have more duplicates if the Timestamp won't block creation time
That's why I propose to explicitly remove Timestamp attribute.
we won't be afraid only after https://github.com/nspcc-dev/neo-go/issues/3652
Exactly.
Why TimestampMilli
? Maybe BlockTimestamp
or something block related?
Maybe BlockTimestamp or something block related?
All block object attributes are block-related, hence I consider any Block*
prefix redundant.
All block object attributes are block-related, hence I consider any
Block*
prefix redundant.
If we rename it, we will have a Timestamp
attribute - the default one from NeoFS and our block-related timestamp. In the case Timestamp
+ TimestampMilli
it's not obvious which one block-related.
Also instead of Index
of the block, we have Block
as a block-related attribute to identify it, so the Block* prefix could be helpful.
the default one from NeoFS
This default is not written in stones, it may easily be removed, it's a matter of an additional method in SDK.
Also instead of Index of the block, we have Block as a block-related attribute to identify it,
Block index is a special one, it combines the block object identifier with the index. We anyway have to include block object identifier into the list of attributes, and it's reused for index as well in order not to waste space for a separate Index
attribute.
so the Block* prefix could be helpful.
So I'm still not convinced.
Is your feature request related to a problem? Please describe.
Block objects stored in the NeoFS block storage have
Timestamp
attribute which is currently the block timestamp in milliseconds. This behaviour results in the following:Here we see this strange
Timestamp=1628131414239 (53563-06-07 17:10:39 +0300 MSK)
record because NeoFS API treatsTimestamp
attribute as Unix time of object creation: https://github.com/nspcc-dev/neofs-api/blob/d7c033317a66aff467728f4ca5a86879edb66e54/object/types.proto#L162.Describe the solution you'd like
Rename
Timestamp
toTimestampMilli
and don't setTimestamp
attribute at all.Describe alternatives you've considered
Convert
Timestamp
attribute from milliseconds-precision to Unix timestamp. But the meaning of this field is still not "time of object creation" anyway. It's the time of block creation.Additional context
Please, vote: 👍 for renaming 👎 for conversion to Unix timestamp
It's a breaking change, hence it must be handled with care because we already have existing block objects uploaded using the old format.