From 0bb6c6e6bd7039aa173542e0d0581baff77cbac2 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 16 Dec 2024 15:54:15 +0300 Subject: [PATCH 1/2] cli: take care of `upload-bin` defaults Signed-off-by: Anna Shaleva --- cli/util/convert.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cli/util/convert.go b/cli/util/convert.go index 0117dd8533..d2fe4d63c6 100644 --- a/cli/util/convert.go +++ b/cli/util/convert.go @@ -57,16 +57,16 @@ func NewCommands() []*cli.Command { Action: cmdargs.EnsureNotEmpty("container"), }, &cli.StringFlag{ - Name: "block-attribute", - Usage: "Attribute key of the block object", - Required: true, - Action: cmdargs.EnsureNotEmpty("block-attribute"), + Name: "block-attribute", + Usage: "Attribute key of the block object", + Value: neofs.DefaultBlockAttribute, + Action: cmdargs.EnsureNotEmpty("block-attribute"), }, &cli.StringFlag{ - Name: "index-attribute", - Usage: "Attribute key of the index file object", - Required: true, - Action: cmdargs.EnsureNotEmpty("index-attribute"), + Name: "index-attribute", + Usage: "Attribute key of the index file object", + Value: neofs.DefaultIndexFileAttribute, + Action: cmdargs.EnsureNotEmpty("index-attribute"), }, &flags.AddressFlag{ Name: "address", @@ -80,12 +80,12 @@ func NewCommands() []*cli.Command { &cli.UintFlag{ Name: "workers", Usage: "Number of workers to fetch and upload blocks concurrently", - Value: 50, + Value: 20, }, &cli.UintFlag{ Name: "searchers", Usage: "Number of concurrent searches for blocks", - Value: 20, + Value: 100, }, &cli.UintFlag{ Name: "retries", From 4b7b2ef701c58f47189e7df9532f25fb36661204 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 17 Dec 2024 10:18:34 +0300 Subject: [PATCH 2/2] docs: take care of `upload-bin` documentation Signed-off-by: Anna Shaleva --- docs/neofs-blockstorage.md | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/docs/neofs-blockstorage.md b/docs/neofs-blockstorage.md index f1115d95e1..aa84db0dc6 100644 --- a/docs/neofs-blockstorage.md +++ b/docs/neofs-blockstorage.md @@ -75,37 +75,14 @@ shuts down automatically. ### NeoFS Upload Command The `upload-bin` command is designed to fetch blocks from the RPC node and upload -them to the NeoFS container. -It also creates and uploads index files. Below is an example usage of the command: +them to the NeoFS container. It also creates and uploads index files. Below is an +example usage of the command: ```shell ./bin/neo-go util upload-bin --cid 9iVfUg8aDHKjPC4LhQXEkVUM4HDkR7UCXYLs8NQwYfSG --wallet-config ./wallet-config.yml --block-attribute Block --index-attribute Index --rpc-endpoint https://rpc.t5.n3.nspcc.ru:20331 -fsr st1.t5.fs.neo.org:8080 -fsr st2.t5.fs.neo.org:8080 -fsr st3.t5.fs.neo.org:8080 ``` -The command supports the following options: -``` -NAME: -neo-go util upload-bin - Fetch blocks from RPC node and upload them to the NeoFS container - -USAGE: -neo-go util upload-bin --fs-rpc-endpoint [,[...]] --container --block-attribute block --index-attribute index --rpc-endpoint [--timeout