neofs-node icon indicating copy to clipboard operation
neofs-node copied to clipboard

node: Optimize verification of the request signatures

Open cthulhu-rider opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

NeoFS API server sometimes wastes large amounts of memory. For example, to verify request signatures, the server decodes messages into intermediate structures, encodes its parts (field-ordered Protocol Buffers V3), verifies signatures and request continues processing.

Describe the solution you'd like

do not perform extra decode-encode stages. To do this, we must arrange the fields in the message without an additional buffer, calculate the checksum and verify the signature. Nothing blocks us from this cuz Protobuf is pretty simple and gRPC lib provides a lot of utilities around it

Describe alternatives you've considered

leave as it is: simpler code but worse performance

cthulhu-rider avatar Dec 18 '23 11:12 cthulhu-rider

lets postpone this issue a bit, several more fundamental optimizations are coming with v0.40. It'd better to intro current optimization above those ones

cthulhu-rider avatar Jan 29 '24 12:01 cthulhu-rider