Skip to content

Commit c031b18

Browse files
committed
fix save root
1 parent f4f5fde commit c031b18

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ func (fsh *StorageHandler) CommitWriteV2(ctx context.Context, r *http.Request) (
10901090
fileMetaRoot := hex.EncodeToString(trie.Root())
10911091
allocationRoot := encryption.Hash(fileMetaRoot + allocationID)
10921092
if allocationRoot != writeMarker.AllocationRoot {
1093+
logging.Logger.Error("root_mismatch", zap.String("allocation_root", allocationRoot), zap.String("write_marker_allocation_root", writeMarker.AllocationRoot), zap.String("alloc_root", allocationObj.AllocationRoot), zap.Int64("prev_weight", prevWeight), zap.Int64("new_weight", newWeight), zap.Int64("diff", diff), zap.String("allocation_id", allocationId))
10931094
result.AllocationRoot = allocationObj.AllocationRoot
10941095
if latestWriteMarkerEntity != nil {
10951096
result.WriteMarker = latestWriteMarkerEntity

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ require (
9999
)
100100

101101
require (
102-
github.com/0chain/common v1.13.1-0.20240926083613-87cdd2286565
102+
github.com/0chain/common v1.13.1-0.20240926135437-61b88d39bbbd
103103
github.com/Luzifer/go-openssl/v3 v3.1.0 // indirect
104104
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
105105
github.com/btcsuite/btcd v0.23.4 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
3636
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
3737
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
3838
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
39-
github.com/0chain/common v1.13.1-0.20240926083613-87cdd2286565 h1:9K3v8dtjX6g+DtGJ/XX9+ZoeuwV46rB3vzfjXoMR64g=
40-
github.com/0chain/common v1.13.1-0.20240926083613-87cdd2286565/go.mod h1:vHK9Q0/nz28PxmKsLSMLzEs5iK6QVgl1LxdDQdR7y6s=
39+
github.com/0chain/common v1.13.1-0.20240926135437-61b88d39bbbd h1:PDnzyJJA4rF2LBW+0OQJ5y9vIwsPYYjbbFwImvgiDdY=
40+
github.com/0chain/common v1.13.1-0.20240926135437-61b88d39bbbd/go.mod h1:vHK9Q0/nz28PxmKsLSMLzEs5iK6QVgl1LxdDQdR7y6s=
4141
github.com/0chain/errors v1.0.3 h1:QQZPFxTfnMcRdt32DXbzRQIfGWmBsKoEdszKQDb0rRM=
4242
github.com/0chain/errors v1.0.3/go.mod h1:xymD6nVgrbgttWwkpSCfLLEJbFO6iHGQwk/yeSuYkIc=
4343
github.com/0chain/gosdk v1.17.0-RC6 h1:NB4pfu0VbVWfQQEfnFqn5inaiQuyhSaUW7VwgH3LW8U=

0 commit comments

Comments
 (0)