Skip to content

Commit 0c0ecfd

Browse files
committed
fix(rustffi): forward the node identity key regardless of enableSigning (#1603)
The wrapper only handed the node identity key to the FFI node when enableSigning was true, so an FFI node started with signing disabled had no P2P/KMS identity and a peer's KMS denied it on a registered branchable-collection object. Go sets the node identity at construction independently of signing (cbindings/node_new.go); do the same.
1 parent 9960cf6 commit 0c0ecfd

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

tests/clients/rustffi/wrapper.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,10 @@ func NewWrapper(
358358
opts.InMemory = true
359359
}
360360

361-
// If signing is enabled and we have a full identity with a private key, use it
362-
if enableSigning && nodeIdentity != nil {
361+
// Go configures the node identity at construction independently of block
362+
// signing; the Rust node derives its P2P and KMS identity from this key.
363+
// EnableSigning stays a separate flag.
364+
if nodeIdentity != nil {
363365
if fullIdent, ok := nodeIdentity.(identity.FullIdentity); ok {
364366
privKey := fullIdent.PrivateKey()
365367
opts.SigningKeyType = string(privKey.Type())
@@ -496,8 +498,10 @@ func NewWrapperWithP2P(
496498
opts.InMemory = true
497499
}
498500

499-
// If signing is enabled and we have a full identity with a private key, use it
500-
if enableSigning && nodeIdentity != nil {
501+
// Go configures the node identity at construction independently of block
502+
// signing; the Rust node derives its P2P and KMS identity from this key.
503+
// EnableSigning stays a separate flag.
504+
if nodeIdentity != nil {
501505
if fullIdent, ok := nodeIdentity.(identity.FullIdentity); ok {
502506
privKey := fullIdent.PrivateKey()
503507
opts.SigningKeyType = string(privKey.Type())

0 commit comments

Comments
 (0)