Commit graph

55 commits

Author SHA1 Message Date
f50872f1bc [#58] object: Allow to set marshal data
Now it is possible set marshaled data to reduce memory
allocations.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-10-31 13:47:48 +03:00
17bed735a1 [#20] Update api version
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-17 11:10:12 +03:00
9a7b47d769 [#50] util: Use protowire for util/proto helpers
* Use methods to calculate size

Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-08-10 16:40:53 +00:00
3072090c77 [#51] protogen: Do not panic in StableSize()
Refs TrueCloudLab/frostfs-node#554 .

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-02 10:47:14 +03:00
7a5ee927c8 [#49] util/proto: Do not allocate in StringSize()
It was not catched by the test because most of the time the function is
inlined. However, I've seen it allocating with pprof in one of the
earlier builds.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-07-26 18:52:59 +03:00
6e92d7d5de [#49] util/proto: Make NestedStructure* generic
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-07-26 18:31:23 +03:00
849de02bc3 [#49] util/proto: Calculate repeated field size without allocations
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-07-26 18:31:23 +03:00
59c8421597 [#49] util/proto: Use StableSize() to determine if the struct is empty
`reflect` is not necessary here, and checking `StableSize` is what we
_want_ anyway.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-07-26 18:31:00 +03:00
68021b910a [#38] signature: Increase pool max object size
According to the results of profiling, objects with a size of 72KB
are mainly allocated.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-06-02 17:27:16 +03:00
e9e7901f67 [#27] util/proto: Fix staticcheck warning
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-03 14:15:56 +03:00
2aa3ee46e7 [#27] util/signature: Fix staticcheck warning
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-03 14:15:56 +03:00
Pavel Karpy
d9347a05f0 [#21] *: Drop reputation system
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-17 15:46:52 +03:00
ec0d0274fa [#3] signature: Add buffer pool
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
73fde0e37c [#3] signature: Verify parts in parallel
Verify request/response parts in parallel

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
d005bf0393 [#3] signature: Refactor sign and verify
Split methods to separate files, drop redundant intefaces

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-03-10 13:36:26 +03:00
f69d2ad83c Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 13:42:36 +03:00
1351b6656d Move to frostfs-api
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-12 17:40:48 +03:00
Leonard Lyubich
cf868188ef [#418] netmap: Support NetmapService.NetmapSnapshot RPC
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-19 16:44:34 +04:00
Evgenii Stratonikov
ea7a3811bf [#415] *: Add maintenance status and node state
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-09-16 18:50:53 +04:00
Evgenii Stratonikov
9e17cdfc76 [#413] util/proto: Marshal repeated []byte fields correctly
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-08-27 11:06:58 +03:00
Evgenii Stratonikov
dd233c3fbc [#386] util/signature: Add WalletConnect API support
To avoid introducing new dependency (neo-go), crypto routines are used
as in other code.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-06-21 20:09:33 +03:00
Evgenii Stratonikov
454b5c0ed7 [#406] protogen: Uncomment control service line
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-06-20 14:45:58 +03:00
fyrchik
0b8e4e4753
[#400] Support latest API in protoc plugin (#400)
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-05-30 10:33:01 +03:00
Evgenii Stratonikov
77a3ba9197 [#393] util/signature: Remove bytes pool and provide buffer explicitly
Chained verification is done in a single thread there is no need to use
pool to do this. Also because newly allocated items are 5 MiB in size
we can run out of memory given that typical header it much less in size.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-04-21 15:11:57 +03:00
Evgenii Stratonikov
23702bc51a util/protogen: add StableMarshal generator command
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-04-21 15:07:57 +03:00
Evgenii Stratonikov
e348c933b7 util/proto: fix doc comment
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-04-21 15:07:57 +03:00
Evgenii Stratonikov
94f068e462 *: remove error from StableMarshal return values
We marshal only in-memory structures, no error is expected.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-04-21 15:07:57 +03:00
Evgenii Stratonikov
84d981e88e util/proto: do not return error from primitive marshalers
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-04-21 15:07:57 +03:00
Leonard Lyubich
d065453bd0 [#380] Support changes in signature schemes
Support new `SignatureRFC6979` message. Make `refs.ECDSA_SHA512` to be
default scheme.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-02 16:49:50 +03:00
Leonard Lyubich
99370889d1 [#371] Support recent changes in NeoFS API protocol
Support:
  * new status codes (object, container, session);
  * object `Lock` message;
  * different signature schemes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-25 10:24:07 +03:00
Evgenii Stratonikov
a4349f6692 [#55] refs: Add Scheme field to Signature
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-02-25 10:15:28 +03:00
Leonard Lyubich
e9a8451fb7 [#367] *: Re-compile proto files of NeoFS API protocol
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-01-14 13:17:21 +03:00
Alex Vanin
c35dff758d [#361] Return proto file for stable marshal tests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-12-02 16:42:47 +03:00
Leonard Lyubich
b0a2b73650 [#355] util/proto: Support fixed32 fields
Implement `Fixed32Marshal` / `Fixed32Size` functions which allow to work
with protobuf fixed32 fields.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-18 17:40:33 +03:00
Leonard Lyubich
180da74e5c Place compiled proto files to root dir
Remove `v2` prefix from `prepare.sh` script.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-17 15:29:33 +03:00
Leonard Lyubich
25da5d2e13 Add v2 version to go module name
Replace all elements from `v2` to root directory.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-17 15:29:33 +03:00
Leonard Lyubich
0117e90e9a [#176] Re-compile protobuf file from NeoFS API source
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-09-29 18:28:13 +03:00
Evgenii Stratonikov
9ddfcdfbba [#277] go.mod: remove pkg/errors
Use stdlib `errors` instead.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-05-19 11:14:56 +03:00
Leonard Lyubich
0cbb8d0913 [#265] proto: Implement functions for double (float64) protobuf data type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-25 11:20:34 +03:00
Leonard Lyubich
51e8e318c2 [#233] proto: Implement functions for fixed64 protobuf data type
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-25 16:20:34 +03:00
Leonard Lyubich
2f3e5742d3 [#226] v2/grpc: Re-compile protobuf definitions
Add compiled tombstone message. Extend Object.DeleteResponse.Body with
tombstone address field.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-10 18:26:23 +03:00
Alex Vanin
ef31dec43a [#191] Recompile latest neofs-api repository
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-11 10:35:34 +03:00
Leonard Lyubich
5be034ab80 [#182] Regenerate proto-compiled files
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-10-28 14:11:49 +03:00
Alex Vanin
fd8e691f61 [#172] util/proto: Resolve protobuf compile warnings
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
8351c78f58 [#172] Use protobuf v2 API for go
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-20 13:45:14 +03:00
Alex Vanin
c3604d00f0 Fix tests with nil check via reflection
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:43:04 +03:00
Alex Vanin
0df4e4bf0d Add nested structure stable marshal helper
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:42:51 +03:00
Alex Vanin
f8e6908e50 Update NestedStructurePrefix helper function
Return prefix and it's length for optimizations in
stable marshallers.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:41:49 +03:00
Alex Vanin
a68252c956 Add stable marshal helpers for repeated fields
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:41:07 +03:00
Alex Vanin
a7a8fc33bb Add stable marshaler for enums
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-09-18 10:41:04 +03:00