diff --git a/cli/util/upload_bin.go b/cli/util/upload_bin.go index 274bcad31..90dff60c5 100644 --- a/cli/util/upload_bin.go +++ b/cli/util/upload_bin.go @@ -211,7 +211,8 @@ func uploadBlocksAndIndexFiles(ctx *cli.Context, p poolWrapper, rpc *rpcclient.C *object.NewAttribute("Primary", strconv.Itoa(int(blk.PrimaryIndex))), *object.NewAttribute("Hash", blk.Hash().StringLE()), *object.NewAttribute("PrevHash", blk.PrevHash.StringLE()), - *object.NewAttribute("Timestamp", strconv.FormatUint(blk.Timestamp, 10)), + *object.NewAttribute("BlockTime", strconv.FormatUint(blk.Timestamp, 10)), + *object.NewAttribute("Timestamp", strconv.FormatInt(time.Now().Unix(), 10)), } var ( @@ -263,6 +264,7 @@ func uploadBlocksAndIndexFiles(ctx *cli.Context, p poolWrapper, rpc *rpcclient.C attrs := []object.Attribute{ *object.NewAttribute(indexAttributeKey, strconv.Itoa(int(indexFileStart/indexFileSize))), *object.NewAttribute("IndexSize", strconv.Itoa(int(indexFileSize))), + *object.NewAttribute("Timestamp", strconv.FormatInt(time.Now().Unix(), 10)), } err := retry(func() error { var errUpload error diff --git a/docs/neofs-blockstorage.md b/docs/neofs-blockstorage.md index fe71b233e..f1115d95e 100644 --- a/docs/neofs-blockstorage.md +++ b/docs/neofs-blockstorage.md @@ -16,13 +16,15 @@ form as a separate object with a unique OID and a set of attributes: - primary node index (`Primary:0`) - block hash in the LE form (`Hash:5412a781caf278c0736556c0e544c7cfdbb6e3c62ae221ef53646be89364566b`) - previous block hash in the LE form (`PrevHash:3654a054d82a8178c7dfacecc2c57282e23468a42ee407f14506368afe22d929`) - - millisecond-precision block timestamp (`Timestamp:1627894840919`) + - millisecond-precision block creation timestamp (`BlockTime:1627894840919`) + - second-precision block uploading timestamp (`Timestamp:1627894840`) Each index file is an object containing a constant-sized batch of raw block object IDs in binary form ordered by block index. Each index file is marked with the following attributes: - index file identifier with consecutive file index value (`Index:0`) - the number of OIDs included into index file (`IndexSize:128000`) + - second-precision index file uploading timestamp (`Timestamp:1627894840`) ### NeoFS BlockFetcher