Skip to content

Commit 6451c4d

Browse files
Update FSC version
Signed-off-by: Alexandros Filios <alexandros.filios@ibm.com>
1 parent 9da2327 commit 6451c4d

File tree

5 files changed

+16
-43
lines changed

5 files changed

+16
-43
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/gin-gonic/gin v1.10.0
1212
github.com/gobuffalo/packr/v2 v2.7.1
1313
github.com/hashicorp/go-uuid v1.0.3
14-
github.com/hyperledger-labs/fabric-smart-client v0.4.1-0.20250529154146-e8ded1918744
14+
github.com/hyperledger-labs/fabric-smart-client v0.4.1-0.20250530065320-3dc043fcc17a
1515
github.com/hyperledger-labs/orion-sdk-go v0.2.10
1616
github.com/hyperledger-labs/orion-server v0.2.10
1717
github.com/hyperledger/fabric v1.4.0-rc1.0.20230405174026-695dd57e01c2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,8 @@ github.com/hidal-go/hidalgo v0.0.0-20201109092204-05749a6d73df/go.mod h1:bPkrxDl
10751075
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
10761076
github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc=
10771077
github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8=
1078-
github.com/hyperledger-labs/fabric-smart-client v0.4.1-0.20250529154146-e8ded1918744 h1:7LOZ1GCERtv6PHM4/U2rsXM7/VUD6lLJT3OOZUHdRYY=
1079-
github.com/hyperledger-labs/fabric-smart-client v0.4.1-0.20250529154146-e8ded1918744/go.mod h1:iBMBYR+khPvWSU0I/cqNVUwaoGx29+uXoWXUN37EPn4=
1078+
github.com/hyperledger-labs/fabric-smart-client v0.4.1-0.20250530065320-3dc043fcc17a h1:riUqk2HXq54wk57gd+AfToBrHIC1IZ1E13Hx+gleEFo=
1079+
github.com/hyperledger-labs/fabric-smart-client v0.4.1-0.20250530065320-3dc043fcc17a/go.mod h1:1tVbPSXTXhSw7EpDLW+yue/9kyZVeQVWJrjTjIVNCcE=
10801080
github.com/hyperledger-labs/orion-sdk-go v0.2.10 h1:lFgWgxyvngIhWnIqymYGBmtmq9D6uC5d0uLG9cbyh5s=
10811081
github.com/hyperledger-labs/orion-sdk-go v0.2.10/go.mod h1:iN2xZB964AqwVJwL+EnwPOs8z1EkMEbbIg/qYeC7gDY=
10821082
github.com/hyperledger-labs/orion-server v0.2.10 h1:G4zbQEL5Egk0Oj+TwHCZWdTOLDBHOjaAEvYOT4G7ozw=

token/services/identity/sig/sigservice.go

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ package sig
88

99
import (
1010
"context"
11-
"reflect"
1211
"runtime/debug"
1312
"sync"
1413

14+
logging2 "github.com/hyperledger-labs/fabric-smart-client/platform/common/services/logging"
1515
"github.com/hyperledger-labs/fabric-smart-client/platform/common/utils/collections"
1616
"github.com/hyperledger-labs/fabric-token-sdk/token/driver"
1717
identity2 "github.com/hyperledger-labs/fabric-token-sdk/token/services/identity"
@@ -66,15 +66,13 @@ func (o *Service) RegisterSigner(identity driver.Identity, signer driver.Signer,
6666
}
6767

6868
idHash := identity.UniqueID()
69-
if logger.IsEnabledFor(zapcore.DebugLevel) {
70-
logger.Debugf("register signer and verifier [%s]:[%s][%s]", idHash, GetIdentifier(signer), GetIdentifier(verifier))
71-
}
69+
logger.Debugf("register signer and verifier [%s]:[%s][%s]", idHash, logging2.Identifier(signer), logging2.Identifier(verifier))
7270
// First check with read lock
7371
o.sync.RLock()
7472
s, ok := o.signers[idHash]
7573
o.sync.RUnlock()
7674
if ok {
77-
logger.Warnf("another signer bound to [%s]:[%s][%s] from [%s]", identity, GetIdentifier(s), GetIdentifier(signer), string(s.DebugStack))
75+
logger.Warnf("another signer bound to [%s]:[%s][%s] from [%s]", identity, logging2.Identifier(s), logging2.Identifier(signer), string(s.DebugStack))
7876
return nil
7977
}
8078

@@ -85,7 +83,7 @@ func (o *Service) RegisterSigner(identity driver.Identity, signer driver.Signer,
8583
s, ok = o.signers[idHash]
8684
if ok {
8785
o.sync.Unlock()
88-
logger.Warnf("another signer bound to [%s]:[%s][%s] from [%s]", identity, GetIdentifier(s), GetIdentifier(signer), string(s.DebugStack))
86+
logger.Warnf("another signer bound to [%s]:[%s][%s] from [%s]", identity, logging2.Identifier(s), logging2.Identifier(signer), string(s.DebugStack))
8987
return nil
9088
}
9189

@@ -112,9 +110,7 @@ func (o *Service) RegisterSigner(identity driver.Identity, signer driver.Signer,
112110
}
113111
}
114112

115-
if logger.IsEnabledFor(zapcore.DebugLevel) {
116-
logger.Debugf("register signer and verifier [%s]:[%s][%s], done", idHash, GetIdentifier(signer), GetIdentifier(verifier))
117-
}
113+
logger.Debugf("register signer and verifier [%s]:[%s][%s], done", idHash, logging2.Identifier(signer), logging2.Identifier(verifier))
118114
return nil
119115
}
120116

