7853dbc315
[ #1557 ] morph/event: Remove embedded structs from scriptHashWithValue
...
Tests and linters / Run gofumpt (push) Successful in 1m23s
Tests and linters / Staticcheck (push) Successful in 3m10s
Vulncheck / Vulncheck (push) Successful in 4m8s
Tests and linters / Lint (push) Successful in 4m33s
Build / Build Components (push) Successful in 4m36s
Pre-commit hooks / Pre-commit (push) Successful in 5m14s
Tests and linters / Tests (push) Successful in 5m20s
Tests and linters / Tests with -race (push) Successful in 6m7s
Tests and linters / gopls check (push) Successful in 6m12s
Also, make them public, because otherwise `unused` linter complains.
```
pkg/morph/event/utils.go:25:2 unused field `typ` is unused
```
This complain is wrong, though: we _use_ `typ` field because the whole
struct is used as a map key.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 11:55:09 +00:00
e9837bbcf9
[ #1554 ] morph/event: Remove unused AlphabetUpdate event
...
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m14s
Vulncheck / Vulncheck (push) Successful in 3m41s
Build / Build Components (push) Successful in 4m5s
Tests and linters / Lint (push) Successful in 4m53s
Pre-commit hooks / Pre-commit (push) Successful in 5m15s
Tests and linters / Tests (push) Successful in 5m52s
Tests and linters / Tests with -race (push) Successful in 6m24s
Tests and linters / gopls check (push) Successful in 6m32s
Refs TrueCloudLab/frostfs-contract#138 .
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 12:01:17 +00:00
b1614a284d
[ #1546 ] morph/event: Export NotificationHandlerInfo fields
...
Tests and linters / Run gofumpt (push) Successful in 1m26s
Tests and linters / Staticcheck (push) Successful in 3m21s
Vulncheck / Vulncheck (push) Successful in 3m36s
Build / Build Components (push) Successful in 3m58s
Tests and linters / Lint (push) Successful in 4m30s
Pre-commit hooks / Pre-commit (push) Successful in 4m35s
Tests and linters / Tests (push) Successful in 5m15s
Tests and linters / Tests with -race (push) Successful in 5m33s
Tests and linters / gopls check (push) Successful in 5m45s
Hiding them achieves nothing, as the struct has no methods and is not
used concurrently.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
d0ce835fbf
[ #1546 ] morph/event: Merge notification parser and handlers
...
They are decoupled, but it is an error to have a handler without a
corresponding parser. Register them together on the code level and get
rid of unreachable code.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
dfa51048a8
[ #1546 ] morph/event: Remove "is started" checks from event handler registrar
...
This codepath hides possible bugs in code.
All initialization function should run before init stage.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
670305a721
[ #1546 ] morph/event: Remove nil checks from event handler registrar
...
This codepath hides possible bugs in code.
We would rather panic then silently fail.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
d1bc4351c3
[ #1545 ] morph/event: Simplify frostfs contract event parsing
...
DCO action / DCO (pull_request) Successful in 4m46s
Vulncheck / Vulncheck (pull_request) Successful in 5m22s
Build / Build Components (pull_request) Successful in 6m12s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m10s
Tests and linters / Run gofumpt (pull_request) Successful in 6m16s
Tests and linters / gopls check (pull_request) Successful in 6m19s
Tests and linters / Staticcheck (pull_request) Successful in 6m25s
Tests and linters / Lint (pull_request) Successful in 6m59s
Tests and linters / Tests (pull_request) Successful in 7m38s
Tests and linters / Tests with -race (pull_request) Successful in 8m37s
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m15s
Vulncheck / Vulncheck (push) Successful in 4m7s
Build / Build Components (push) Successful in 4m32s
Tests and linters / Lint (push) Successful in 4m50s
Pre-commit hooks / Pre-commit (push) Successful in 5m1s
Tests and linters / Tests (push) Successful in 5m14s
Tests and linters / Tests with -race (push) Successful in 5m54s
Tests and linters / gopls check (push) Successful in 6m2s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 14:00:23 +03:00
1c12f23b84
[ #1541 ] morph/event: Simplify netmap contract event parsing
...
Tests and linters / Run gofumpt (push) Successful in 1m10s
Vulncheck / Vulncheck (push) Successful in 2m55s
Tests and linters / Staticcheck (push) Successful in 3m2s
Build / Build Components (push) Successful in 3m42s
Pre-commit hooks / Pre-commit (push) Successful in 3m46s
Tests and linters / Lint (push) Successful in 4m19s
Tests and linters / Tests (push) Successful in 4m23s
Tests and linters / gopls check (push) Successful in 4m44s
Tests and linters / Tests with -race (push) Successful in 5m18s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
a353d45742
[ #1541 ] morph/event: Simplify container contract event parsing
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
d5d5ce2074
[ #1541 ] morph/event: Simplify balance contract event parsing
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
7429553266
[ #1437 ] node: Fix contextcheck linter
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-11-13 10:36:10 +03:00
6921a89061
[ #1437 ] ir: Fix contextcheck linters
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-11-13 10:36:10 +03:00
62b5181618
[ #1437 ] blobovnicza: Fix contextcheck linter
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-11-13 10:36:08 +03:00
6db46257c0
[ #1437 ] node: Use ctx for logging
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-11-13 10:36:07 +03:00
c8fb154151
[ #1475 ] Remove container estimation code
...
Tests and linters / Run gofumpt (pull_request) Successful in 1m38s
Vulncheck / Vulncheck (pull_request) Successful in 5m20s
Build / Build Components (pull_request) Successful in 6m9s
Tests and linters / gopls check (pull_request) Successful in 6m1s
Tests and linters / Lint (pull_request) Successful in 6m46s
Tests and linters / Tests with -race (pull_request) Successful in 9m35s
Tests and linters / Tests (pull_request) Successful in 2m6s
Tests and linters / Staticcheck (pull_request) Successful in 2m27s
DCO action / DCO (pull_request) Successful in 1m1s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m45s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-06 15:32:33 +03:00
41038b2ec0
[ #1431 ] node: Fix 'empty slice declaration using a literal'
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-10-15 08:53:59 +00:00
d83879d4b8
[ #1431 ] node: Fix comment format
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-10-15 08:53:59 +00:00
cc5360a578
[ #1425 ] morph/event: Rename eacl_test.go
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-09 10:56:48 +03:00
4190fba86d
[ #1425 ] Remove SetEACL-related code
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-09 10:56:48 +03:00
a685fcdc96
[ #1317 ] go.mod: Use range over int
...
DCO action / DCO (pull_request) Successful in 2m41s
Tests and linters / Run gofumpt (pull_request) Successful in 2m32s
Vulncheck / Vulncheck (pull_request) Successful in 2m38s
Build / Build Components (1.23) (pull_request) Successful in 3m0s
Build / Build Components (1.22) (pull_request) Successful in 3m3s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m33s
Tests and linters / Tests (1.22) (pull_request) Successful in 3m34s
Tests and linters / Tests (1.23) (pull_request) Successful in 3m36s
Tests and linters / Staticcheck (pull_request) Successful in 3m35s
Tests and linters / Lint (pull_request) Successful in 4m18s
Tests and linters / Tests with -race (pull_request) Successful in 4m20s
Tests and linters / gopls check (pull_request) Successful in 4m25s
Since Go 1.22 a "for" statement with a "range" clause is able
to iterate through integer values from zero to an upper limit.
gopatch script:
@@
var i, e expression
@@
-for i := 0; i <= e - 1; i++ {
+for i := range e {
...
}
@@
var i, e expression
@@
-for i := 0; i <= e; i++ {
+for i := range e + 1 {
...
}
@@
var i, e expression
@@
-for i := 0; i < e; i++ {
+for i := range e {
...
}
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-09-03 13:00:54 +03:00
cfd5e3d403
[ #1227 ] morph/event: Release ants.Pool on listener stopping
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-07-04 10:55:05 +00:00
f1b2b8bffa
[ #895 ] test: Fix NewLogger arguments list
...
`debug` is always true.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-01-11 12:32:09 +00:00
1cd2bfe51a
[ #755 ] morph: Drop FrostFSID contract usage
...
Unused.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-12-12 12:36:34 +03:00
a26483fc30
[ #749 ] morph: Fix panic when closing morph client
...
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-11-01 10:48:10 +00:00
79088baa06
[ #772 ] node: Apply gofumpt
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-10-31 17:03:03 +03:00
a8de37c8a2
[ #607 ] *: Remove redundant if on error returns
...
Semantic patch:
```
@@
@@
-if err != nil { return err }
-return nil
+return err
```
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-17 16:50:02 +00:00
8d16d95376
[ #484 ] morph: Add expired tx logging
...
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-07-03 08:03:25 +00:00
50caa388b0
[ #303 ] ir: Use pub key when validate container deletion
...
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-06-20 08:02:48 +00:00
47b0ec33c3
[ #337 ] netmap: Remove unused events
...
ci/woodpecker/push/pre-commit Pipeline was successful
Done in TrueCloudLab/frostfs-contract#16 .
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-12 09:19:38 +00:00
b480df4985
[ #337 ] container: Remove unused events
...
Done in TrueCloudLab/frostfs-contract#16 .
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-12 09:19:38 +00:00
Anna Shaleva
ddcc156ecc
[ #337 ] morph: Use Notary Actor for notary requests
...
Signed-off-by: Anna Shaleva <anna@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-12 09:19:38 +00:00
ea10abb42a
[ #296 ] morph: Add parser unit tests
...
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-10 09:40:26 +03:00
1309622b20
[ #296 ] morph: Add listener unit tests
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-10 09:40:26 +03:00
d00b1c0d29
[ #280 ] ir: Add netmap processor unit tests
...
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-02 08:48:07 +00:00
31b4da225a
[ #280 ] ir: Add frostfs processor unit tests
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-02 08:48:07 +00:00
5010b35466
[ #280 ] ir: Add container processor unit tests
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-02 08:48:07 +00:00
Pavel Karpy
4f5f832137
[ #268 ] notary_preparator: Actualize notary requests parsing
...
ci/woodpecker/pr/pre-commit Pipeline failed
ci/woodpecker/push/pre-commit Pipeline failed
After 75d7891ca1
`neo-go` does claim that an empty invocation script is the only way to
fill missing signature for unsigned notary requests. The new notary actor
does it that way and, therefore, breaks notary request parsing by the
Alphabet because of skipping any request that is not filled with a dummy (64
zeros) invocation script. Support both way. The "Dummy" approach will be
dropped later.
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-20 10:29:34 +03:00
f07d4158f5
[ #249 ] node: Drop subnet from IR and morph
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-04-17 09:46:02 +03:00
Pavel Karpy
8799138fcb
[ #247 ] morph: Drop reputation contract
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-14 14:44:14 +03:00
0e31c12e63
[ #240 ] logs: Move log messages to constants
...
Drop duplicate entities.
Format entities.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 05:06:09 +00:00
fe87735073
[ #219 ] morph: Refactor notary preparator
...
ci/woodpecker/push/pre-commit Pipeline was successful
Resolve funlen linter for Preparator.Prepare method.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-04-07 15:43:20 +03:00
d07e40d6fe
[ #219 ] morph: Refactor moprh event listener
...
Resolve funlen and gocognit linters for listener.listenLoop method.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-04-07 15:43:20 +03:00
0948a280fa
[ #195 ] morph: use blocking unlimited pool for notifications
...
ci/woodpecker/push/pre-commit Pipeline failed
With non-blocking pool restricted by 10 in capacity, the probability of
dropping events is unexpectedly big. Notifications are an essential part of the FrostFS,
we should not drop anything, especially new epochs.
```
Mar 31 07:07:03 vedi neofs-ir[19164]: 2023-03-31T07:07:03.901Z debug subscriber/subscriber.go:154 new notification event from sidechain {"name": "NewEpoch"}
Mar 31 07:07:03 vedi neofs-ir[19164]: 2023-03-31T07:07:03.901Z warn event/listener.go:248 listener worker pool drained {"chain": "morph", "capacity": 10}
```
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-03 15:58:16 +00:00
Pavel Karpy
a69c6d1ec9
[ #2272 ] morph: Do not subscribe to events without listening
...
ci/woodpecker/push/pre-commit Pipeline was successful
It led to a neo-go dead-lock in the `subscriber` component. Subscribing to
notifications is the same RPC as any others, so it could also be blocked
forever if no async listening (reading the notification channel) routine
exists. If a number of subscriptions is big enough (or a caller is lucky
enough) subscribing loop might have not finished subscribing before the
first notification is received and then: subscribing RPC is blocked by
received notification (non)handling and listening notifications routine is
blocked by not finished subscription loop.
That commit starts listening notification channel _before_ any subscription
actions.
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-03 08:42:41 +00:00
481a1ca6f3
[ #148 ] linter: Add gocognit linter
...
Code with high cognitive complexity is hard intuitively to understand
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-21 09:54:41 +03:00
97c36ed3ec
[ #148 ] linter: Add funlen linter
...
Long functions are hard to understand and source of errors
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-21 09:54:41 +03:00
20de74a505
Rename package name
...
Due to source code relocation from GitHub.
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 16:38:26 +03:00
cb5468abb8
[ #66 ] node: Replace interface{} with any
...
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
2023-02-21 16:47:07 +03:00
cb016d53a6
[ #1 ] Fix comments and error messages
...
Signed-off-by: Stanislav Bogatyrev <s.bogatyrev@yadro.com>
2023-02-06 17:41:14 +03:00
19d180b510
[ #11 ] Rename neofs
contract to frostfs
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-01-12 08:55:47 +03:00