Commit graph

4563 commits

Author SHA1 Message Date
926cdeb072 [#1043] services: Regenerate proto
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-13 10:29:45 +00:00
d1d53d2bb6 [#963] node: Add logging for waitNotaryDeposit
All checks were successful
DCO action / DCO (pull_request) Successful in 2m19s
Vulncheck / Vulncheck (pull_request) Successful in 3m13s
Build / Build Components (1.21) (pull_request) Successful in 4m13s
Build / Build Components (1.20) (pull_request) Successful in 4m18s
Tests and linters / Staticcheck (pull_request) Successful in 5m57s
Tests and linters / Lint (pull_request) Successful in 6m31s
Tests and linters / gopls check (pull_request) Successful in 7m11s
Tests and linters / Tests (1.20) (pull_request) Successful in 9m42s
Tests and linters / Tests (1.21) (pull_request) Successful in 10m30s
Tests and linters / Tests with -race (pull_request) Successful in 10m33s
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-03-13 11:59:51 +03:00
7a4b6057ce Revert "[#963] node: Go on initialization even deposit notary is hung"
This reverts commit b4cb54e7ed.

Signed-off-by: aarifullin <a.arifullin@yadro.com>
2024-03-13 11:53:59 +03:00
f42a529f49 [#1038] pre-commit: Use cached tests in hook
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-12 18:07:26 +00:00
179b6e64fa [#1038] Makefile: Allow to override testflags
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-12 18:07:26 +00:00
e3579922d8 [#1038] pre-commit: Remove gitlint
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-12 18:07:26 +00:00
5c252c9193 [#1039] object: Skip APE check for certain request roles
All checks were successful
DCO action / DCO (pull_request) Successful in 1m31s
Vulncheck / Vulncheck (pull_request) Successful in 2m52s
Build / Build Components (1.21) (pull_request) Successful in 3m52s
Build / Build Components (1.20) (pull_request) Successful in 4m16s
Tests and linters / gopls check (pull_request) Successful in 11m54s
Tests and linters / Staticcheck (pull_request) Successful in 12m31s
Tests and linters / Tests (1.21) (pull_request) Successful in 12m49s
Tests and linters / Tests (1.20) (pull_request) Successful in 13m8s
Tests and linters / Tests with -race (pull_request) Successful in 13m14s
Tests and linters / Lint (pull_request) Successful in 13m31s
* Skip APE check if a role is Container.
* Skip APE check if a role is IR and methods are get-like.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-03-12 16:15:20 +03:00
b4cb54e7ed [#963] node: Go on initialization even deposit notary is hung
* Make makeAndWaitNotaryDeposit run asynchronously as worker
  during application boot-up.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-03-12 10:18:07 +00:00
6eb63cf5c7 [#1036] Makefile: Add missing comments
All checks were successful
DCO action / DCO (pull_request) Successful in 3m6s
Vulncheck / Vulncheck (pull_request) Successful in 3m32s
Build / Build Components (1.20) (pull_request) Successful in 4m24s
Build / Build Components (1.21) (pull_request) Successful in 4m29s
Tests and linters / Staticcheck (pull_request) Successful in 5m15s
Tests and linters / gopls check (pull_request) Successful in 5m42s
Tests and linters / Lint (pull_request) Successful in 6m6s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m48s
Tests and linters / Tests with -race (pull_request) Successful in 9m3s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m40s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-12 10:54:53 +03:00
aa27596d77 [#1036] help.mk: Print target without comments
Make it easy to notice missing comments and avoid reusing comment from
some other place.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-12 10:54:53 +03:00
d9fe63ee03 [#1036] help.mk: Fix target regexp pattern
We use no space before the colon, but we use it when declaring a
variable.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-12 10:54:53 +03:00
3195142d67 [#959] writecache: Avoid manipulation with cache in DEGRADED mode
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-03-11 18:35:41 +00:00
d433b49265 [#973] node: Resolve perfsprint linter
All checks were successful
DCO action / DCO (pull_request) Successful in 2m40s
Vulncheck / Vulncheck (pull_request) Successful in 3m41s
Build / Build Components (1.20) (pull_request) Successful in 4m27s
Build / Build Components (1.21) (pull_request) Successful in 5m6s
Tests and linters / Staticcheck (pull_request) Successful in 6m16s
Tests and linters / gopls check (pull_request) Successful in 6m23s
Tests and linters / Lint (pull_request) Successful in 6m48s
Tests and linters / Tests (1.20) (pull_request) Successful in 9m4s
Tests and linters / Tests with -race (pull_request) Successful in 9m9s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m23s
`fmt.Errorf can be replaced with errors.New` and `fmt.Sprintf can be replaced with string addition`

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-11 17:55:50 +03:00
66a26b7775 [#973] node: Resolve revive: unused-parameter linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-11 17:11:49 +03:00
dacf580b87 [#973] Makefile: Up golangci-lint version
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-11 17:02:23 +03:00
63a29110ee [#634] go.mod: Bump protobuf version
All checks were successful
DCO action / DCO (pull_request) Successful in 5m1s
Vulncheck / Vulncheck (pull_request) Successful in 6m45s
Tests and linters / Staticcheck (pull_request) Successful in 7m51s
Build / Build Components (1.21) (pull_request) Successful in 7m29s
Build / Build Components (1.20) (pull_request) Successful in 8m21s
Tests and linters / gopls check (pull_request) Successful in 8m38s
Tests and linters / Lint (pull_request) Successful in 14m27s
Tests and linters / Tests with -race (pull_request) Successful in 17m35s
Tests and linters / Tests (1.20) (pull_request) Successful in 3m11s
Tests and linters / Tests (1.21) (pull_request) Successful in 2m38s
Found by vulncheck:
Vulnerability #1: GO-2024-2611
    Infinite loop in JSON unmarshaling in google.golang.org/protobuf
  More info: https://pkg.go.dev/vuln/GO-2024-2611
  Module: google.golang.org/protobuf
    Found in: google.golang.org/protobuf@v1.32.0
    Fixed in: google.golang.org/protobuf@v1.33.0

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-06 13:12:34 +03:00
0882840bf5 [#634] shard: Add writecache inhume tests
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-06 13:12:34 +03:00
e5d18e7a85 [#1023] adm: Make --namespace flag required
All checks were successful
DCO action / DCO (pull_request) Successful in 3m58s
Build / Build Components (1.20) (pull_request) Successful in 5m18s
Build / Build Components (1.21) (pull_request) Successful in 5m26s
Tests and linters / gopls check (pull_request) Successful in 6m28s
Tests and linters / Lint (pull_request) Successful in 6m53s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m16s
Vulncheck / Vulncheck (pull_request) Successful in 9m50s
Tests and linters / Staticcheck (pull_request) Successful in 11m8s
Tests and linters / Tests (1.21) (pull_request) Successful in 14m1s
Tests and linters / Tests with -race (pull_request) Successful in 6m47s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-03-05 16:03:39 +03:00
b84cf91f73 [#1009] adm: Make workaround for get-admin and list-rule-chains
* Inroduce workaround to create actor for contract storage interface
  without passing a real alphabet wallet. This is made by creating
  a dummy account.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-03-05 12:34:53 +00:00
c6f0545298 [#1025] Fill last releases changelog
All checks were successful
DCO action / DCO (pull_request) Successful in 3m51s
Vulncheck / Vulncheck (pull_request) Successful in 5m9s
Build / Build Components (1.21) (pull_request) Successful in 5m56s
Build / Build Components (1.20) (pull_request) Successful in 6m5s
Tests and linters / Staticcheck (pull_request) Successful in 6m44s
Tests and linters / gopls check (pull_request) Successful in 7m31s
Tests and linters / Lint (pull_request) Successful in 7m57s
Tests and linters / Tests (1.20) (pull_request) Successful in 9m7s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m34s
Tests and linters / Tests with -race (pull_request) Successful in 10m32s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-05 11:14:21 +03:00
702351a5d1 [#983] blobstor: Allow to specify wait before drop time
All checks were successful
DCO action / DCO (pull_request) Successful in 1m11s
Build / Build Components (1.21) (pull_request) Successful in 3m29s
Vulncheck / Vulncheck (pull_request) Successful in 2m53s
Build / Build Components (1.20) (pull_request) Successful in 4m8s
Tests and linters / Staticcheck (pull_request) Successful in 4m19s
Tests and linters / Lint (pull_request) Successful in 5m50s
Tests and linters / gopls check (pull_request) Successful in 5m40s
Tests and linters / Tests (1.20) (pull_request) Successful in 7m46s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m6s
Tests and linters / Tests with -race (pull_request) Successful in 8m50s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-05 09:23:57 +03:00
1c504dca5c [#1021] dev: Up neo-go version
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 9m56s
DCO action / DCO (pull_request) Successful in 9m47s
Tests and linters / gopls check (pull_request) Successful in 14m23s
Build / Build Components (1.20) (pull_request) Successful in 14m13s
Build / Build Components (1.21) (pull_request) Successful in 15m12s
Tests and linters / Staticcheck (pull_request) Successful in 16m53s
Tests and linters / Tests (1.20) (pull_request) Successful in 21m6s
Tests and linters / Tests (1.21) (pull_request) Successful in 21m10s
Tests and linters / Lint (pull_request) Successful in 21m36s
Tests and linters / Tests with -race (pull_request) Successful in 22m0s
Current version of neo-go is 0.105.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-04 16:16:37 +03:00
b38effd799 [#1019] go.mod: Update sdk-go
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-04 07:44:38 +00:00
ae5bb87e70 Revert "[#866] Use TTL for blobovnicza tree cache"
All checks were successful
DCO action / DCO (pull_request) Successful in 2m7s
Vulncheck / Vulncheck (pull_request) Successful in 3m7s
Tests and linters / Staticcheck (pull_request) Successful in 5m12s
Tests and linters / Lint (pull_request) Successful in 6m23s
Tests and linters / Tests with -race (pull_request) Successful in 7m11s
Tests and linters / gopls check (pull_request) Successful in 7m27s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m5s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m22s
Build / Build Components (1.21) (pull_request) Successful in 1m41s
Build / Build Components (1.20) (pull_request) Successful in 1m56s
This reverts commit d9cbb16bd3.

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-03-01 19:29:33 +03:00
46a04463b2 [#1016] forgejo: Add gopls check step
All checks were successful
DCO action / DCO (pull_request) Successful in 1m34s
Vulncheck / Vulncheck (pull_request) Successful in 3m28s
Build / Build Components (1.21) (pull_request) Successful in 4m21s
Build / Build Components (1.20) (pull_request) Successful in 4m29s
Tests and linters / Staticcheck (pull_request) Successful in 6m7s
Tests and linters / Lint (pull_request) Successful in 6m28s
Tests and linters / gopls check (pull_request) Successful in 6m17s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m23s
Tests and linters / Tests with -race (pull_request) Successful in 8m37s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m53s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-01 12:13:48 +03:00
d6534fd755 [#1016] frostfs-node: Fix gopls issues
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-01 12:13:43 +03:00
6dbb61caf4 [#1016] Makefile: Add gopls check target
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-01 12:13:35 +03:00
6f25c790aa [#1012] cli: Fix messages for list commands
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-03-01 07:16:57 +00:00
93bf9acbc2 [#898] control: Remove removed flag from RemoveChainLocalOverrideResponse
* Remove removed flag in service.proto for RemoveChainLocalOverrideResponse.
* Regenerate control API.
* Return error only if RemoveOverride returns non-NotFound code.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-28 19:07:07 +00:00
75a1a95c2c [#986] tree: Skip ACL checks if basicACL mask is unset
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-28 19:05:57 +00:00
b1d171c261 [#986] container: Interpret APE NoRuleFound as request deny
* If APE check returns NoRuleFound, then it is taken for request deny.
* Add more unit-test for ape container middleware.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-28 19:05:57 +00:00
7cc368e188 [#986] object: Introduce soft ape checks
* Soft APE check means that APE should allow request even
  it gets status NoRuleFound for a request. Otherwise,
  it is interpreted as Deny.
* Soft APE check is performed if basic ACL mask is not set.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-28 19:05:57 +00:00
bc9dbb26ec [#932] adm: Add custom Actor to sign tx by all committee accounts
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-02-28 18:57:16 +00:00
61c58e2f92 [#932] adm: Add commands to manipulate with NNS contract
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-02-28 18:57:16 +00:00
9801d08438 [#932] adm: Move defaults for NNS to package constants
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-02-28 18:57:16 +00:00
918613546f [#1008] metabase: Do not update storageID on put
All checks were successful
DCO action / DCO (pull_request) Successful in 4m56s
Build / Build Components (1.21) (pull_request) Successful in 7m52s
Build / Build Components (1.20) (pull_request) Successful in 8m11s
Vulncheck / Vulncheck (pull_request) Successful in 8m9s
Tests and linters / Staticcheck (pull_request) Successful in 9m58s
Tests and linters / Lint (pull_request) Successful in 10m42s
Tests and linters / Tests (1.20) (pull_request) Successful in 12m14s
Tests and linters / Tests with -race (pull_request) Successful in 12m17s
Tests and linters / Tests (1.21) (pull_request) Successful in 12m34s
There may be a race condition between put an object and
flushing the writecache:
1. Put object to the writecache
2. Writecache flushes object to the blobstore and sets blobstore's
storageID
3. Put object to the metabase, set writecache's storageID

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-28 11:01:50 +03:00
2ad433dbcb [#1005] engine: Drop shards weights
All checks were successful
DCO action / DCO (pull_request) Successful in 4m7s
Vulncheck / Vulncheck (pull_request) Successful in 4m53s
Build / Build Components (1.21) (pull_request) Successful in 5m46s
Build / Build Components (1.20) (pull_request) Successful in 6m21s
Tests and linters / Staticcheck (pull_request) Successful in 7m45s
Tests and linters / Lint (pull_request) Successful in 8m44s
Tests and linters / Tests (1.21) (pull_request) Successful in 13m1s
Tests and linters / Tests (1.20) (pull_request) Successful in 15m42s
Tests and linters / Tests with -race (pull_request) Successful in 16m10s
Unused.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-26 17:25:05 +03:00
abea258b65 [#1000] adm: Use default batch size for TraverseIterator()
Nothing is broken now, but will easily become if we change nnsMaxTokens,
thus this change.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-23 06:24:40 +00:00
4b13b85173 [#1000] morph: Fix batch size in TraverseIterator()
Initial prefetch size can be arbitrary an restricted only by VM/RPC
limits. For TraverseIterator() there is an explicit check on the
server-side, though.
Introduced in df055fead5.
Refs #931.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-23 06:24:40 +00:00
e18f0f5178 [#999] morph: Use Global scope for proxy contract
All checks were successful
DCO action / DCO (pull_request) Successful in 2m28s
Vulncheck / Vulncheck (pull_request) Successful in 2m52s
Build / Build Components (1.21) (pull_request) Successful in 4m5s
Build / Build Components (1.20) (pull_request) Successful in 4m12s
Tests and linters / Lint (pull_request) Successful in 6m10s
Tests and linters / Staticcheck (pull_request) Successful in 5m59s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m24s
Tests and linters / Tests with -race (pull_request) Successful in 8m38s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m58s
Proxy contract can now be used as an owner of NNS domains, thus we need
it not only to pay for the transaction but also to check domain
ownership. CalledByEntry is not enough, because we may register NNS
domains owned by proxy indirectly from the container contract.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-21 14:28:42 +03:00
7470c383dd [#997] metabase: Drop toMoveIt bucket
All checks were successful
DCO action / DCO (pull_request) Successful in 2m9s
Vulncheck / Vulncheck (pull_request) Successful in 3m3s
Build / Build Components (1.20) (pull_request) Successful in 3m56s
Build / Build Components (1.21) (pull_request) Successful in 3m54s
Tests and linters / Staticcheck (pull_request) Successful in 5m26s
Tests and linters / Lint (pull_request) Successful in 6m19s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m6s
Tests and linters / Tests with -race (pull_request) Successful in 8m20s
Tests and linters / Tests (1.21) (pull_request) Successful in 8m39s
It is not used.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-21 10:06:05 +03:00
adf7ebab5b [#996] metabase: Speed up bucket creation
Most of the time it exits, e.g. when it is per-container and use on each
object PUT. Bbolt implementation first tries to create bucket and then
returns it if it exists. Create operation uses cursor and thus is not
very lightweight, we can avoid it.

```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/metabase
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
                 │     old     │                new                 │
                 │   sec/op    │   sec/op     vs base               │
Put/parallel-8     174.4µ ± 3%   163.3µ ± 3%  -6.39% (p=0.000 n=10)
Put/sequential-8   263.3µ ± 2%   259.0µ ± 1%  -1.64% (p=0.000 n=10)
geomean            214.3µ        205.6µ       -4.05%

                 │     old      │                 new                 │
                 │     B/op     │     B/op      vs base               │
Put/parallel-8     275.3Ki ± 3%   281.1Ki ± 4%       ~ (p=0.063 n=10)
Put/sequential-8   413.0Ki ± 2%   426.6Ki ± 2%  +3.29% (p=0.003 n=10)
geomean            337.2Ki        346.3Ki       +2.70%

                 │     old     │                 new                 │
                 │  allocs/op  │  allocs/op   vs base                │
Put/parallel-8      678.0 ± 1%    524.5 ± 2%  -22.64% (p=0.000 n=10)
Put/sequential-8   1.329k ± 0%   1.183k ± 0%  -10.91% (p=0.000 n=10)
geomean             949.1         787.9       -16.98%
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-20 15:42:58 +00:00
47d9ce71be [#986] cli: Allow add-rule command to parse new actions
* Introduce Object.* and Container.* actions that
  span all methods for services.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-20 07:42:29 +00:00
0f064b7962 [#989] util: Introduce any and all statements for ape rule parsing
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-20 07:42:29 +00:00
613e11c4d2 [#989] adm: Read and parse chains from file
* Slightly fix the approach to read encoded chain from file
  in frostfs-adm.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-20 07:42:29 +00:00
9611710e19 [#989] cli: Read and parse chains from file
* Introduce path flag to make add-rule command read and parse
  chain from file. File is binary/JSON-encoded chain.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-02-20 07:42:29 +00:00
9adcb253be Revert "[#972] go.mod: Bump go version to go1.21"
This reverts commit e39a714c25.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-19 15:36:01 +00:00
9f68305c2e Revert "[#972] pilorama: Remove removeDuplicatesInPlace()"
This reverts commit 45fd4e4ff1.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-19 15:36:01 +00:00
dad56d2e98 Revert "[#972] Use min/max builtins"
This reverts commit 89784b2e0a.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-19 15:36:01 +00:00
4bfc6d29b9 Revert "[#972] Adopt slices.BinarySearch()"
This reverts commit d2f13a29de.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-02-19 15:36:01 +00:00