diff --git a/cmd/neofs-node/container.go b/cmd/neofs-node/container.go index d187874ad3..a050253ba7 100644 --- a/cmd/neofs-node/container.go +++ b/cmd/neofs-node/container.go @@ -39,8 +39,8 @@ const ( ) func initContainerService(c *cfg) { - // container wrapper that tries to invoke notary - // requests if chain is configured so + // container wrapper that invokes notary + // requests with the (empty) Alphabet signature wrap, err := cntClient.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0) fatalOnErr(err) @@ -48,7 +48,7 @@ func initContainerService(c *cfg) { // container wrapper that always sends non-notary // requests - wrapperNoNotary, err := cntClient.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0) + wrapperNoNotary, err := cntClient.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0, cntClient.DisableNotarySigning()) fatalOnErr(err) cnrSrc := cntClient.AsContainerSource(wrap) diff --git a/pkg/morph/client/container/client.go b/pkg/morph/client/container/client.go index f32a8eb134..781949ee2d 100644 --- a/pkg/morph/client/container/client.go +++ b/pkg/morph/client/container/client.go @@ -59,6 +59,10 @@ func NewFromMorph(cli *client.Client, contract util.Uint160, fee fixedn.Fixed8, o.staticOpts = append(o.staticOpts, client.WithCustomFee(putNamedMethod, o.feePutNamed)) } + if !o.disableNotarySigning { + o.staticOpts = append(o.staticOpts, client.TryNotary()) + } + sc, err := client.NewStatic(cli, contract, fee, o.staticOpts...) if err != nil { return nil, fmt.Errorf("can't create container static client: %w", err) @@ -85,13 +89,24 @@ type opts struct { feePutNamedSet bool feePutNamed fixedn.Fixed8 + disableNotarySigning bool + staticOpts []client.StaticClientOption } func defaultOpts() *opts { - var o = new(opts) - o.staticOpts = append(o.staticOpts, client.TryNotary()) - return o + return new(opts) +} + +// DisableNotarySigning returns option to disable +// notary request signing. With that option, every +// call will be created, signed with provided key +// (a single regular sign) and sent to the side +// chain. +func DisableNotarySigning() Option { + return func(o *opts) { + o.disableNotarySigning = true + } } // AsAlphabet returns option to sign main TX diff --git a/pkg/services/container/announcement/load/controller/calls.go b/pkg/services/container/announcement/load/controller/calls.go index 4cb0071c07..7604d60b7d 100644 --- a/pkg/services/container/announcement/load/controller/calls.go +++ b/pkg/services/container/announcement/load/controller/calls.go @@ -107,7 +107,7 @@ func (c *announceContext) announce() { return } - c.log.Debug("trust announcement successfully finished") + c.log.Debug("load announcement successfully finished") } func (c *Controller) acquireAnnouncement(prm StartPrm) *announceContext {