Skip to content

Commit 1c3fddd

Browse files
authored
Merge pull request #1497 from 0chain/revert-1496-revert-1494-feat/session-key
Session key
2 parents b1ef274 + 84b7d56 commit 1c3fddd

File tree

25 files changed

+207
-113
lines changed

25 files changed

+207
-113
lines changed

code/go/0chain.net/blobbercore/allocation/entity.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ type Allocation struct {
6262
TimeUnit time.Duration `gorm:"column:time_unit;not null;default:172800000000000"`
6363
StartTime common.Timestamp `gorm:"column:start_time;not null"`
6464
// Ending and cleaning
65-
CleanedUp bool `gorm:"column:cleaned_up;not null;default:false"`
66-
Finalized bool `gorm:"column:finalized;not null;default:false"`
65+
CleanedUp bool `gorm:"column:cleaned_up;not null;default:false"`
66+
Finalized bool `gorm:"column:finalized;not null;default:false"`
67+
OwnerSigningPublicKey string `gorm:"column:owner_signing_public_key;size:512;not null" json:"owner_signing_public_key"`
6768

6869
// FileOptions to define file restrictions on an allocation for third-parties
6970
// default 00000000 for all crud operations suggesting only owner has the below listed abilities.

code/go/0chain.net/blobbercore/allocation/file_changer_base.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ type BaseFileChanger struct {
5252
EncryptedKeyPoint string `json:"encrypted_key_point,omitempty"`
5353
CustomMeta string `json:"custom_meta,omitempty"`
5454

55-
ChunkSize int64 `json:"chunk_size,omitempty"` // the size of achunk. 64*1024 is default
56-
IsFinal bool `json:"is_final,omitempty"` // current chunk is last or not
55+
ChunkSize int64 `json:"chunk_size,omitempty"` // the size of achunk. 64*1024 is default
56+
IsFinal bool `json:"is_final,omitempty"` // current chunk is last or not
57+
SignatureVersion int `json:"signature_version,omitempty"`
5758

5859
ChunkStartIndex int `json:"chunk_start_index,omitempty"` // start index of chunks.
5960
ChunkEndIndex int `json:"chunk_end_index,omitempty"` // end index of chunks. all chunks MUST be uploaded one by one because of CompactMerkleTree

code/go/0chain.net/blobbercore/allocation/file_changer_update.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ func (nf *UpdateFileChanger) ApplyChange(ctx context.Context, rootRef *reference
106106
fileRef.ChunkSize = nf.ChunkSize
107107
fileRef.IsPrecommit = true
108108
fileRef.FilestoreVersion = filestore.VERSION
109+
fileRef.SignatureVersion = nf.SignatureVersion
109110

110111
return rootRef, nil
111112
}
@@ -173,6 +174,7 @@ func (nf *UpdateFileChanger) ApplyChangeV2(ctx context.Context, allocationRoot,
173174
PathLevel: len(strings.Split(strings.TrimRight(nf.Path, "/"), "/")),
174175
NumBlocks: int64(math.Ceil(float64(nf.Size*1.0) / float64(nf.ChunkSize))),
175176
NumUpdates: refResult.NumUpdates + 1,
177+
SignatureVersion: nf.SignatureVersion,
176178
}
177179
nf.storageVersion = 1
178180
newFile.FileMetaHash = encryption.Hash(newFile.GetFileMetaHashDataV2())

code/go/0chain.net/blobbercore/allocation/file_changer_upload.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ func (nf *UploadFileChanger) applyChange(ctx context.Context, rootRef *reference
130130
HashToBeComputed: true,
131131
IsPrecommit: true,
132132
FilestoreVersion: filestore.VERSION,
133+
SignatureVersion: nf.SignatureVersion,
133134
}
134135

135136
fileID, ok := fileIDMeta[newFile.Path]
@@ -197,6 +198,7 @@ func (nf *UploadFileChanger) ApplyChangeV2(ctx context.Context, allocationRoot,
197198
PathLevel: len(strings.Split(strings.TrimRight(nf.Path, "/"), "/")),
198199
NumBlocks: int64(math.Ceil(float64(nf.Size*1.0) / float64(nf.ChunkSize))),
199200
NumUpdates: 1,
201+
SignatureVersion: nf.SignatureVersion,
200202
}
201203
nf.storageVersion = 1
202204
newFile.FileMetaHash = encryption.Hash(newFile.GetFileMetaHashDataV2())

code/go/0chain.net/blobbercore/allocation/protocol.go

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/0chain/blobber/code/go/0chain.net/core/logging"
1414
"github.com/0chain/blobber/code/go/0chain.net/core/node"
1515
"github.com/0chain/blobber/code/go/0chain.net/core/transaction"
16+
"go.uber.org/zap"
1617
"gorm.io/gorm"
1718
)
1819

@@ -110,8 +111,9 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
110111
a.TimeUnit = sa.TimeUnit
111112
a.FileOptions = sa.FileOptions
112113
a.StartTime = sa.StartTime
113-
// Only for testing purpose
114114
a.StorageVersion = uint8(sa.StorageVersion)
115+
a.OwnerSigningPublicKey = sa.OwnerSigningPublicKey
116+
logging.Logger.Info("OwnerSigningPublicKey", zap.String("OwnerSigningPublicKey", a.OwnerSigningPublicKey), zap.String("allocation_id", a.ID))
115117

116118
m := map[string]interface{}{
117119
"allocation_id": a.ID,
@@ -139,23 +141,24 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
139141
return a, nil
140142
}
141143

142-
logging.Logger.Info("Saving the allocation to DB")
144+
logging.Logger.Info("Saving the allocation to DB", zap.String("allocation_id", a.ID))
143145

144146
if !isExist {
145147
err = Repo.Save(ctx, a)
146148
} else {
147149
updateMap := map[string]interface{}{
148-
"tx": a.Tx,
149-
"expiration_date": a.Expiration,
150-
"owner_id": a.OwnerID,
151-
"owner_public_key": a.OwnerPublicKey,
152-
"repairer_id": a.RepairerID,
153-
"size": a.TotalSize,
154-
"finalized": a.Finalized,
155-
"time_unit": a.TimeUnit,
156-
"file_options": a.FileOptions,
157-
"start_time": a.StartTime,
158-
"blobber_size": a.BlobberSize,
150+
"tx": a.Tx,
151+
"expiration_date": a.Expiration,
152+
"owner_id": a.OwnerID,
153+
"owner_public_key": a.OwnerPublicKey,
154+
"repairer_id": a.RepairerID,
155+
"size": a.TotalSize,
156+
"finalized": a.Finalized,
157+
"time_unit": a.TimeUnit,
158+
"file_options": a.FileOptions,
159+
"start_time": a.StartTime,
160+
"blobber_size": a.BlobberSize,
161+
"owner_signing_public_key": a.OwnerSigningPublicKey,
159162
}
160163

161164
updateOption := func(alloc *Allocation) {
@@ -170,6 +173,7 @@ func FetchAllocationFromEventsDB(ctx context.Context, allocationID string, alloc
170173
alloc.FileOptions = a.FileOptions
171174
alloc.StartTime = a.StartTime
172175
alloc.BlobberSize = a.BlobberSize
176+
alloc.OwnerSigningPublicKey = a.OwnerSigningPublicKey
173177
}
174178
err = Repo.UpdateAllocation(ctx, a, updateMap, updateOption)
175179
}

code/go/0chain.net/blobbercore/allocation/workers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ func updateAllocationInDB(ctx context.Context, a *Allocation, sa *transaction.St
246246
a.Tx = sa.Tx
247247
a.OwnerID = sa.OwnerID
248248
a.OwnerPublicKey = sa.OwnerPublicKey
249+
a.OwnerSigningPublicKey = sa.OwnerSigningPublicKey
249250

250251
// // update fields
251252
a.Expiration = sa.Expiration
@@ -263,6 +264,7 @@ func updateAllocationInDB(ctx context.Context, a *Allocation, sa *transaction.St
263264
updateMap["finalized"] = a.Finalized
264265
updateMap["file_options"] = a.FileOptions
265266
updateMap["blobber_size"] = a.BlobberSize
267+
updateMap["owner_signing_public_key"] = a.OwnerSigningPublicKey
266268

267269
updateOption := func(alloc *Allocation) {
268270
alloc.Tx = a.Tx
@@ -273,6 +275,7 @@ func updateAllocationInDB(ctx context.Context, a *Allocation, sa *transaction.St
273275
alloc.Finalized = a.Finalized
274276
alloc.FileOptions = a.FileOptions
275277
alloc.BlobberSize = a.BlobberSize
278+
alloc.OwnerSigningPublicKey = a.OwnerSigningPublicKey
276279
}
277280

278281
// update terms

code/go/0chain.net/blobbercore/allocation/zcn.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ func SyncAllocation(allocationId string) (*Allocation, error) {
5252
alloc.Finalized = sa.Finalized
5353
alloc.TimeUnit = sa.TimeUnit
5454
alloc.FileOptions = sa.FileOptions
55+
alloc.StorageVersion = uint8(sa.StorageVersion)
56+
alloc.OwnerSigningPublicKey = sa.OwnerSigningPublicKey
5557

5658
// related terms
5759
terms := make([]*Terms, 0, len(sa.BlobberDetails))

code/go/0chain.net/blobbercore/challenge/protocol.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import (
55
"encoding/hex"
66
"encoding/json"
77
"errors"
8-
"github.com/0chain/blobber/code/go/0chain.net/core/transaction"
9-
coreTxn "github.com/0chain/gosdk/core/transaction"
108
"math/rand"
119
"strings"
1210
"sync"
1311
"time"
1412

13+
"github.com/0chain/blobber/code/go/0chain.net/core/transaction"
14+
coreTxn "github.com/0chain/gosdk/core/transaction"
15+
1516
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/allocation"
1617
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/datastore"
1718
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/filestore"
@@ -366,6 +367,7 @@ func (cr *ChallengeEntity) getPostDataV2(ctx context.Context, allocationObj *all
366367
FixedMerkleRoot: ref.FixedMerkleRoot,
367368
Size: ref.Size,
368369
FileMetaHash: ref.FileMetaHash,
370+
SignatureVersion: ref.SignatureVersion,
369371
}
370372
postData["meta"] = metaRef
371373
}

code/go/0chain.net/blobbercore/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func SetupDefaultConfig() {
5353

5454
viper.SetDefault("max_dirs_files", 50000)
5555
viper.SetDefault("max_objects_dir", 1000)
56-
viper.SetDefault("max_objects_per_gb", 100000)
56+
viper.SetDefault("max_objects_per_gb", 1000)
5757
viper.SetDefault("kv.pebble_dir", "/pebble/data")
5858
viper.SetDefault("kv.pebble_wal_dir", "/pebble/wal")
5959
viper.SetDefault("kv.pebble_cache", 4*1024*1024*1024)

code/go/0chain.net/blobbercore/handler/file_command_update.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,15 @@ func (cmd *UpdateFileCommand) ProcessContent(ctx context.Context, allocationObj
155155
hashData := fmt.Sprintf("%s:%s:%s:%s", cmd.fileChanger.ActualHash, cmd.fileChanger.ValidationRoot, cmd.fileChanger.FixedMerkleRoot, node.Self.ID)
156156
hash = encryption.Hash(hashData)
157157
}
158-
verify, err := encryption.Verify(allocationObj.OwnerPublicKey, cmd.fileChanger.ValidationRootSignature, hash)
158+
var (
159+
err error
160+
verify bool
161+
)
162+
if cmd.fileChanger.SignatureVersion == reference.SignatureV2 {
163+
verify, err = encryption.VerifyEd25519(allocationObj.OwnerSigningPublicKey, cmd.fileChanger.ValidationRootSignature, hash)
164+
} else {
165+
verify, err = encryption.Verify(allocationObj.OwnerPublicKey, cmd.fileChanger.ValidationRootSignature, hash)
166+
}
159167
if err != nil || !verify {
160168
logging.Logger.Error("UpdateFileCommand.VerifySignature", zap.Error(err))
161169
return result, common.NewError("update_error", "Failed to verify validation root signature. ")

code/go/0chain.net/blobbercore/handler/file_command_upload.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,18 @@ func (cmd *UploadFileCommand) ProcessContent(ctx context.Context, allocationObj
167167
hashData := fmt.Sprintf("%s:%s:%s:%s", cmd.fileChanger.ActualHash, cmd.fileChanger.ValidationRoot, cmd.fileChanger.FixedMerkleRoot, node.Self.ID)
168168
hash = encryption.Hash(hashData)
169169
}
170-
verify, err := encryption.Verify(allocationObj.OwnerPublicKey, cmd.fileChanger.ValidationRootSignature, hash)
170+
var (
171+
err error
172+
verify bool
173+
)
174+
if cmd.fileChanger.SignatureVersion == reference.SignatureV2 {
175+
verify, err = encryption.VerifyEd25519(allocationObj.OwnerSigningPublicKey, cmd.fileChanger.ValidationRootSignature, hash)
176+
} else {
177+
verify, err = encryption.Verify(allocationObj.OwnerPublicKey, cmd.fileChanger.ValidationRootSignature, hash)
178+
}
171179
if err != nil || !verify {
172-
logging.Logger.Error("UploadFileCommand.VerifySignature", zap.Error(err))
173-
return result, common.NewError("upload_error", "Failed to verify validation root signature. ")
180+
logging.Logger.Error("UploadFileCommand.VerifySignature", zap.Error(err), zap.Int("SignatureVersion", cmd.fileChanger.SignatureVersion), zap.String("Hash", hash), zap.String("ValidationRootSignature", cmd.fileChanger.ValidationRootSignature), zap.String("OwnerSigningPublicKey", allocationObj.OwnerSigningPublicKey), zap.String("OwnerPublicKey", allocationObj.OwnerPublicKey))
181+
return result, common.NewError("upload_error", fmt.Sprintf("%s %d", "Failed to verify validation root signature ", cmd.fileChanger.SignatureVersion))
174182
}
175183
}
176184

code/go/0chain.net/blobbercore/handler/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func setupHandlers(s *mux.Router) {
207207
RateLimitByObjectRL(common.ToJSONResponse(WithReadOnlyConnection(ReferencePathV2Handler))))
208208

209209
s.HandleFunc("/v1/file/latestwritemarker/{allocation}",
210-
RateLimitByObjectRL(common.ToJSONResponse(WithReadOnlyConnection(WriteMarkerHandler))))
210+
RateLimitByObjectRL(common.ToJSONResponse(WithConnection(WriteMarkerHandler))))
211211

212212
s.HandleFunc("/v1/file/objecttree/{allocation}",
213213
RateLimitByObjectRL(common.ToStatusCode(WithStatusReadOnlyConnection(ObjectTreeHandler)))).

code/go/0chain.net/blobbercore/handler/object_operation_handler.go

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ func (fsh *StorageHandler) Rollback(ctx context.Context, r *http.Request) (*blob
18321832
err error
18331833
)
18341834

1835-
allocationObj, err = fsh.verifyAllocation(ctx, allocationId, allocationTx, false)
1835+
allocationObj, err = fsh.verifyAllocation(ctx, allocationId, allocationTx, true)
18361836
if err != nil {
18371837
Logger.Error("Error in verifying allocation", zap.Error(err))
18381838
return nil, common.NewError("invalid_parameters", "Invalid allocation id passed."+err.Error())
@@ -1972,46 +1972,41 @@ func (fsh *StorageHandler) Rollback(ctx context.Context, r *http.Request) (*blob
19721972
writemarkerEntity.ClientPublicKey = clientKey
19731973
Logger.Info("rollback_writemarker", zap.Any("writemarker", writemarkerEntity.WM))
19741974

1975-
alloc, err := allocation.Repo.GetByIdAndLock(c, allocationID)
1976-
Logger.Info("[rollback]Lock Allocation", zap.Bool("is_redeem_required", alloc.IsRedeemRequired), zap.String("allocation_root", alloc.AllocationRoot), zap.String("latest_wm_redeemed", alloc.LatestRedeemedWM))
1977-
if err != nil {
1978-
txn.Rollback()
1979-
return &result, common.NewError("allocation_read_error", "Error reading the allocation object")
1980-
}
1975+
Logger.Info("[rollback]Lock Allocation", zap.Bool("is_redeem_required", allocationObj.IsRedeemRequired), zap.String("allocation_root", allocationObj.AllocationRoot), zap.String("latest_wm_redeemed", allocationObj.LatestRedeemedWM))
19811976

1982-
alloc.BlobberSizeUsed -= latestWriteMarkerEntity.WM.Size
1983-
alloc.UsedSize -= latestWriteMarkerEntity.WM.Size
1984-
alloc.AllocationRoot = allocationRoot
1985-
alloc.FileMetaRoot = fileMetaRoot
1986-
alloc.IsRedeemRequired = false
1987-
alloc.NumObjects = alloc.PrevNumObjects
1988-
alloc.NumBlocks = alloc.PrevNumBlocks
1977+
allocationObj.BlobberSizeUsed -= latestWriteMarkerEntity.WM.Size
1978+
allocationObj.UsedSize -= latestWriteMarkerEntity.WM.Size
1979+
allocationObj.AllocationRoot = allocationRoot
1980+
allocationObj.FileMetaRoot = fileMetaRoot
1981+
allocationObj.IsRedeemRequired = false
1982+
allocationObj.NumObjects = allocationObj.PrevNumObjects
1983+
allocationObj.NumBlocks = allocationObj.PrevNumBlocks
19891984
updateMap := map[string]interface{}{
1990-
"blobber_size_used": alloc.BlobberSizeUsed,
1991-
"used_size": alloc.UsedSize,
1992-
"allocation_root": alloc.AllocationRoot,
1993-
"file_meta_root": alloc.FileMetaRoot,
1985+
"blobber_size_used": allocationObj.BlobberSizeUsed,
1986+
"used_size": allocationObj.UsedSize,
1987+
"allocation_root": allocationObj.AllocationRoot,
1988+
"file_meta_root": allocationObj.FileMetaRoot,
19941989
"is_redeem_required": false,
1995-
"num_objects": alloc.NumObjects,
1996-
"num_blocks": alloc.NumBlocks,
1990+
"num_objects": allocationObj.NumObjects,
1991+
"num_blocks": allocationObj.NumBlocks,
19971992
}
19981993

19991994
updateOption := func(a *allocation.Allocation) {
2000-
a.BlobberSizeUsed = alloc.BlobberSizeUsed
2001-
a.UsedSize = alloc.UsedSize
2002-
a.AllocationRoot = alloc.AllocationRoot
2003-
a.FileMetaRoot = alloc.FileMetaRoot
2004-
a.IsRedeemRequired = alloc.IsRedeemRequired
2005-
a.NumObjects = alloc.NumObjects
2006-
a.NumBlocks = alloc.NumBlocks
1995+
a.BlobberSizeUsed = allocationObj.BlobberSizeUsed
1996+
a.UsedSize = allocationObj.UsedSize
1997+
a.AllocationRoot = allocationObj.AllocationRoot
1998+
a.FileMetaRoot = allocationObj.FileMetaRoot
1999+
a.IsRedeemRequired = allocationObj.IsRedeemRequired
2000+
a.NumObjects = allocationObj.NumObjects
2001+
a.NumBlocks = allocationObj.NumBlocks
20072002
}
20082003
writemarkerEntity.Latest = true
20092004
err = txn.Create(writemarkerEntity).Error
20102005
if err != nil {
20112006
txn.Rollback()
20122007
return &result, common.NewError("write_marker_error", "Error persisting the write marker "+err.Error())
20132008
}
2014-
if err = allocation.Repo.UpdateAllocation(c, alloc, updateMap, updateOption); err != nil {
2009+
if err = allocation.Repo.UpdateAllocation(c, allocationObj, updateMap, updateOption); err != nil {
20152010
txn.Rollback()
20162011
return &result, common.NewError("allocation_write_error", "Error persisting the allocation object "+err.Error())
20172012
}
@@ -2024,7 +2019,7 @@ func (fsh *StorageHandler) Rollback(ctx context.Context, r *http.Request) (*blob
20242019
var node wmpt.Node
20252020
if len(fileMetaRoot) > 0 {
20262021
decodedRoot, _ := hex.DecodeString(fileMetaRoot)
2027-
node = wmpt.NewHashNode(decodedRoot, alloc.NumBlocks)
2022+
node = wmpt.NewHashNode(decodedRoot, allocationObj.NumBlocks)
20282023
}
20292024
trie.RollbackTrie(node)
20302025
}

code/go/0chain.net/blobbercore/reference/dbCollector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (dc *dbCollector) Finalize(ctx context.Context, allocationID, allocationRoo
8585
err := db.Create(&(dc.createdRefs)).Error
8686
if err != nil {
8787
for ind, ref := range dc.createdRefs {
88-
logging.Logger.Error("create_ref_error", zap.String("lookup_hash", ref.LookupHash), zap.String("path", ref.Path), zap.Int("index", ind), zap.String("allocation_root", allocationRoot))
88+
logging.Logger.Error("create_ref_error", zap.String("lookup_hash", ref.LookupHash), zap.String("path", ref.Path), zap.Int("index", ind), zap.String("allocation_root", allocationRoot), zap.Any("ref", ref))
8989
}
9090
return err
9191
}

code/go/0chain.net/blobbercore/reference/ref.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const (
2828

2929
DIR_LIST_TAG = "dirlist"
3030
FILE_LIST_TAG = "filelist"
31+
SignatureV2 = 1
3132
)
3233

3334
var (
@@ -91,6 +92,7 @@ type Ref struct {
9192
NumUpdates int64 `gorm:"column:num_of_updates" json:"num_of_updates"`
9293
NumBlockDownloads int64 `gorm:"column:num_of_block_downloads" json:"num_of_block_downloads"`
9394
FilestoreVersion int `gorm:"column:filestore_version" json:"-"`
95+
SignatureVersion int `gorm:"column:signature_version" json:"signature_version" filelist:"signature_version"`
9496
IsEmpty bool `gorm:"-" dirlist:"is_empty"`
9597
HashToBeComputed bool `gorm:"-"`
9698
prevID int64 `gorm:"-"`
@@ -148,6 +150,7 @@ type PaginatedRef struct { //Gorm smart select fields.
148150
EncryptedKey string `gorm:"column:encrypted_key" json:"encrypted_key,omitempty"`
149151
EncryptedKeyPoint string `gorm:"column:encrypted_key_point" json:"encrypted_key_point,omitempty"`
150152
FileMetaHash string `gorm:"column:file_meta_hash;size:64;not null" dirlist:"file_meta_hash" filelist:"file_meta_hash"`
153+
SignatureVersion int `gorm:"column:signature_version" json:"signature_version,omitempty" filelist:"signature_version"`
151154

152155
CreatedAt common.Timestamp `gorm:"column:created_at" json:"created_at,omitempty"`
153156
UpdatedAt common.Timestamp `gorm:"column:updated_at" json:"updated_at,omitempty"`
@@ -166,6 +169,7 @@ type RefMeta struct {
166169
FixedMerkleRoot string `json:"fixed_merkle_root"`
167170
Size int64 `json:"size"`
168171
FileMetaHash string `json:"file_meta_hash"`
172+
SignatureVersion int `json:"signature_version"`
169173
}
170174

171175
// GetReferenceLookup hash(allocationID + ":" + path)

0 commit comments

Comments
 (0)