Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ Changelog for NeoFS Node
- Optimized netmap caching in node (#3966)
- Store in metabase associated object ID in bytes instead of Base58 (#3971)
- Optimized local RANGE request execution (#3967)
- GET now supports payload ranges (#3991)

### Removed
- `policer.max_workers` configuration (#3920)
- Deprecated `Search` method support from storage nodes (#3931)
- Internal conversions of node addresses received from network map (#3981)
- `GetRangeHash` method support from storage nodes and related `object hash` CLI command (#3991)

### Updated
- `github.com/nspcc-dev/neofs-sdk-go` module to `v1.0.0-rc.18.0.20260513135441-5c10a9626760` (#3991)

### Updating from v0.52.0
Drop `policer.max_workers` configuration, it's no-op since 0.52.0.
Expand All @@ -59,6 +62,12 @@ migrate to `Searchv2` if needed.
Metabase will migrate to version 11 with this release to update object
counters, this can take a while for shards with high object numbers.

Storage nodes no longer implement deprecated `GetRangeHash` method and
`neofs-cli object hash` command has been removed.

GET now supports payload ranges. Migrate from deprecated RANGE requests to GET
with range parameters.

## [0.52.0] - 2026-03-27 - Woodo

Delivering performance optimizations and initial placement feature this
Expand Down
2 changes: 1 addition & 1 deletion cmd/neofs-cli/modules/acl/extended/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Rule consist of these blocks: <action> <operation> [<filter1> ...] [<target1> ..

Action is 'allow' or 'deny'.

Operation is an object service verb: 'get', 'head', 'put', 'search', 'delete', 'getrange', or 'getrangehash'.
Operation is an object service verb: 'get', 'head', 'put', 'search', 'delete', or 'getrange'.

Filter consists of <typ>:<key><match><value>
Typ is 'obj' for object applied filter or 'req' for request applied filter.
Expand Down
18 changes: 17 additions & 1 deletion cmd/neofs-cli/modules/object/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func initObjectGetCmd() {
_ = objectGetCmd.MarkFlagRequired(commonflags.OIDFlag)

flags.String(fileFlag, "", "File to write object payload to(with -b together with signature and header). Default: stdout.")
flags.String(rangeFlag, "", rangeFlagUsage)
flags.Bool(rawFlag, false, rawFlagDesc)
flags.Bool(noProgressFlag, false, "Do not show progress bar")
flags.Bool(binaryFlag, false, "Serialize whole object structure into given file(id + signature + header + payload).")
Expand Down Expand Up @@ -67,6 +68,14 @@ func getObject(cmd *cobra.Command, _ []string) error {
out = f
}

ranges, err := getRangeList(cmd)
if err != nil {
return err
}
if len(ranges) > 1 {
return fmt.Errorf("at most one range can be specified, got: %d", len(ranges))
}

pk, err := key.GetOrGenerate(cmd)
if err != nil {
return err
Expand Down Expand Up @@ -100,6 +109,13 @@ func getObject(cmd *cobra.Command, _ []string) error {
noProgress, _ := cmd.Flags().GetBool(noProgressFlag)

binary, _ := cmd.Flags().GetBool(binaryFlag)
if len(ranges) != 0 {
if binary {
return fmt.Errorf("--%s cannot be used with --%s", binaryFlag, rangeFlag)
}
prm.SetRange(ranges[0].GetOffset(), ranges[0].GetLength())
prm.MarkPayloadOnly()
}

hdr, rdr, err := cli.ObjectGetInit(ctx, cnr, obj, user.NewAutoIDSigner(*pk), prm)
if err == nil {
Expand Down Expand Up @@ -141,7 +157,7 @@ func getObject(cmd *cobra.Command, _ []string) error {
}

// Print header only if file is not streamed to stdout.
if filename != "" {
if filename != "" && len(ranges) == 0 {
err = printHeader(cmd, &hdr)
if err != nil {
return err
Expand Down
154 changes: 0 additions & 154 deletions cmd/neofs-cli/modules/object/hash.go

This file was deleted.

7 changes: 7 additions & 0 deletions cmd/neofs-cli/modules/object/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ import (
"github.com/spf13/cobra"
)

const (
rangeSep = ":"
rangeFlag = "range"
rangeFlagUsage = "Range to take data from in the form offset:length"
)

var objectRangeCmd = &cobra.Command{
Use: "range",
Short: "Get payload range data of an object",
Expand Down Expand Up @@ -108,6 +114,7 @@ func getObjectRange(cmd *cobra.Command, _ []string) error {
prm.MarkRaw()
}

//nolint:staticcheck
rdr, err := cli.ObjectRangeInit(ctx, cnr, obj, ranges[0].GetOffset(), ranges[0].GetLength(), user.NewAutoIDSigner(*pk), prm)
if err != nil {
err = fmt.Errorf("init payload reading: %w", err)
Expand Down
2 changes: 0 additions & 2 deletions cmd/neofs-cli/modules/object/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func init() {
objectSearchCmd,
searchV2Cmd,
objectHeadCmd,
objectHashCmd,
objectRangeCmd,
objectLockCmd}

Expand All @@ -43,7 +42,6 @@ func init() {
initObjectGetCmd()
initObjectSearchCmd()
initObjectHeadCmd()
initObjectHashCmd()
initObjectRangeCmd()
initCommandObjectLock()
initObjectNodesCmd()
Expand Down
2 changes: 0 additions & 2 deletions cmd/neofs-cli/modules/object/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ func _readVerifiedSession(cmd *cobra.Command, dst SessionPrm, key *ecdsa.Private
cmdVerb = session.VerbObjectSearch
case *client.PrmObjectRange:
cmdVerb = session.VerbObjectRange
case *client.PrmObjectHash:
cmdVerb = session.VerbObjectRangeHash
}

tok, err := getVerifiedSession(cmd, cmdVerb, key, cnr)
Expand Down
2 changes: 0 additions & 2 deletions cmd/neofs-cli/modules/object/util_session_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ func attachVerifiedSessionV2(cmd *cobra.Command, tok *session.Token, dst Session
cmdVerb = session.VerbObjectSearch
case *client.PrmObjectRange:
cmdVerb = session.VerbObjectRange
case *client.PrmObjectHash:
cmdVerb = session.VerbObjectRangeHash
}

err := verifySessionV2(cmd, tok, cmdVerb, key, cnr)
Expand Down
4 changes: 1 addition & 3 deletions cmd/neofs-cli/modules/session/create_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,16 +368,14 @@ func parseVerbs(verbsStr string) ([]session.Verb, error) {
verb = session.VerbObjectDelete
case "RANGE", "OBJECTRANGE":
verb = session.VerbObjectRange
case "RANGEHASH", "OBJECTRANGEHASH", "RANGE_HASH", "OBJECT_RANGE_HASH":
verb = session.VerbObjectRangeHash
case "CONTAINERSET", "CONTAINERSETACL", "CONTAINER_SET", "CONTAINER_SET_ACL":
verb = session.VerbContainerSetEACL
case "CONTAINERPUT", "CONTAINER_PUT":
verb = session.VerbContainerPut
case "CONTAINERDELETE", "CONTAINER_DELETE":
verb = session.VerbContainerDelete
default:
return nil, fmt.Errorf("unknown verb: %s (supported: GET,PUT,HEAD,SEARCH,DELETE,RANGE,RANGEHASH,CONTAINERSET,CONTAINERPUT,CONTAINERDELETE)", verbStr)
return nil, fmt.Errorf("unknown verb: %s (supported: GET,PUT,HEAD,SEARCH,DELETE,RANGE,CONTAINERSET,CONTAINERPUT,CONTAINERDELETE)", verbStr)
}

verbs = append(verbs, verb)
Expand Down
6 changes: 3 additions & 3 deletions cmd/neofs-cli/modules/util/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ import (
func PrettyPrintTableBACL(cmd *cobra.Command, bacl *acl.Basic) {
// Header
w := tabwriter.NewWriter(cmd.OutOrStdout(), 1, 4, 4, ' ', 0)
fmt.Fprintln(w, "\tRangeHASH\tRange\tSearch\tDelete\tPut\tHead\tGet")
fmt.Fprintln(w, "\tRange\tSearch\tDelete\tPut\tHead\tGet")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhat questionable, the bits are still there. Although now they're more like 'reserved' and don't print some of those.

// Bits
bits := []string{
boolToString(bacl.Sticky()) + " " + boolToString(!bacl.Extendable()),
getRoleBitsForOperation(bacl, acl.OpObjectHash), getRoleBitsForOperation(bacl, acl.OpObjectRange),
getRoleBitsForOperation(bacl, acl.OpObjectRange),
getRoleBitsForOperation(bacl, acl.OpObjectSearch), getRoleBitsForOperation(bacl, acl.OpObjectDelete),
getRoleBitsForOperation(bacl, acl.OpObjectPut), getRoleBitsForOperation(bacl, acl.OpObjectHead),
getRoleBitsForOperation(bacl, acl.OpObjectGet),
}
fmt.Fprintln(w, strings.Join(bits, "\t"))
// Footer
footer := []string{"X F"}
for range 7 {
for range 6 {
footer = append(footer, "U S O B")
}
fmt.Fprintln(w, strings.Join(footer, "\t"))
Expand Down
12 changes: 0 additions & 12 deletions cmd/neofs-node/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ func (s *objectSvc) GetRange(ctx context.Context, prm getsvc.RangePrm) error {
return s.get.GetRange(ctx, prm)
}

func (s *objectSvc) GetRangeHash(ctx context.Context, prm getsvc.RangeHashPrm) (*getsvc.RangeHashRes, error) {
return s.get.GetRangeHash(ctx, prm)
}

type delNetInfo struct {
netmap.State
tsLifetime uint64
Expand Down Expand Up @@ -443,14 +439,6 @@ func (c *reputationClient) ObjectHead(ctx context.Context, containerID cid.ID, o
return res, err
}

func (c *reputationClient) ObjectHash(ctx context.Context, containerID cid.ID, objectID oid.ID, signer user.Signer, prm client.PrmObjectHash) ([][]byte, error) {
res, err := c.MultiAddressClient.ObjectHash(ctx, containerID, objectID, signer, prm)

c.submitResult(err)

return res, err
}

func (c *reputationClient) ObjectSearchInit(ctx context.Context, containerID cid.ID, signer user.Signer, prm client.PrmObjectSearch) (*client.ObjectListReader, error) {
res, err := c.MultiAddressClient.ObjectSearchInit(ctx, containerID, signer, prm)

Expand Down
2 changes: 1 addition & 1 deletion docs/cli-commands/neofs-cli_acl_extended_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Rule consist of these blocks: <action> <operation> [<filter1> ...] [<target1> ..

Action is 'allow' or 'deny'.

Operation is an object service verb: 'get', 'head', 'put', 'search', 'delete', 'getrange', or 'getrangehash'.
Operation is an object service verb: 'get', 'head', 'put', 'search', 'delete', or 'getrange'.

Filter consists of <typ>:<key><match><value>
Typ is 'obj' for object applied filter or 'req' for request applied filter.
Expand Down
1 change: 0 additions & 1 deletion docs/cli-commands/neofs-cli_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Operations with Objects
* [neofs-cli](neofs-cli.md) - Command Line Tool to work with NeoFS
* [neofs-cli object delete](neofs-cli_object_delete.md) - Delete object from NeoFS
* [neofs-cli object get](neofs-cli_object_get.md) - Get object from NeoFS
* [neofs-cli object hash](neofs-cli_object_hash.md) - Get object hash
* [neofs-cli object head](neofs-cli_object_head.md) - Get object header
* [neofs-cli object lock](neofs-cli_object_lock.md) - Lock object in container
* [neofs-cli object nodes](neofs-cli_object_nodes.md) - Show nodes for an object
Expand Down
1 change: 1 addition & 0 deletions docs/cli-commands/neofs-cli_object_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ neofs-cli object get [flags]
-h, --help help for get
--no-progress Do not show progress bar
--oid string Object ID.
--range string Range to take data from in the form offset:length
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible to control header inclusion as well.

--raw Set raw request option
-r, --rpc-endpoint string Remote node address (as 'multiaddr' or '<host>:<port>')
--session string Filepath to a JSON- or binary-encoded token of the object GET session
Expand Down
Loading
Loading