mirror of
https://github.com/nspcc-dev/neofs-node.git
synced 2026-03-01 04:29:10 +00:00
Deduplicate token serialization #1434
Labels
No labels
I1
I2
I3
I4
S0
S1
S2
S3
S4
U0
U1
U2
U3
U4
blocked
bug
config
dependencies
discussion
documentation
enhancement
enhancement
epic
feature
go
good first issue
help wanted
neofs-adm
neofs-cli
neofs-cli
neofs-cli
neofs-ir
neofs-lens
neofs-storage
neofs-storage
performance
question
security
task
test
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-node#1434
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cthulhu-rider on GitHub (Jun 19, 2025).
https://github.com/nspcc-dev/neofs-node/pull/3369#discussion_r2156974449
Is your feature request related to a problem? Please describe.
full bearer/session token BLOB is a concatenation of 2 fields:
currently, SN calculates it twice per-request:
body participates in both cases, but encoded twice
Describe the solution you'd like
marshal token once and reuse
Describe alternatives you've considered
originally, token comes in a binary format over gRPC. Then it's decoded to generated proto struct instance by gRPC lib functions, then we encode it again. So, we have extra decode-to-encode round. The best way would be:
this is the most efficient approach. At the same time, it is quite challenging according to the API of used gRPC lib. This improvement is not limited to tokens and can be extended to many other cases