From f41ad9d419d925195656ccf56ff764ad3ef57f75 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 17 Feb 2023 22:32:31 +0300 Subject: [PATCH] [#239] morph/client: Recreate actor/wrappers in SetGroupSignerScope That's the reason #2230 and #2263 were not detected earlier, we actually had Global scope being used before reconnection to RPC node. Signed-off-by: Roman Khimov Signed-off-by: Evgenii Stratonikov --- CHANGELOG.md | 1 + pkg/morph/client/nns.go | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b13469d0..270d0265 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ Changelog for FrostFS Node - Parts of a locked object could not be removed anymore (#141) - Non-alphabet nodes do not try to handle alphabet events (#181) - Failing SN and IR transactions because of incorrect scopes (#2230, #2263) +- Global scope used for some transactions (#2230, #2263) ### Removed ### Updated diff --git a/pkg/morph/client/nns.go b/pkg/morph/client/nns.go index e61cb8e1..473b3500 100644 --- a/pkg/morph/client/nns.go +++ b/pkg/morph/client/nns.go @@ -208,10 +208,18 @@ func (c *Client) SetGroupSignerScope() error { return err } - c.cfg.signer = &transaction.Signer{ + // Don't change c before everything is OK. + cfg := c.cfg + cfg.signer = &transaction.Signer{ Scopes: transaction.CustomGroups | transaction.CalledByEntry, AllowedGroups: []*keys.PublicKey{pub}, } + rpcActor, err := newActor(c.client, c.acc, cfg) + if err != nil { + return err + } + c.cfg = cfg + c.setActor(rpcActor) return nil }