@@ -129,7 +125,7 @@ func (o *Service) RegisterVerifier(identity driver.Identity, verifier driver.Ver
129125
v, ok := o.verifiers[idHash]
130126
o.sync.RUnlock()
131127
if ok {
132-
logger.Warnf("another verifier bound to [%s]:[%s][%s] from [%s]", idHash, GetIdentifier(v), GetIdentifier(verifier), string(v.DebugStack))
128+
logger.Warnf("another verifier bound to [%s]:[%s][%s] from [%s]", idHash, logging2.Identifier(v), logging2.Identifier(verifier), string(v.DebugStack))
133129
return nil
134130
}
135131

@@ -140,7 +136,7 @@ func (o *Service) RegisterVerifier(identity driver.Identity, verifier driver.Ver
140136
v, ok = o.verifiers[idHash]
141137
if ok {
142138
o.sync.Unlock()
143-
logger.Warnf("another verifier bound to [%s]:[%s][%s] from [%s]", idHash, GetIdentifier(v), GetIdentifier(verifier), string(v.DebugStack))
139+
logger.Warnf("another verifier bound to [%s]:[%s][%s] from [%s]", idHash, logging2.Identifier(v), logging2.Identifier(verifier), string(v.DebugStack))
144140
return nil
145141
}
146142

@@ -151,9 +147,7 @@ func (o *Service) RegisterVerifier(identity driver.Identity, verifier driver.Ver
151147
o.verifiers[idHash] = entry
152148
o.sync.Unlock()
153149

154-
if logger.IsEnabledFor(zapcore.DebugLevel) {
155-
logger.Debugf("register verifier to [%s]:[%s]", idHash, GetIdentifier(verifier))
156-
}
150+
logger.Debugf("register verifier to [%s]:[%s]", idHash, logging2.Identifier(verifier))
157151
return nil
158152
}
159153

@@ -331,8 +325,8 @@ func (o *Service) GetVerifier(identity driver.Identity) (driver.Verifier, error)
331325
entry = VerifierEntry{Verifier: verifier}
332326
if logger.IsEnabledFor(zapcore.DebugLevel) {
333327
entry.DebugStack = debug.Stack()
334-
logger.Debugf("add deserialized verifier for [%s]:[%s]", idHash, GetIdentifier(verifier))
335328
}
329+
logger.Debugf("add deserialized verifier for [%s]:[%s]", idHash, logging2.Identifier(verifier))
336330
o.verifiers[idHash] = entry
337331
return verifier, nil
338332
}
@@ -342,14 +336,3 @@ func (o *Service) deleteSigner(id string) {
342336
defer o.sync.Unlock()
343337
delete(o.signers, id)
344338
}
345-
346-
func GetIdentifier(f any) string {
347-
if f == nil {
348-
return "<nil>"
349-
}
350-
t := reflect.TypeOf(f)
351-
for t.Kind() == reflect.Ptr {
352-
t = t.Elem()
353-
}
354-
return t.PkgPath() + "/" + t.Name()
355-
}

token/services/network/orion/network.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ func (n *Network) NewEnvelope() driver.Envelope {
146146
}
147147

148148
func (n *Network) StoreTransient(id string, transient driver.TransientMap) error {
149-
return n.n.Vault().StoreTransient(id, transient)
149+
return n.n.Vault().StoreTransient(context.Background(), id, transient)
150150
}
151151

152152
func (n *Network) TransientExists(id string) bool {
153-
return n.n.MetadataService().Exists(id)
153+
return n.n.MetadataService().Exists(context.Background(), id)
154154
}
155155

156156
func (n *Network) GetTransient(id string) (driver.TransientMap, error) {
157-
tm, err := n.n.MetadataService().LoadTransient(id)
157+
tm, err := n.n.MetadataService().LoadTransient(context.Background(), id)
158158
if err != nil {
159159
return nil, err
160160
}

token/services/ttx/endorse.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ import (
2121
"github.com/hyperledger-labs/fabric-smart-client/platform/view/view"
2222
"github.com/hyperledger-labs/fabric-token-sdk/token"
2323
"github.com/hyperledger-labs/fabric-token-sdk/token/services/identity/multisig"
24-
"github.com/hyperledger-labs/fabric-token-sdk/token/services/identity/sig"
2524
"github.com/hyperledger-labs/fabric-token-sdk/token/services/network"
2625
"github.com/hyperledger-labs/fabric-token-sdk/token/services/tokens"
2726
session2 "github.com/hyperledger-labs/fabric-token-sdk/token/services/utils/json/session"
2827
"github.com/pkg/errors"
29-
"go.uber.org/zap/zapcore"
3028
)
3129

3230
type distributionListEntry struct {
@@ -277,15 +275,7 @@ func (c *CollectEndorsementsView) signLocal(party view.Identity, signer token.Si
277275
if err != nil {
278276
return nil, err
279277
}
280-
if logger.IsEnabledFor(zapcore.DebugLevel) {
281-
var f any = signer
282-
logger.Debugf("signature generated (local, me) [%s,%s,%s,%v]",
283-
hash.Hashable(signatureRequest.MessageToSign()),
284-
hash.Hashable(sigma),
285-
party,
286-
sig.GetIdentifier(f),
287-
)
288-
}
278+
logger.Debugf("signature generated (local, me) [%s,%s,%s,%v]", hash.Hashable(signatureRequest.MessageToSign()), hash.Hashable(sigma), party, logging.Identifier(signer))
289279
return sigma, nil
290280
}
291281

0 commit comments

Comments
 (0)